Ubuntu – Postfix Sender address rejected: Access denied

postfixUbuntu

I install postfix and smtp server with http://www.pixelinx.com/2010/10/creating-a-mail-server-on-ubuntu-using-postfix-courier-ssltls-spamassassin-clamav-and-amavis/ tutorial.

But i can not send and recive mail, I check with www.mxtoolbox.com smtp and is the same: Sender address rejected: Access denied [156 ms]

what this means? I am reading here: http://www.penpublishing.com/support/emailerrors/understandingemailerrors/default.aspx

but with no solution for me…

EHLO please-read-policy.mxtoolbox.com
250-mail.domain.com
250-PIPELINING
250-SIZE
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN [140 ms]
MAIL FROM: <supertool@mxtoolbox.com>
250 2.1.0 Ok [546 ms]
RCPT TO: <test@example.com>
554 5.7.1 <supertool@mxtoolbox.com>: Sender address rejected: Access denied [156 ms]
QUIT
221 2.0.0 Bye [156 ms]

Best Answer

If you've configured postfix like it says in that tutorial, and you have your sender restrictions identical to the tutorial:

smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, reject

You won't be able to send unless you authenticate using the AUTH command or you are part of the mynetworks list, which in the tutorial is:

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128

Which means you can only send form localhost if you don't SASL authenticate. Here's a list of restrictions for smtpd_sender_restrictions: http://www.postfix.org/postconf.5.html#smtpd_sender_restrictions

Essentially, you want a permit at the end if you want to be able to send mail, but be careful not to make it too easy. You can do a search for "postfix smtpd_recipient_restrictions examples" to get some sane examples.