PHP - 553 Relay banned by Zoho and MyBB mail

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

# Define here some setting that can be useful for every account
defaults
    logfile /var/log/msmtp/general.log

# Settings for default account
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

# If you don't use any "-a" parameter in your command line,
# the default account "default" will be used.
# account default: default # (disabled because this gives a "redefined" error)

(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.

+4
1

MyBB, PHP, -f mail(), sendmail. , 5- ( , , 4-)

mail('nobody@example.com', 'the subject', 'the message', null,
'-flocaluserr@thisdomain.com'); 
0

Source: https://habr.com/ru/post/1540595/


All Articles