Postfix issue



I configured my postfix server to relay local messages to my Dreamhost SMPT server.

However it doesn’t work.
mail.log says:

Dec 28 17:44:26 vmtest postfix/pickup[2473]: 8942843BDC: uid=0 from=<> Dec 28 17:44:26 vmtest postfix/cleanup[2502]: 8942843BDC: message-id=<> Dec 28 17:44:26 vmtest postfix/qmgr[2474]: 8942843BDC: from=<>, size=340, nrcpt=1 (queue active) Dec 28 17:44:28 vmtest postfix/smtp[2504]: 8942843BDC: to=<>,[]:587, delay=2.2, delays=0.02/0.01/2/0.17, dsn=5.7.1, status=bounced (host[] said: 554 5.7.1 <[]>: Client host rejected: Access denied (in reply to RCPT TO command)) Dec 28 17:44:28 vmtest postfix/cleanup[2502]: 8942811BDC: message-id=<> Dec 28 17:44:28 vmtest postfix/qmgr[2474]: 8942811BDC: from=<>, size=2260, nrcpt=1 (queue active) Dec 28 17:44:28 vmtest postfix/bounce[2506]: 8942843BDC: sender non-delivery notification: 8942811BDC Dec 28 17:44:28 vmtest postfix/qmgr[2474]: 8942843BDC: removed Dec 28 17:44:29 vmtest postfix/smtp[2504]: 8942811BDC: to=<>,[]:587, delay=1.4, delays=0/0/1.2/0.18, dsn=5.7.1, status=bounced (host[] said: 554 5.7.1 <[]>: Client host rejected: Access denied (in reply to RCPT TO command)) Dec 28 17:44:30 vmtest postfix/qmgr[2474]: 8942811BDC: removed

I configured accoring this howto …

… except that I changed …
“mydestination =”

What did I do wrong?


I can’t find any mention of “mydestination =” in the tutorial you used. What’s happening is that the relay host is not accepting your mail. Most likely, the host you’re trying to connect to accepts only authenticated connections and you either aren’t providing the correct credentials or something else is going on. Too hard to tell without more details. Maybe share the full content of /etc/postfix/ somewhere?


You are right regarding “mydestination =”. I had to change this additionally due to postfix not being able at all to reach the DH SMTP server (mail.log entry “relay=local”).

root@vmtest:~# cat /etc/postfix/ smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no append_dot_mydomain = no readme_directory = no smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_use_tls=yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination myhostname = alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = relayhost = []:587 mynetworks = [::ffff:]/104 [::1]/128 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all inet_protocols = all smtp_sasl_auth_enable = yes smtp_sasl_security_options = noanonymous smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_use_tls = yes smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt


In fact, the problem was that I didn’t set the brackets around the server FQDN in “sasl_passwd”. So … “mydestination =” wasn’t relevant.

root@vmtest:~# cat /etc/postfix/sasl_passwd [<>]:587 <smpt_user>@<smtp_password>