By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,639 Members | 3,129 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,639 IT Pros & Developers. It's quick & easy.

Any PHP / Exchange experts here (about mail relaying) ?

P: n/a
My IIS / PHP / MySQL and Exchange are on the same box. To allow PHP to send
mail I need to add my servers IP to the "Granted" list for the SMTP Virtual
Server in Exchange, however, this opens me up for spam relaying.

If I remove the IP, PHP generated mail no longer goes out (either using
mail() or PHPMailer). Is there any combination that I can use to stop my
server from relaying AND allow my PHP mail to go out ?

Thanks.
Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hello,

On 04/23/2004 01:27 AM, StinkFinger wrote:
My IIS / PHP / MySQL and Exchange are on the same box. To allow PHP to send
mail I need to add my servers IP to the "Granted" list for the SMTP Virtual
Server in Exchange, however, this opens me up for spam relaying.

If I remove the IP, PHP generated mail no longer goes out (either using
mail() or PHPMailer). Is there any combination that I can use to stop my
server from relaying AND allow my PHP mail to go out ?


There is a myth that it is necessary an SMTP server to send messages.

The SMTP server is only necessary for receiving.

For instance under Unix/Linux, local mailers just send the messages
directly to the destination SMTP servers.

Since you are using Windows you need to use something alternative
capable of direct delivery mode.

In that case you can try this class that comes with a function named
smtp_mail() that emulates the mail() function but lets you do direct
deliveries.

http://www.phpclasses.org/mimemessage

You also need this for SMTP delivering.

http://www.phpclasses.org/smtpclass

And this to emulate GetMXRR PHP function that does not work under Windows:

http://www.phpclasses.org/phpresolver
--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Jul 17 '05 #2

P: n/a
Thanks for the reply. That looks so complicated, it was hard enough setting
up both mail() and PHPMailer the first time ;)

I was thinking on moving my web stuff to another box, and adding the new
machines ip to the granted list. Since the ip will be different than the
Exchange server, I am hoping that this will allow me to use my current setup
without changing all of my custom mailer code.

Any ideas on that ?

"Manuel Lemos" <ml****@acm.org> wrote in message
news:c6************@ID-138275.news.uni-berlin.de...
Hello,

On 04/23/2004 01:27 AM, StinkFinger wrote:
My IIS / PHP / MySQL and Exchange are on the same box. To allow PHP to
send mail I need to add my servers IP to the "Granted" list for the SMTP
Virtual Server in Exchange, however, this opens me up for spam relaying.

If I remove the IP, PHP generated mail no longer goes out (either using
mail() or PHPMailer). Is there any combination that I can use to stop my
server from relaying AND allow my PHP mail to go out ?


There is a myth that it is necessary an SMTP server to send messages.

The SMTP server is only necessary for receiving.

For instance under Unix/Linux, local mailers just send the messages
directly to the destination SMTP servers.

Since you are using Windows you need to use something alternative capable
of direct delivery mode.

In that case you can try this class that comes with a function named
smtp_mail() that emulates the mail() function but lets you do direct
deliveries.

http://www.phpclasses.org/mimemessage

You also need this for SMTP delivering.

http://www.phpclasses.org/smtpclass

And this to emulate GetMXRR PHP function that does not work under Windows:

http://www.phpclasses.org/phpresolver
--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

Jul 17 '05 #3

P: n/a
Try using another local IP on the same box for IIS to work on it and use it
to relay mails from PHP to the Exchange box.
"StinkFinger" <st****@pinky.com> wrote in message
news:10*************@corp.supernews.com...
Thanks for the reply. That looks so complicated, it was hard enough setting up both mail() and PHPMailer the first time ;)

I was thinking on moving my web stuff to another box, and adding the new
machines ip to the granted list. Since the ip will be different than the
Exchange server, I am hoping that this will allow me to use my current setup without changing all of my custom mailer code.

Any ideas on that ?

"Manuel Lemos" <ml****@acm.org> wrote in message
news:c6************@ID-138275.news.uni-berlin.de...
Hello,

On 04/23/2004 01:27 AM, StinkFinger wrote:
My IIS / PHP / MySQL and Exchange are on the same box. To allow PHP to
send mail I need to add my servers IP to the "Granted" list for the SMTP Virtual Server in Exchange, however, this opens me up for spam relaying.
If I remove the IP, PHP generated mail no longer goes out (either using
mail() or PHPMailer). Is there any combination that I can use to stop my server from relaying AND allow my PHP mail to go out ?


There is a myth that it is necessary an SMTP server to send messages.

The SMTP server is only necessary for receiving.

For instance under Unix/Linux, local mailers just send the messages
directly to the destination SMTP servers.

Since you are using Windows you need to use something alternative capable of direct delivery mode.

In that case you can try this class that comes with a function named
smtp_mail() that emulates the mail() function but lets you do direct
deliveries.

http://www.phpclasses.org/mimemessage

You also need this for SMTP delivering.

http://www.phpclasses.org/smtpclass

And this to emulate GetMXRR PHP function that does not work under Windows:
http://www.phpclasses.org/phpresolver
--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html


Jul 17 '05 #4

P: n/a
Worked perfect - thanks for the tip =)

"Hi Ho" <zi*******@hotmail.com> wrote in message
news:c6**********@newsflash.concordia.ca...
Try using another local IP on the same box for IIS to work on it and use
it
to relay mails from PHP to the Exchange box.
"StinkFinger" <st****@pinky.com> wrote in message
news:10*************@corp.supernews.com...
Thanks for the reply. That looks so complicated, it was hard enough

setting
up both mail() and PHPMailer the first time ;)

I was thinking on moving my web stuff to another box, and adding the new
machines ip to the granted list. Since the ip will be different than the
Exchange server, I am hoping that this will allow me to use my current

setup
without changing all of my custom mailer code.

Any ideas on that ?

"Manuel Lemos" <ml****@acm.org> wrote in message
news:c6************@ID-138275.news.uni-berlin.de...
> Hello,
>
> On 04/23/2004 01:27 AM, StinkFinger wrote:
>> My IIS / PHP / MySQL and Exchange are on the same box. To allow PHP to
>> send mail I need to add my servers IP to the "Granted" list for the SMTP >> Virtual Server in Exchange, however, this opens me up for spam relaying. >>
>> If I remove the IP, PHP generated mail no longer goes out (either
>> using
>> mail() or PHPMailer). Is there any combination that I can use to stop my >> server from relaying AND allow my PHP mail to go out ?
>
> There is a myth that it is necessary an SMTP server to send messages.
>
> The SMTP server is only necessary for receiving.
>
> For instance under Unix/Linux, local mailers just send the messages
> directly to the destination SMTP servers.
>
> Since you are using Windows you need to use something alternative capable > of direct delivery mode.
>
> In that case you can try this class that comes with a function named
> smtp_mail() that emulates the mail() function but lets you do direct
> deliveries.
>
> http://www.phpclasses.org/mimemessage
>
> You also need this for SMTP delivering.
>
> http://www.phpclasses.org/smtpclass
>
> And this to emulate GetMXRR PHP function that does not work under Windows: >
> http://www.phpclasses.org/phpresolver
>
>
> --
>
> Regards,
> Manuel Lemos
>
> PHP Classes - Free ready to use OOP components written in PHP
> http://www.phpclasses.org/
>
> PHP Reviews - Reviews of PHP books and other products
> http://www.phpclasses.org/reviews/
>
> Metastorage - Data object relational mapping layer generator
> http://www.meta-language.net/metastorage.html



Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.