2010-02-02

Postfix error -- connect to transport private/smtp: Connection refused

Problem:

Cannot send out any email, except to local users

Environment:

UNIX (Linux, FreeBSD, etc)
Postfix

Symptoms:

/var/log/maillog has these messages:
warning: connect to transport private/smtp: Connection refused

Reason:

"unix" smtp is disabled in Postfix configuration

Fix:

Uncomment this line in master.cf
smtp unix - - n - - smtp
(there are two more lines about smtp - they deal with external connections. Need them only if you want to accept mail from outside, not to send mail)

Additional thing to check:

mailer.conf should look like this:

$ cat /etc/mail/mailer.conf
#
# Execute the Postfix sendmail program, named /usr/local/sbin/sendmail
#
sendmail        /usr/local/sbin/sendmail
send-mail       /usr/local/sbin/sendmail
mailq   /usr/local/sbin/sendmail
newaliases      /usr/local/sbin/sendmail

3 comments:

  1. Hi,
    You´re right!
    The connection refused is only related to the most common problem when deal with unix/linux systems: grant or deny access to user and groups!
    Thank you very much!

    ReplyDelete
  2. THANK YOU! I'm sitting behind a ream of paper and two computers learning everything I can about Postfix to create a much smarter MTA for my corporation. I was doing fine except that my configuration would not send mail. I did have that line in master.cf, but I did a quick copy/paste without paying attention to the parameters of the line. It wasn't until I saw your "uncomment this line" that I realized that my cut/paste had and 'n' instead of a '-' in the private slot. Oops.

    BTW, I really appreciate the clean style of your post.

    ReplyDelete
    Replies
    1. You are very welcome Lynn, glad I could help!

      Delete