Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I currently don't have a SMTP server setup. However, in my PHP code, I send all my SMTP request to sendmail. Are there any down fall to using this procedure? If yes, what are the advantages of sending all the STMP request to a 'centralize' SMTP server?

share|improve this question

1 Answer 1

When PHP sends mail requests to sendmail, it is effectively using sendmail as a client only, rather than use the full ability of it to act as a server as well.

There is no reason you would need to set up a full server solution (which speaks SMTP) unless you have a need to filter the messages coming out of PHP or you have some other unique setup. The only other benefit to running your own SMTP server is that it could have a better 'spam' reputation than the server you are running your PHP code on.

If you are not having any issues with the mail being sent via php, I do not see any reason to move to a 'full' SMTP server solution - using sendmail or any other software. Running an SMTP server requires a good amount of knowledge of how to run them and properly administer the incoming and outgoing mail.

Finally, and hoping this doesn't sound like I am nitpicking, but SMTP is a protocol while sendmail is the name of a software program which speaks SMTP. So your title question is a bit like "Banana vs Fruit - Which should I eat?" in that sendmail is specific type of SMTP server.

share|improve this answer
    
The only potential downside to not having a full SMTP server setup is your current configuration may not retry "deferred" messages (This either needs to be done from cron or via a sendmail "queue runner" daemon). If your current configuration is working I wouldn't worry about it too much. –  voretaq7 Jan 29 '10 at 15:35
    
+1 keep it as simple as possible, unless you know a good reason to make it more complex. If you do have a good reason, get postfix, buy a book on it, and learn all about MTAs. –  dunxd Jan 29 '10 at 15:41
    
IMO, in this case "sendmail" means passing messages to the /usr/bin/sendmail binary (which comes with all MTAs) and letting it handle the rest (as opposed to directly connecting to a SMTP server using sockets). –  grawity Jan 29 '10 at 17:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.