only root can send out mail by postfix
Posted
by
Arash
on Super User
See other posts from Super User
or by Arash
Published on 2012-06-15T20:46:02Z
Indexed on
2012/06/15
21:19 UTC
Read the original article
Hit count: 291
postfix
I have postfix installed and running. The problem is only root can send email. other users failed to do. Here is the log for user www-data which is a web server application. (the same error for other users)
postfix/smtp[32003]: 513765FEB9: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:11125, delay=2.1, delays=0.07/0/1.7/0.32, dsn=5.0.0, status=bounced (host 127.0.0.1[127.0.0.1] said: 550-Verification failed for <[email protected]> 550-Unrouteable address 550 Sender verify failed (in reply to RCPT TO command))
here is the /etc/postfix/main.cf:
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
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $myhostname, localhost.$mydomain, localhost
relayhost = [127.0.0.1]:11125
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/lizard_password
smtp_sasl_security_options =
mynetworks = 127.0.0.1/8 [::ffff:127.0.0.1]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = loopback-only
myorigin = /etc/mailname
mydestination = $myhostname, localhost.$mydomain, localhost
inet_protocols = ipv4
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
and here is the section that I added to the /etc/stunnel/stunnel.conf:
[smtp-tls-wrapper]
accept = 11125
client = yes
connect = smtp.mydomain.com:465
I appreciate any help.
© Super User or respective owner