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

I'm using a PHP librairy to send email through postfix. But i'm keep getting this message in the logs when i try to send emails : postfix/sendmail[15782]: fatal: -n option not supported

I will remove this flag from my code but i'm curious about the purpose of this flag which seems to be useless (http://linux.die.net/man/1/sendmail.postfix).

I can't find any information about it on google, any idea about the purpose of this option?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Next time, consult the actual documentation instead of $random_web_site.

From http://www.postfix.org/sendmail.1.html:

-n (ignored) Backwards compatibility.

Why are you calling sendmail(1) to begin with ?
PHP can send SMTP mail just fine - and you don't need postfix to do so either.

share|improve this answer
    
The system's local mail server might be appropriately configured for the network it is in. Using SMTP directly from PHP could mean having to take care of all that in PHP. Might be unnecessary duplication of work, not to mention a possible source of mistakes. –  Gnarfoz Jul 5 '12 at 8:47
1  
Obviously, but he doesn't need postfix regardless. A simple nullmailer will suffice, avoiding the complexities of maintaining a full-blown MTA. –  adaptr Jul 5 '12 at 9:05
    
+1 for nullmailer although it requires a mail relay somewhere. –  adamo Jul 5 '12 at 9:26
    
Thanks for nullmailler (great tool), the -n option is apparently throw by an obscure configuration of the company postfix. So i will try an alternate way by using nullmailler. –  DoesNotCompute Jul 5 '12 at 9:52
add comment

Actually you should look here to see what this flag actually do. It's added in Postfix just for backwards compatibility, but it doesn't do anything there, while in Sendmail it doesn't resolve aliases when sending mail.

share|improve this answer
add comment

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.