Postfix 454 4.7.1 Relay access denied

2 posts / 0 new
Last post
#1 Thu, 07/05/2018 - 17:22
wiserock

Postfix 454 4.7.1 Relay access denied

I have relatively new installation of Webmin 1.881/Virtualmin 6.03 on Centos 7.4 1708 . I created few virtual servers. The problem is that I can't send emails from client Thunderbird neither from roundcube. The email receiving works without problem. When sending I got error Postfix "454 4.7.1 Relay access denied" in email client. I added my domains to mydomains but this didn't help.

My Postfix configuration is this:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
allow_percent_hack = no
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 = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
home_mailbox = Maildir/
html_directory = no
inet_protocols = all
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
milter_default_action = accept
milter_protocol = 2
mydestination = $myhostname, localhost.$mydomain, localhost, host.xxxxx.si, mail.xxxxx.si, mail.yyyyy.si
mydomain = mail.xxxxx.si
myhostname = host.xxxxx.si
mynetworks = 192.168.0.10/32, 127.0.0.0/8, 192.168.0.18/32, 192.168.0.12/32
newaliases_path = /usr/bin/newaliases.postfix
non_smtpd_milters = inet:localhost:8891
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sender_bcc_maps = hash:/etc/postfix/bcc
sender_dependent_default_transport_maps = hash:/etc/postfix/dependent
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_tls_security_level = may
smtpd_milters = inet:localhost:8891
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated permit_inet_interfaces
smtpd_relay_restrictions = permit_mynetworks defer_unauth_destination permit_sasl_authenticated permit_inet_interfaces
smtpd_tls_CAfile = /etc/postfix/postfix.ca.pem
smtpd_tls_cert_file = /etc/postfix/postfix.cert.pem
smtpd_tls_key_file = /etc/postfix/postfix.key.pem
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_security_level = may
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual

This is the logs error:

Jul  6 11:07:28 93-103-146-76 postfix/smtpd[15974]: connect from xxx.aaa.bbb.si[178.216.xxx.yyy]
Jul  6 11:07:35 93-103-146-76 postfix/smtpd[15974]: NOQUEUE: reject: RCPT from xxx.aaa.bbb.si[178.216.xxx.yyy]: 454 4.7.1 <info@sdomain.si>: Relay access denied; from=<info@xxxxx.si> to=<info@domain.si> proto=ESMTP helo=<[127.0.0.1]>
Jul  6 11:07:38 93-103-146-76 postfix/smtpd[15974]: disconnect from xxx.aaa.bbb.si[178.216.xxx.yyy]

Thank you for any suggestion!

Fri, 07/06/2018 - 17:29
wiserock

I think error was in line:

smtpd_relay_restrictions = permit_mynetworks defer_unauth_destination permit_sasl_authenticated permit_inet_interfaces

I change it to:

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated permit_inet_interfaces defer_unauth_destination