I am trying to use Zoho SMTP servers to send registration emails from a MyBB installation. However, emails are never sent, and when I check the logs, I notice that there is an error.
Month Day Year:Hour:Minute host=smtp.zoho.com tls=on auth=on user=user[at]mydomain.com from=user[at]mydomain.com recipients=some.user[at]gmail.com smtpstatus=553 smtpmsg='553 Relaying disallowed' errormsg='the server did not accept the mail' exitcode=EX_UNAVAILABLE
(Some parts disguised to hide personal information!)
This is the path of the sendmail path in php.ini
sendmail_path = "/usr/bin/msmtp -C /etc/msmtp/myserver --logfile /var/log/msmtp/myserver.log -a default -t"
(Some parts disguised to hide personal information!)
This is the myserver configuration for MSMTP
defaults
logfile /var/log/msmtp/general.log
account default
protocol smtp
host smtp.zoho.com
tls on
tls_starttls off
tls_certcheck off
port 465
auth plain
user user[at]mydomain.com
password **********
from user[at]mydomain.com
logfile /var/log/msmtp/myserver.log
(Some parts disguised to hide personal information!)
The problem is that I know that it works, and that none of the ports are blocked, because when I use the same command on the command line. Email successfully sent and received.
sudo echo -e "Subject: Test Mail\r\n\r\nThis is a test mail" | msmtp --debug -a default --from=user[at]mydomain.com -t some.user[at]gmail.com --file=/etc/msmtp/myserver
(Some parts disguised to hide personal information!)
This means that it is either wrong that MyBB is sending emails, or something is wrong with my configuration or the PHP command line that I installed in the php.ini file.
, , , PHP, . , PHP.
UFW , , , .
Gmail, , .
EDIT:
PHP5-CLI, . , - PHP5-FPM MyBB.