Had the same error after @mail upgrade:
Could not send message to SMTP server. Check you have access to send messages via the server and that all To/CC/BCC addresses are valid\nError: SMTP Server rejected email. Returned:553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
Seemed like @mail didn't authenticate when trying to send the email. After searching through the sources found that in the @mail config file (/var/www/atmail/libs/Atmail/Config.php) there is an option to authenticate with an username/password
'smtpauth_password' => '',
'smtpauth_username' => '',
by default they're empty.
if you put here a valid username and password, the messages will be sent.
The problem is that I wanted that the users authenticate with their own credentials when sending messages.
So here's the way I fixed it:
Open the file /var/www/atmail/libs/Atmail/SendMsg.php
Search for the line "// Optionally authenticate with the SMTP server"
(it's about line 740)
Add bellow:
$auth =& $atmail->getAuthObj();
$pref['smtpauth_username'] = $auth->Account;
$pref['smtpauth_password'] = $auth->password;
That's it. This will override the auth settings from Config.php with the credentials the user used to log in.
Hope that will help the others.