# postfix smtp relay fail after recent virtualmin upgrade

**URL:** <https://forum.virtualmin.com/t/postfix-smtp-relay-fail-after-recent-virtualmin-upgrade/47185>\
**Category:** Virtualmin\
**Created:** [November 14, 2013, 2:55am UTC](https://forum.virtualmin.com/t/postfix-smtp-relay-fail-after-recent-virtualmin-upgrade/47185 "2013-11-14T02:55:52Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![adminjay](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/a/6de8d8/32.png) [@adminjay](https://forum.virtualmin.com/u/adminjay)\
**Post date:** [November 14, 2013, 2:55am UTC](https://forum.virtualmin.com/t/postfix-smtp-relay-fail-after-recent-virtualmin-upgrade/47185/1 "2013-11-14T02:55:52Z")

</div>

after recent virtual min upgrade, postfix smtp authentication for outlook/thunderbird and other mail clients, getting error message relay access denied.

mail is sent and received from usermin properly, only the smtp authentication area is messed up after the upgrade and i can’t figure out why.

can post .cf files if needed

thanks in advance

---

<div class="post-metadata">

**Author:** ![Eric](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/e/898d66/32.png) [@Eric](https://forum.virtualmin.com/u/Eric)\
**Post date:** [November 14, 2013, 4:42am UTC](https://forum.virtualmin.com/t/postfix-smtp-relay-fail-after-recent-virtualmin-upgrade/47185/2 "2013-11-14T04:42:46Z")

</div>

Howdy,

Hmm, upgrading Virtualmin shouldn’t affect the Postfix configuration.

See your Postfix config would help – could you paste in the output of “postconf -n”?

-Eric

---

<div class="post-metadata">

**Author:** ![adminjay](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/a/6de8d8/32.png) [@adminjay](https://forum.virtualmin.com/u/adminjay)\
**Post date:** [November 14, 2013, 5:21am UTC](https://forum.virtualmin.com/t/postfix-smtp-relay-fail-after-recent-virtualmin-upgrade/47185/3 "2013-11-14T05:21:00Z")

</div>

thanks Eric and yes i never ever had a problem before, i been using the virtualmin GPL version on over 30 servers for over 6 years and nothing like this, i login and see things changed that shouldn’t be but i can’t figure out all the issues with this one server, thanks again.

`
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
fallback_relay =
home_mailbox = Maildir/
ignore_mx_lookup_error = yes
inet_interfaces = all
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
mydestination = ns313.atozstoresonline.info, localhost.atozstoresonline.info, , localhost
myhostname = ns313.atozstoresonline.info
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
sender_bcc_maps = hash:/etc/postfix/bcc
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_delay_reject = no
smtpd_sasl_auth_enable = yes
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = hash:/etc/postfix/virtual
postconf: warning: /etc/postfix/main.cf: unused parameter: smtpd_relay_restrictions=permit_mynetworks permit_sasl_authenticated reject_unauth_destination
`

---

<div class="post-metadata">

**Author:** ![Eric](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/e/898d66/32.png) [@Eric](https://forum.virtualmin.com/u/Eric)\
**Post date:** [November 14, 2013, 1:56pm UTC](https://forum.virtualmin.com/t/postfix-smtp-relay-fail-after-recent-virtualmin-upgrade/47185/4 "2013-11-14T13:56:57Z")

</div>

Howdy,

Hmm, it doesn’t appear that there is a `smtpd_recipient_restrictions` line in your /etc/postfix/main.cf.

Also, it appears that there is a line `smtpd_relay_restrictions`, containing what should be in the `smtpd_recipient_restrictions`.

Is it possible that someone accidentally changed that?

The smtpd\_relay\_restrictions parameter isn’t actually valid though, except on very recent Postfix versions – more recent than any Virtualmin distro provides by default.

In theory though, it may be as simple as renaming `smtpd_relay_restrictions` to `smtpd_recipient_restrictions`, and then restarting Postfix.

-Eric

---

<div class="post-metadata">

**Author:** ![adminjay](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/a/6de8d8/32.png) [@adminjay](https://forum.virtualmin.com/u/adminjay)\
**Post date:** [November 15, 2013, 4:20am UTC](https://forum.virtualmin.com/t/postfix-smtp-relay-fail-after-recent-virtualmin-upgrade/47185/5 "2013-11-15T04:20:00Z")

</div>

Hi Eric, i checked everything and i don’t see anyway it could have been changed manually, i don’t see any flags by our security dept. that monitors all traffic and no one here had changed it (2 other admins)

it was caused after a ubuntu update to 12.04.3  
Postfix version 2.9.6

are u able to make the change to the below that i can paste right into the cf file,.

`
main.cf
See /usr/share/postfix/main.cf.dist for a commented, more complete version
Debian specific: Specifying a file name will cause the first
line of that file to be used as the name. The Debian default
is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
appending .domain is the MUA’s job.
Uncomment the next line to generate “delayed mail” warnings
#delay_warning_time = 4h
readme_directory = no
TLS parameters
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
See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
information on enabling SSL in the smtp client.
myhostname = ns313.atozstoresonline.info
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = ns313.atozstoresonline.info, localhost.atozstoresonline.info, , localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
virtual_alias_maps = hash:/etc/postfix/virtual
sender_bcc_maps = hash:/etc/postfix/bcc
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
ignore_mx_lookup_error = yes
fallback_relay =
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtpd_delay_reject = no
`

---

<div class="post-metadata">

**Author:** ![Eric](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/e/898d66/32.png) [@Eric](https://forum.virtualmin.com/u/Eric)\
**Post date:** [November 15, 2013, 2:39pm UTC](https://forum.virtualmin.com/t/postfix-smtp-relay-fail-after-recent-virtualmin-upgrade/47185/6 "2013-11-15T14:39:18Z")

</div>

Hmm, that’s very odd! Ubuntu 12.04 is one of the most common distros running Virtualmin, and I use that for the majority of my systems – but we hadn’t received any reports of that happening before.

That parameter isn’t valid on that Postfix version, so if that happened to anyone else, it would have broken their installation as well.

The fix should be straight forward though – you’d just need to find this line:

`smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination`

And change it to read as follows:

`smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination`

And then restart Postfix:

`/etc/init.d/postfix restart`

Let us know if that fixes it up for you!

-Eric

---

<div class="post-metadata">

**Author:** ![adminjay](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/a/6de8d8/32.png) [@adminjay](https://forum.virtualmin.com/u/adminjay)\
**Post date:** [November 17, 2013, 12:47am UTC](https://forum.virtualmin.com/t/postfix-smtp-relay-fail-after-recent-virtualmin-upgrade/47185/7 "2013-11-17T00:47:55Z")

</div>

Hi Eric, it fixed the relay message but when email is to be sent it pops up with bad username/password instead now, wonder if someone tried to fix the relay issue and turned off something else but the server receives mail and users can send mail using usermin but not smtp through outlook, thunderbird, etc.,

---

<div class="post-metadata">

**Author:** ![Eric](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/e/898d66/32.png) [@Eric](https://forum.virtualmin.com/u/Eric)\
**Post date:** [November 18, 2013, 1:59pm UTC](https://forum.virtualmin.com/t/postfix-smtp-relay-fail-after-recent-virtualmin-upgrade/47185/8 "2013-11-18T13:59:23Z")

</div>

Howdy,

When that happens, what error shows up in the email log in /var/log/mail.log?

-Eric

---

<div class="post-metadata">

**Author:** ![adminjay](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/a/6de8d8/32.png) [@adminjay](https://forum.virtualmin.com/u/adminjay)\
**Post date:** [November 18, 2013, 8:12pm UTC](https://forum.virtualmin.com/t/postfix-smtp-relay-fail-after-recent-virtualmin-upgrade/47185/9 "2013-11-18T20:12:47Z")

</div>

Nov 18 13:06:29 ns313 postfix/smtpd[3116]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory  
Nov 18 13:06:29 ns313 postfix/smtpd[3114]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory  
Nov 18 13:06:29 ns313 postfix/smtpd[3114]: warning: [50-202-171-113-static.hfc.comcastbusiness.net](http://50-202-171-113-static.hfc.comcastbusiness.net)[50.202.171.113]: SASL LOGIN authentication failed: generic failure  
Nov 18 13:06:29 ns313 postfix/smtpd[3116]: warning: [50-202-171-113-static.hfc.comcastbusiness.net](http://50-202-171-113-static.hfc.comcastbusiness.net)[50.202.171.113]: SASL LOGIN authentication failed: generic failure  
Nov 18 13:06:29 ns313 postfix/smtpd[3114]: lost connection after AUTH from [50-202-171-113-static.hfc.comcastbusiness.net](http://50-202-171-113-static.hfc.comcastbusiness.net)[50.202.171.113]  
Nov 18 13:06:29 ns313 postfix/smtpd[3114]: disconnect from [50-202-171-113-static.hfc.comcastbusiness.net](http://50-202-171-113-static.hfc.comcastbusiness.net)[50.202.171.113]  
Nov 18 13:06:29 ns313 postfix/smtpd[3116]: lost connection after AUTH from [50-202-171-113-static.hfc.comcastbusiness.net](http://50-202-171-113-static.hfc.comcastbusiness.net)[50.202.171.113]  
Nov 18 13:06:29 ns313 postfix/smtpd[3116]: disconnect from [50-202-171-113-static.hfc.comcastbusiness.net](http://50-202-171-113-static.hfc.comcastbusiness.net)[50.202.171.113]

here is a error from the log

looks like a director is missing for SASL authentication

---

<div class="post-metadata">

**Author:** ![Locutus](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/l/90ced4/32.png) [@Locutus](https://forum.virtualmin.com/u/Locutus)\
**Post date:** [November 20, 2013, 9:43am UTC](https://forum.virtualmin.com/t/postfix-smtp-relay-fail-after-recent-virtualmin-upgrade/47185/10 "2013-11-20T09:43:50Z")

</div>

It looks like your SASL installation is incorrect… What output do you get for these command?

`ps aux | grep sasl
which saslauthd`

I’m surprised a simple Ubuntu update should cause all this to happen. I have serious doubts that an update modifies your main.cf and replaces the client\_restrictions directive with relay\_restrictions, that doesn’t make any sense.

IF there is an update that modifies the config (it can happen - when there’s a new config file in the package), you’re asked if you want to keep your version of the config, use the new package one, or merge the two. And the default action (which is applied during unattended updates) is to keep the existing config.

---

<div class="post-metadata">

**Author:** ![adminjay](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/a/6de8d8/32.png) [@adminjay](https://forum.virtualmin.com/u/adminjay)\
**Post date:** [November 20, 2013, 11:37pm UTC](https://forum.virtualmin.com/t/postfix-smtp-relay-fail-after-recent-virtualmin-upgrade/47185/11 "2013-11-20T23:37:23Z")

</div>

that was the case and i chose new package without thinking about it

3741 0.0 0.1 4388 804 pts/0 S+ 18:23 0:00 grep --color=auto sasl

this is what i get for the command.

---

<div class="post-metadata">

**Author:** ![Locutus](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/l/90ced4/32.png) [@Locutus](https://forum.virtualmin.com/u/Locutus)\
**Post date:** [November 21, 2013, 1:04am UTC](https://forum.virtualmin.com/t/postfix-smtp-relay-fail-after-recent-virtualmin-upgrade/47185/12 "2013-11-21T01:04:46Z")

</div>

Okay, looks like the saslauthd is not running. What about the second command I listed?

---

<div class="post-metadata">

**Author:** ![adminjay](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/a/6de8d8/32.png) [@adminjay](https://forum.virtualmin.com/u/adminjay)\
**Post date:** [November 21, 2013, 1:28am UTC](https://forum.virtualmin.com/t/postfix-smtp-relay-fail-after-recent-virtualmin-upgrade/47185/13 "2013-11-21T01:28:19Z")

</div>

/usr/sbin/

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [April 30, 2020, 5:59am UTC](https://forum.virtualmin.com/t/postfix-smtp-relay-fail-after-recent-virtualmin-upgrade/47185/14 "2020-04-30T05:59:22Z")

</div>

Closed on April 30, 2020, 5:59am UTC


