1

I am having trouble sending mail with postfix after changing the "Format for usernames that include domain" under the "Mail For Domain" template. Basically I had everything working but then changed the default usernames from being user.domain to user@domain.co, then deleted and recreated my email accounts (including associated files in home directory) under that new format. Once this was done, I was unable to send any email, either from accounts that I'd recreated or from brand new accounts. I restoring the previous template settings and recreating the accounts and that didn't work either.

Below is an example of what comes up in /var/log/mail.log when I attempt to send an email.

Jul 16 19:02:17 host postfix/smtpd[11772]: connect from localhost.localdomain[127.0.0.1]
Jul 16 19:02:17 host postfix/smtpd[11772]: 691B9138176E: client=localhost.localdomain[127.0.0.1]
Jul 16 19:02:17 host postfix/cleanup[11775]: 691B9138176E: message-id=<1405537337.11762@domain.co>
Jul 16 19:02:17 host postfix/smtpd[11772]: disconnect from localhost.localdomain[127.0.0.1]
Jul 16 19:02:17 host postfix/qmgr[10765]: 691B9138176E: from=<user@domain.co>, size=666, nrcpt=1 (queue active)
Jul 16 19:02:17 host postfix/qmgr[10765]: warning: connect to transport private/sam-domain.co: No such file or directory
Jul 16 19:02:17 host postfix/error[11735]: 691B9138176E: to=<recipient@gmail.com>, relay=none, delay=0.05, delays=0.04/0/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)

Also, here's my postconf -n:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
allow_percent_hack = no
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
home_mailbox = Maildir/
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
mydestination = domain.co, localhost.domain.co, localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
sender_bcc_maps = hash:/etc/postfix/bcc
sender_dependent_default_transport_maps = hash:/etc/postfix/virtual
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_tls_cert_file = /etc/postfix/postfix.cert.pem
smtpd_tls_key_file = /etc/postfix/postfix.key.pem
smtpd_tls_mandatory_ciphers = high
smtpd_tls_mandatory_protocols = SSLv3, TLSv1
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = hash:/etc/postfix/virtual

Any suggestions would be appreciated.

3
  • 2
    Post your master.cf. – Michael Hampton Jul 16 '14 at 20:07
  • 1
    You need the master.cf and your mapping files as well. You have a mapping issue - it's fairly visible in the first error message. – Avery Payne Jul 16 '14 at 20:08
  • Thanks for responding guys. I found a solution though, which I will post below. – neanderslob Jul 16 '14 at 20:45
0

I got a response on the Virtualmin forum that worked like a charm.

In summary, the issue was indeed in /etc/postfix/main.cf, as was suggested by the folks above. I ended up commenting out the following line:

#sender_dependent_default_transport_maps = hash:/etc/postfix/virtual

did a service postfix restart and now my email works perfectly.

Thanks for the comments above and hope this might help someone in the future.

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.