Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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]
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
    
thank you. So I need to use AUTH command. This is by using SSL or how can I do this? –  mbrc Jul 17 '12 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 '12 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 '12 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 '12 at 8:13
    
@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 '12 at 8:17
show 8 more comments

Your Answer

 
discard

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.