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 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]
221 2.0.0 Bye [156 ms]

1 Answer 1


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 = [::ffff:]/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.

  • thank you. So I need to use AUTH command. This is by using SSL or how can I do this?
    – mbrc
    Jul 17, 2012 at 7:44
  • @mbrc The AUTH is an Extended SMTP command (see in your transcript: 250-AUTH PLAIN LOGIN and 250-AUTH=PLAIN LOGIN). It's handled by email clients when you set the "SMTP Server Requires Authentication" checkbox/flag.
    – Jon Lin
    Jul 17, 2012 at 7:46
  • Even I use SSL and 465 port I can not send mails in outlook but as you said, I can send it by web client.
    – mbrc
    Jul 17, 2012 at 7:47
  • I see that you replay the same time I did :) And where in outlook or thunderbir i can set "SMTP Server Requires Authentication"?
    – mbrc
    Jul 17, 2012 at 8:13
  • 1
    @mbrc I've never used either of those email clients before, but that's irrelevant to your question (and guessing by your further questions, you may not have even setup SASL user accounts so authenticating with SMTP may not help). By ending the smtpd_sender_restrictions chain with permit instead of reject fixes your problem. You should read through the postfix documentation about sender restrictions.
    – Jon Lin
    Jul 17, 2012 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.