Recently When I switch my mail server to Atmail from horde I am getting the following error :
"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) "Cause :
It is due to the Atmail didn't authenticate when trying to send the email.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"
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.
Thank You for the time to read it, hope this will help you