1

I've setup a Postfix/Dovecot mail server on AWS. I've implemented self-signed TLS authorization, connected to it from and external TBird client and tried to send/receive email. TBird is able to detect my server and emails are received just fine, but I get an error when trying to send :

  NOQUEUE: reject: RCPT from <<LOCAL BOX>>: 553
 5.7.1 <<[email protected]>>: Sender address rejected: not owned by user username; from=<<[email protected]>>
 to=<<[email protected]>> proto=ESMTP helo=<<[192.168.1.148]>>

After the error I'm able to save the draft.

I'm able to manually openssl into 587 and walk through the authentication, but when I get to the rcpt command I get the same error.

This is my first time posting, so let me know if I need to give more information :

postconf -n

alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases broken_sasl_auth_clients = yes command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix debug_peer_level = 1 home_mailbox = Maildir/ html_directory = no inet_interfaces = all inet_protocols = all mail_owner = postfix mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain mydomain = mydomain.tld myhostname = mail.mydomain.tld mynetworks = 168.100.189.0/28, 127.0.0.0/8 myorigin = $mydomain newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES relay_domains = sample_directory = /usr/share/doc/postfix-2.6.6/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtp_helo_name = $myhostname smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination smtpd_sasl_auth_enable = yes smtpd_sasl_path = private/auth smtpd_sasl_security_options = noanonymous smtpd_sasl_type = dovecot smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem smtpd_tls_auth_only = no smtpd_tls_cert_file = /etc/postfix/ssl/mail.anythingbox.org.crt smtpd_tls_key_file = /etc/postfix/ssl/mail.anythingbox.org.key smtpd_use_tls = yes tls_random_source = dev:/dev/urandom unknown_local_recipient_reject_code = 550

changes to main.cf

smtp_helo_name = $myhostname
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions =
        permit_mynetworks,
        permit_sasl_authenticated

smtpd_recipient_restrictions =
        permit_mynetworks,
        permit_sasl_authenticated,
        reject_unauth_destination
smtpd_use_tls = yes
smtpd_tls_auth_only = no
smtpd_tls_key_file = /etc/postfix/ssl/mail.mydomain.tld.key
smtpd_tls_cert_file = /etc/postfix/ssl/mail.mydomain.tld.crt
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
tls_random_source = dev:/dev/urandom

I've spent the day going through every google result and can't seem to get anything to fix this... any help is very much appreciated.

4
  • You need to login with the full email address, not just the username part. Dec 9, 2015 at 22:38
  • I tried that, but the account is based on a Linux user account - am I not creating new accounts correctly? I read several tutorials that said you just create a new account and Postfix knows what to do.... Do I create a special account that includes the domain name?
    – rwaltz
    Dec 10, 2015 at 3:10
  • Michael, can you explain how that works? My email accounts are based on Linux user accounts, is there some mapping in Postfix that allows a user + domain to login? Everything else is working perfectly, but this one thing and no one else seems to have this problem... why can't my user send via SMTP - how do I get Postfix to recognize logged in user is allowed to send email from [email protected]?
    – rwaltz
    Dec 10, 2015 at 15:12
  • It's the mapping you set up in dovecot. Dec 10, 2015 at 15:17

2 Answers 2

0

you can use smtpd_sender_login_maps in postfix. It's an

optional lookup table with the SASL login names that own the sender (MAIL FROM) addresses

in /etc/postfix/main.cf

smtpd_sender_login_maps = hash:/etc/postfix/smtpd_sender_login_maps

with contents

[email protected] username

or if you use virtual mailboxes, you map to them

smtpd_sender_login_maps = $virtual_mailbox_maps
virtual_mailbox_maps = hash:/etc/postfix/virtual-mailbox-users
0

for me it was reject_sender_login_mismatch

i removed it from smtpd_sender_restrictions value

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .