Solved

PHP, SMTP and IIS - Relaying and "501 Syntactically invalid" error

Posted on 2004-08-05
3
1,382 Views
Last Modified: 2013-12-19
Hi there,

I'm running PHP-based forum software on a web server.  The software sends e-mail to our users when an event happens, such as sending validation e-mail, or a post was replied to, etc.  I'm using IIS to host the forums, and would like to use Window's built in SMTP server to allow PHP to send mail through it.

I have it up and running and mostly working...  What I did was install the SMTP server, and allowed 127.0.0.1 to relay through it so it would send e-mail out.  Question One: Is this correct (and best) practice?

Question Two: The odd thing is that on about 30% of the mail servers my server connects to to send a message, I get a warning back that says, "501 Syntactically invalid HELO argument(s)" in my Event Viewer.

Technically I don't use the SMTP server to receive mail, only to send it.  I assume this is because those mail servers are trying to use reverse DNS and failing because I don't have an MX record pointing to my forum server?  If not, what do I do to fix that warning?

Thanks,
G
0
Comment
Question by:Gonthax
3 Comments
 
LVL 37

Expert Comment

by:meverest
ID: 11731768
Hello,

answer 1: Sure - if the only use for the smtp server is to relay mail generated by the web apps, then that will be fine.  If you wanted, you could go one step further and allow only localhost to *connect*.  Since all mail will be outbound, and no need to accept external connections for local mail delivery, then there is no reason why anyone else will need access to the smtp service.

answer 2: 'syntactically incorrect' suggests more than just a reverse lookup failure.  are you sure that the error is generated by the remote server, or could it be the smtp delivery agent you are using in your php code?

cheers.




0
 
LVL 18

Accepted Solution

by:
crissand earned 250 total points
ID: 11736936
I found some time ago that this error can be generated if the server has an underscore in name. Anyway, you can verify manually if the hello syntax is correct, by connecting with a telnet program on port 25 of the server and type the hello sequence used. Somtimes the spam killers program can generate this error. The spam killers can try to connect back to the server to verify of it's valid, thus the eror can be connected to the mx record in dns.
0
 
LVL 1

Author Comment

by:Gonthax
ID: 11745543
It turned out to be an underscore in the hostname of the computer.  I removed that, tested it using your telnet suggestion, and that the command went through properly!

meverest, I'll make a new topic for you for points -- I didn't see the Assisted Answer feature when I accepted crissand's comment.

Thanks both of you!
-G
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enterprise networks where VoIP phones have been deployed frequently use port configurations that allow both a computer and an IP phone to be plugged into the same switch port but use different VLANs. On Cisco equipment I'm referring to the "native V…
I'm a big fan of Windows' offline folder caching and have used it on my laptops for over a decade.  One thing I don't like about it, however, is how difficult Microsoft has made it for the cache to be moved out of the Windows folder.  Here's how to …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

838 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question