Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I run the sendmail -bs command as root, I get the expected output:

$ sudo sendmail -bs
220 ESMTP Postfix
ehlo localhost
250-SIZE 15728640
250 DSN

But when I run the same command without sudo, I get no output at all and sendmail doesn't respond to any commands:

$ sendmail -bs
ehlo localhost

How can I configure Postfix so that sendmail works for every user (or at least for some specific users)? I need this because SwiftMailer for PHP uses sendmail -bs for sending mails and fails when it can't find any output.

share|improve this question
up vote 2 down vote accepted

As documented, sendmail -bs is implemented by running the smtpd(8) daemon.
Since this binds to port 25, it requires root privileges.

Consider using SwiftMailer instead with one of the other sending options, such as batched mode or SMTP mode.

As also documented, sendmail -bs will not act like a "real" postfix SMTP server unless you run it with the mail_owner personality.

The only advantage over batch mode is that SMTP mode allows you to run messages through postfix' access controls. Since you cannot do that the way you are currently using it, use batch mode instead.

share|improve this answer
I was under the assumption that the only way I could send mail through the local SMTP server was to use sendmail - that SmtpTransport was used only to connect to remote systems. But SmtpTransport::newInstance('localhost', 25); works just as fine. Thanks! – Tatu Ulmanen Dec 6 '12 at 10:21

Your Answer


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.