Cannot send e-mail: 554 Relay Access Denied

12 posts / 0 new
Last post
#1 Fri, 08/05/2011 - 19:40

Cannot send e-mail: 554 Relay Access Denied

I did a fresh install today - new Ubuntu Linux, version: 8.04.4, then added Virtualmin as per:

After checking hostname and /etc/hosts I do not see where the problem can be; the host name matches.

When I send an e-mail from my client on my PC to the server I get the 554 5.7.1 'Relay access denied' error.

If I try to use alternative port then I get the 10061 connection refused error.

Fri, 08/05/2011 - 19:45


That can happen if your email client isn't setup to authenticate when sending outgoing email.

There should be a setting within your email client to tell it to use authentication whenever sending an outgoing email... though that's often disabled by default.

Once you enable that, you should then be able to send emails.


Fri, 08/05/2011 - 19:56

I checked the 'Authentication Allowed' box already.

Fri, 08/05/2011 - 20:05

Well, it's not just that authentication is allowed, it's required... there's another checkbox you're looking for, that tells your email client to pass in authentication each time it tries to send an outgoing email.

In Outlook Express, the option is called "My server requires authentication." in Outgoing Mail Server Settings.

In Outlook, it's "My outgoing server (SMTP) requires authentication" in the Outgoing Server tab.

In Thunderbird, you have to check the box next to Use name and password in the Security and Authentication tab.

There's different ways it's done in the various mail clients, and the various versions of them that have been released over the years... but if you get Relay Access Denied when trying to send an email, that's an indicator that your mail server doesn't think your client authenticated.


Fri, 08/05/2011 - 21:14

It is that old story of 'it worked before -' and nothing has changed with the e-mail client.

I have these possibilities:

checkbox Authentication allowed

checkbox Use relay personality, if defined

checkbox Use submission port (587)

Secure Sockets when Sending:

dropdown Never

dropdown If available, STARTTLS

dropdown Required, Alternate Port

dropdown Required, STARTTLS

For authentication, I only have the options of Passwords, Kerberos, APOP, and RPA.

If I use the option Use Submission Port 587 then I get the 10061 error instead.

Fri, 08/05/2011 - 22:07

The same client is working with a domain hosted on another server running CENTOS managed under CPanel, so I think it is a configuration issue between Ubuntu and Virtualmin.

Sat, 08/06/2011 - 09:10

Pass, please post the entire log passage from /var/mail.log when you try to send an email.

Sat, 08/06/2011 - 11:46

Here is the mail.warn log:

Aug 6 18:44:46 lvps178-77-77-44 postfix/smtpd[24020]: warning: SASL authentication failure: cannot connect to saslauthd server: Permission denied Aug 6 18:44:46 lvps178-77-77-44 postfix/smtpd[24020]: warning:[]: SASL LOGIN authentication failed: generic failure

Sat, 08/06/2011 - 12:28

Seems something is wrong with the sasl authentication daemon.

Is there a specific reason why you're using the three years old Ubuntu 8, and not Ubuntu 10? I'm using the latter and email works perfectly there on a fresh install.

Sat, 08/06/2011 - 13:47

It is what our hosting company pre-loads, unfortunately.

Sat, 08/06/2011 - 19:04

Got a chance to have them install Ubuntu 10 instead? Although this should work with Ubuntu 8 as well.

As for the sasl issue: I'm afraid I don't have much experience with that, Eric will hopefully be able to say more.

Sun, 08/07/2011 - 17:34

This is interesting: I did an upgrade to 10.4 LTS and that did not fix the problem.

I took the server offline, had our hosting company do a fresh install of the 8.04 LTS, did the update to 10.4 LTs and only then installed Virtualmin - and it worked.

Somehow, something is not working with Virtualmin on 8.04 and it is not fixed when you upgrade Ubuntu, but will work if Virtualmin is installed after the upgrade.

This took a night until 6 AM to work through, and I would still like to know what is causing this as I have another server on 8.04 to update.

Topic locked