Article 5HGHB Postfix 454 4.7.1 Relay access denied (in reply to RCPT TO command))

Postfix 454 4.7.1 Relay access denied (in reply to RCPT TO command))

by
riahc3
from LinuxQuestions.org on (#5HGHB)
Hello

Im trying to send email from a email relay in Postfix.

Basically I have two Postfix installed: One (A) is trying to send email and the other (B) is attached pointing to a Office 365.

The other one (B) is configured correctly but when I try to send emails from A, I get:

Postfix 454 4.7.1 Relay access denied (in reply to RCPT TO command))

Both Postfix have a name of SERVER1.internaldomain.net and SERVER2.internaldomain.net

The email address I trying to send from is email@externaldomain.com

The email adddres I am trying to send email TO is email@anotherexternaldomain.com

This is my main.cf on SERVER1:

Code: queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
inet_interfaces = $myhostname, localhost
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost
unknown_local_recipient_reject_code = 550
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
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
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.10.1/samples
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
myhostname = SERVER1.internaldomain.net
relayhost = [SERVER2.internaldomain.net]
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_CAfile = /etc/ssl/certs/ca-bundle.crt
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_generic_maps = hash:/etc/postfix/genericlatest?d=yIl2AUoC8zA latest?i=IYfBRRyWYw0:hrP4ltA1Ax0:F7zBnMy latest?i=IYfBRRyWYw0:hrP4ltA1Ax0:V_sGLiP latest?d=qj6IDK7rITs latest?i=IYfBRRyWYw0:hrP4ltA1Ax0:gIN9vFwIYfBRRyWYw0
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments