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

When I try to send a mail by SMTP and Postfix I got a error "5.7.1 unable to relay".

After lot of config changing it worked for me to send email to the same domain as server (to other accounts on that host) by:

smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination

But I stil got this error when sending to other domains. Dovecot is installed on my server.

How to allow relay to any domain but with simple authentication on SMTP on port 25 ? Without SSL/TLS etc.


If I addthe domain which I use as recipient for test to my destinations:

mydestination = o2.pl

I got:

Recipient address rejected: User unknown in local recipient table

Sample log when configured without mydestination:

Oct  6 00:50:40 XXXXXXX postfix/smtpd[5409]: NOQUEUE: reject: RCPT from MY_HOME_HOST: 554 5.7.1 <TARGET_EMAIL@o2.pl>: Relay access denied; from=<TEST_ACCOUN@MY_DOMAIN.pl> to=<TARGET_EMAIL@o2.p> proto=ESMTP helo=<[]>


After removing:


Thunderbird just hungs when I try to send email. It hung on "Connected to MY_OWN_DOMAIN..."

I switched TLS to "no" but it not helped. When I telnet to port 25 on localhost, I don't get a welcome message from SMTP

Propably because of:

 "smtpd_recipient_restrictions": specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit

But when I have added "check_relay_domains" I got a error from thunderbird, that SMTP server send broken welcome message.

Finally I got new error:

Recipient address rejected: Relay access denied.

My whole main.cf: http://pastie.org/4916947

share|improve this question

1 Answer 1

This looks less like an SSL issue than like an authentication problem; if Postfix recognizes you as an authorized sender then it should not be talking about relaying. Is your SMTP client configured to authenticate to the server? If not, set it up that way and try again.

share|improve this answer
Yes, my client is configured to authenticate without encoding, but authenticate with user&pass. I can send for example to root@mydomain.com but not to someone@gmail/yahoo/.../.com. I don't want anything with SSL and buy certificate. I just want to send emails to any domain in the world after proper authentication to SMTP –  killer_PL Oct 5 '12 at 20:43
You've got permit_sasl_authenticated in your smtpd_recipient_restrictions, but I don't see any SASL auth configuration in your main.cf -- this may be the problem; if Postfix is expecting to authenticate you via SASL, but doesn't have an SASL provider against which to do so, it will treat you as it would any other unauthenticated user. A full resolution is beyond the scope of this answer, but I'd recommend starting with the Postfix SASL howto, which helped me greatly when setting up my own Postfix server. –  Aaron Miller Oct 5 '12 at 21:33

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.