1

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?

2 Answers 2

1

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.

4
  • 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, 2012 at 8:47
  • 2
    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, 2012 at 9:05
  • +1 for nullmailer although it requires a mail relay somewhere.
    – adamo
    Jul 5, 2012 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. Jul 5, 2012 at 9:52
1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .