postifx -- Relay access denied error(outbound mail)

Hi,

I have setup Virtualmin GPL a few days back, and everything is working except for outbound mail, which goes from my mail server to an external mail server, using smtp authentication.

This is the error I keep getting:

postfix/qmgr[1758]: 3F709428057: from=test@test.com, size=5707, nrcpt=1 (queue active)

postfix/smtp[1793]: 3F709428057: to=recipient@hotmail.com, relay:25=relayserver.com, delay=1.4, delays=0.02/0.01/1.1/0.29, dsn=5.7.1, status=bounced (host relayserver.com said: 554 5.7.1 recipient@hotmail.com: Relay access denied (in reply to RCPT TO command))

This is the output of postconf -n:

alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases broken_sasl_auth_clients = yes command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix debug_peer_level = 2 home_mailbox = Maildir/ html_directory = no mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, $mydomain mynetworks = 127.0.0.0/8 newaliases_path = /usr/bin/newaliases.postfix readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES relayhost = [relayserver.com] sample_directory = /usr/share/doc/postfix-2.3.3/samples sender_bcc_maps = hash:/etc/postfix/bcc sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtp_sasl_mechanism_filter = plain,login smtp_sasl_password_maps = hash:/etc/postfix/passwd smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = unknown_local_recipient_reject_code = 550 virtual_alias_maps = hash:/etc/postfix/virtual

The domains can receive mail, but cannot send any outbound mail, as the external server throws up the error and rejects the mail. I am sending the mails using the Webmin interface.

Virtualmin was installed using the automated installer and the version is 3.79 GPL.

Howdy,

The short answer is that it sounds like your relay server requires some form of authentication.

You have two options there – you can either configure the relay server to trust your IP address, or you can configure Postfix to pass in a username and password while performing mail relaying.

-Eric

Hi,

The issue was resolved, it seems that there was a confusion in “smtp/smtpd” while typing in some entries in main.cf, of postfix.

For example I put in "smtpd_sasl_security_options = " whereas it should have been "smtp_sasl_security_options = " ; my bad. The outbound mail is relaying properly, now.