Solved

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

Posted on 2004-08-05
3
1,368 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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…
Are you one of those front-line IT Service Desk staff fielding calls, replying to emails, all-the-while working to resolve end-user technological nightmares? I am! That's why I have put together this brief overview of tools and techniques I use in o…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

706 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now