Connecting Tech Pros Worldwide Help | Site Map

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

StinkFinger
Guest
 
Posts: n/a
#1: Jul 17 '05
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.


Manuel Lemos
Guest
 
Posts: n/a
#2: Jul 17 '05

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


Hello,

On 04/23/2004 01:27 AM, StinkFinger wrote:[color=blue]
> 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 ?[/color]

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
StinkFinger
Guest
 
Posts: n/a
#3: Jul 17 '05

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


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" <mlemos@acm.org> wrote in message
news:c6a810$9luvg$1@ID-138275.news.uni-berlin.de...[color=blue]
> Hello,
>
> On 04/23/2004 01:27 AM, StinkFinger wrote:[color=green]
>> 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 ?[/color]
>
> 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[/color]


Hi Ho
Guest
 
Posts: n/a
#4: Jul 17 '05

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


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" <stinky@pinky.com> wrote in message
news:108heg5nue64a92@corp.supernews.com...[color=blue]
> Thanks for the reply. That looks so complicated, it was hard enough[/color]
setting[color=blue]
> 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[/color]
setup[color=blue]
> without changing all of my custom mailer code.
>
> Any ideas on that ?
>
> "Manuel Lemos" <mlemos@acm.org> wrote in message
> news:c6a810$9luvg$1@ID-138275.news.uni-berlin.de...[color=green]
> > Hello,
> >
> > On 04/23/2004 01:27 AM, StinkFinger wrote:[color=darkred]
> >> 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[/color][/color][/color]
SMTP[color=blue][color=green][color=darkred]
> >> Virtual Server in Exchange, however, this opens me up for spam[/color][/color][/color]
relaying.[color=blue][color=green][color=darkred]
> >>
> >> 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[/color][/color][/color]
my[color=blue][color=green][color=darkred]
> >> server from relaying AND allow my PHP mail to go out ?[/color]
> >
> > 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[/color][/color]
capable[color=blue][color=green]
> > 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[/color][/color]
Windows:[color=blue][color=green]
> >
> > 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[/color]
>
>[/color]


StinkFinger
Guest
 
Posts: n/a
#5: Jul 17 '05

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


Worked perfect - thanks for the tip =)

"Hi Ho" <ziad44444@hotmail.com> wrote in message
news:c6ba86$nnf$1@newsflash.concordia.ca...[color=blue]
> 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" <stinky@pinky.com> wrote in message
> news:108heg5nue64a92@corp.supernews.com...[color=green]
>> Thanks for the reply. That looks so complicated, it was hard enough[/color]
> setting[color=green]
>> 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[/color]
> setup[color=green]
>> without changing all of my custom mailer code.
>>
>> Any ideas on that ?
>>
>> "Manuel Lemos" <mlemos@acm.org> wrote in message
>> news:c6a810$9luvg$1@ID-138275.news.uni-berlin.de...[color=darkred]
>> > 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[/color][/color]
> SMTP[color=green][color=darkred]
>> >> Virtual Server in Exchange, however, this opens me up for spam[/color][/color]
> relaying.[color=green][color=darkred]
>> >>
>> >> 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[/color][/color]
> my[color=green][color=darkred]
>> >> 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[/color][/color]
> capable[color=green][color=darkred]
>> > 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[/color][/color]
> Windows:[color=green][color=darkred]
>> >
>> > 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[/color]
>>
>>[/color]
>
>[/color]


Closed Thread