My Mautic version is: 4.2
My PHP version is: 7.4.3
My Database type and version is: MariaDB 10.3.34
I just installed a fresh new version of Mautic 4.2 on my Nginx VPS and noticed I can’t send emails out (below error log).
I have also setup a registration form. When a user register a new contact is created in Mautic, but confirmation email won’t be sent out (below error log in italic)
These errors are showing in the log:
[2022-03-29 15:15:26] mautic.WARNING: PHP Warning - require(/home/mautik/public_html/var/cache/prod/doctrine/orm/Proxies/__CG__MauticPluginBundleEntityPlugin.php): failed to open stream: No such file or directory - in file /home/mautik/public_html/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php - at line 187 {“className”:“Mautic\PluginBundle\Entity\Plugin”,“classMetadata”:"[object] (Doctrine\ORM\Mapping\ClassMetadata: Doctrine\ORM\Mapping\ClassMetadataInfo@0000000035cca50c0000000055410c9d)",“proxyClassName”:“Proxies\CG\Mautic\PluginBundle\Entity\Plugin”,“fileName”:"/home/mautik/public_html/var/cache/prod/doctrine/orm/Proxies/__CG__MauticPluginBundleEntityPlugin.php"}
[2022-03-29 15:15:26] mautic.ERROR: PHP Notice: require(): Failed opening required ‘/home/mautik/public_html/var/cache/prod/doctrine/orm/Proxies/__CG__MauticPluginBundleEntityPlugin.php’ (include_path=’.:/usr/share/php’) - in file /home/mautik/public_html/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php - at line 187
[2022-03-29 15:15:26] mautic.ERROR: Symfony\Component\Debug\Exception\FatalErrorException: Notice: require(): Failed opening required ‘/home/mautik/public_html/var/cache/prod/doctrine/orm/Proxies/__CG__MauticPluginBundleEntityPlugin.php’ (include_path=’.:/usr/share/php’) - in file /home/mautik/public_html/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php - at line 187 [2022-03-29 14:19:34] mautic.WARNING: PHP Warning - mkdir(): File exists - in file /home/mautik/public_html/app/bundles/CoreBundle/IpLookup/AbstractLocalDataLookup.php - at line 179 {“dataDir”:"/home/mautik/public_html/var/cache/prod/…/ip_data"} []
Steps I have tried to fix the problem:
These are the things I’ve done, with no success
Checked my smpt configuration under /config/local.php and it’s correct.
I have deleted Mautic cache multiple times.
rm -rf var/cache/*
I have checked and reset folders/files permissions
So my user is called ‘mautik’.
$ ps aux | grep nginx
mautik 579 0.0 0.2 14624 4780 ? S Mar07 0:00 /usr/bin/perl /usr/bin/php-loop.pl /bin/php-cgi7.4 -b /var/php-nginx/16449968312950283.sock/socket
mautik 604 0.0 0.6 273856 12500 ? Ss Mar07 0:00 /bin/php-cgi7.4 -b /var/php-nginx/16449968312950283.sock/socket
root 221638 0.0 0.0 56780 1704 ? Ss Mar27 0:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
www-data 221639 0.0 0.3 60580 7648 ? S Mar27 0:54 nginx: worker process
mautik 607518 0.0 7.5 388556 154200 ? S Mar28 0:20 /bin/php-cgi7.4 -b /var/php-nginx/16449968312950283.sock/socket
mautik 609239 0.0 7.4 389664 151488 ? S Mar28 0:19 /bin/php-cgi7.4 -b /var/php-nginx/16449968312950283.sock/socket
mautik 611681 0.0 7.2 389656 146500 ? S Mar28 0:18 /bin/php-cgi7.4 -b /var/php-nginx/16449968312950283.sock/socket
mautik 625457 0.0 7.2 389988 146256 ? S Mar28 0:18 /bin/php-cgi7.4 -b /var/php-nginx/16449968312950283.sock/socketù
Before re installing the composer package I did run:
php bin/console mautic:cache:clear --env=prod
And I got the green light.
When testing email sending though, I got this message:
’ Uh oh! I think I broke it. If I do it again, please report me to the system administrator!
500 Internal Server Error’
I went on checking inside Nginx error.log and I found this:
2022/03/29 14:59:08 [error] 221639#221639: *53872 FastCGI sent in stderr: “PHP Warning: file_put_contents(/var/cache/prod/lastUpdateCheck.txt): failed to open stream: Permission denied in /app/bundles/CoreBundle/Helper/UpdateHelper.php on line 204” while reading response header from upstream, client: 94.17.252.118, server: mautik.briskby.com, request: “GET /s/themes?_=1648565812933&mauticUserLastActive=137 HTTP/2.0”, upstream: “fastcgi://unix:/var/php-nginx/16449968312950283.sock/socket:”, host: “mautik.briskby.com”, referrer: “Mautic”
2022/03/29 14:59:37 [error] 221639#221639: *53874 FastCGI sent in stderr: “PHP Warning: file_put_contents(/var/cache/prod/lastUpdateCheck.txt): failed to open stream: Permission denied in /app/bundles/CoreBundle/Helper/UpdateHelper.php on line 204” while reading response header from upstream, client: 94.17.252.118, server: mautik.briskby.com, request: “GET /s/dashboard HTTP/2.0”, upstream: “fastcgi://unix:/var/php-nginx/16449968312950283.sock/socket:”, host: “mautik.briskby.com”, referrer: “Mautic”
I then reset again all users/permission etc… and cleared the cache once again and it went back on working.
I tried again to send a test email, but nada. On the dashboard I get the ‘email sent successfully’ but nothing happens. Not even a log to check. Mute
I noticed cron jobs were enabled but I forgot to configure them.
Anyways, I bypassed the cron jobs by sending email immediately.
I tested the smtp and it responds successfully Screenshot by Lightshot (and I received the test email too).
When I do a proper test I though get errors as printed in the log herebelow:
[2022-03-29 22:16:01] mautic.ERROR: [MAIL ERROR] Expected response code 354 but got code “503”, with message "503-All RCPT commands were rejected with this error: 503-Unexisting, forged or unallowed sender address 503-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated 503-connection (mautic@briskby.com) 503 Valid RCPT command must precede DATA " Log data: ++ Starting Swift_Transport_EsmtpTransport << 220 mx1uk.supremebox.com ESMTP >> EHLO mautik.briskby.com << 250-mx1uk.supremebox.com Hello mautik.briskby.com [159.65.54.248] 250-SIZE 31457280 250-8BITMIME 250-PIPELINING 250-AUTH CRAM-MD5 PLAIN LOGIN 250-CHUNKING 250-STARTTLS 250 HELP >> AUTH LOGIN << 334 VXNlcm5hbWU6 >> bWF1dGljQGJyaXNrYnkuY29t << 334 UGFzc3dvcmQ6 >> NUhQRnp5OHA3JQ== << 235 Authentication succeeded ++ Swift_Transport_EsmtpTransport started >> MAIL FROM: >> RCPT TO: >> DATA << 250 OK << 550-Unexisting, forged or unallowed sender address 550-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated 550 connection (mautic@briskby.com) !! Expected response code 250/251/252 but got code “550”, with message "550-Unexisting, forged or unallowed sender address 550-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated 550 connection (mautic@briskby.com) " (code: 550) << 503-All RCPT commands were rejected with this error: 503-Unexisting, forged or unallowed sender address 503-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated 503-connection (mautic@briskby.com) 503 Valid RCPT command must precede DATA !! Expected response code 354 but got code “503”, with message "503-All RCPT commands were rejected with this error: 503-Unexisting, forged or unallowed sender address 503-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated 503-connection (mautic@briskby.com) 503 Valid RCPT command must precede DATA " (code: 503) Log data: ++ Starting Swift_Transport_EsmtpTransport << 220 mx1uk.supremebox.com ESMTP >> EHLO mautik.briskby.com << 250-mx1uk.supremebox.com Hello mautik.briskby.com [159.65.54.248] 250-SIZE 31457280 250-8BITMIME 250-PIPELINING 250-AUTH CRAM-MD5 PLAIN LOGIN 250-CHUNKING 250-STARTTLS 250 HELP >> AUTH LOGIN << 334 VXNlcm5hbWU6 >> bWF1dGljQGJyaXNrYnkuY29t << 334 UGFzc3dvcmQ6 >> NUhQRnp5OHA3JQ== << 235 Authentication succeeded ++ Swift_Transport_EsmtpTransport started >> MAIL FROM: >> RCPT TO: >> DATA << 250 OK << 550-Unexisting, forged or unallowed sender address 550-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated 550 connection (mautic@briskby.com) !! Expected response code 250/251/252 but got code “550”, with message "550-Unexisting, forged or unallowed sender address 550-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated 550 connection (mautic@briskby.com) " (code: 550) << 503-All RCPT commands were rejected with this error: 503-Unexisting, forged or unallowed sender address 503-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated 503-connection (mautic@briskby.com) 503 Valid RCPT command must precede DATA !! Expected response code 354 but got code “503”, with message "503-All RCPT commands were rejected with this error: 503-Unexisting, forged or unallowed sender address 503-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated 503-connection (mautic@briskby.com) 503 Valid RCPT command must precede DATA " (code: 503) !! Expected response code 354 but got code “503”, with message "503-All RCPT commands were rejected with this error: 503-Unexisting, forged or unallowed sender address 503-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated 503-connection (mautic@briskby.com) 503 Valid RCPT command must precede DATA " Log data: ++ Starting Swift_Transport_EsmtpTransport << 220 mx1uk.supremebox.com ESMTP >> EHLO mautik.briskby.com << 250-mx1uk.supremebox.com Hello mautik.briskby.com [159.65.54.248] 250-SIZE 31457280 250-8BITMIME 250-PIPELINING 250-AUTH CRAM-MD5 PLAIN LOGIN 250-CHUNKING 250-STARTTLS 250 HELP >> AUTH LOGIN << 334 VXNlcm5hbWU6 >> bWF1dGljQGJyaXNrYnkuY29t << 334 UGFzc3dvcmQ6 >> NUhQRnp5OHA3JQ== << 235 Authentication succeeded ++ Swift_Transport_EsmtpTransport started >> MAIL FROM: >> RCPT TO: >> DATA << 250 OK << 550-Unexisting, forged or unallowed sender address 550-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated 550 connection (mautic@briskby.com) !! Expected response code 250/251/252 but got code “550”, with message “550-Unexisting, forged or unallowed sender address 550-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated 550 connection (mautic@briskby.com) " (code: 550) << 503-All RCPT commands were rejected with this error: 503-Unexisting, forged or unallowed sender address 503-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated 503-connection (mautic@briskby.com) 503 Valid RCPT command must precede DATA !! Expected response code 354 but got code “503”, with message “503-All RCPT commands were rejected with this error: 503-Unexisting, forged or unallowed sender address 503-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated 503-connection (mautic@briskby.com) 503 Valid RCPT command must precede DATA " (code: 503) (code: 503) (send); teatrodoc@gmail.com {“exception”:”[object] (Swift_TransportException(code: 503): Expected response code 354 but got code “503”, with message “503-All RCPT commands were rejected with this error:\r\n503-Unexisting, forged or unallowed sender address\r\n503-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated\r\n503-connection (mautic@briskby.com)\r\n503 Valid RCPT command must precede DATA\r\n”\nLog data:\n++ Starting Swift_Transport_EsmtpTransport\n<< 220 mx1uk.supremebox.com ESMTP\r\n\n>> EHLO mautik.briskby.com\r\n\n<< 250-mx1uk.supremebox.com Hello mautik.briskby.com [159.65.54.248]\r\n250-SIZE 31457280\r\n250-8BITMIME\r\n250-PIPELINING\r\n250-AUTH CRAM-MD5 PLAIN LOGIN\r\n250-CHUNKING\r\n250-STARTTLS\r\n250 HELP\r\n\n>> AUTH LOGIN\r\n\n<< 334 VXNlcm5hbWU6\r\n\n>> bWF1dGljQGJyaXNrYnkuY29t\r\n\n<< 334 UGFzc3dvcmQ6\r\n\n>> NUhQRnp5OHA3JQ==\r\n\n<< 235 Authentication succeeded\r\n\n++ Swift_Transport_EsmtpTransport started\n>> MAIL FROM:\r\n\n>> RCPT TO:\r\n\n>> DATA\r\n\n<< 250 OK\r\n\n<< 550-Unexisting, forged or unallowed sender address\r\n550-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated\r\n550 connection (mautic@briskby.com)\r\n\n!! Expected response code 250/251/252 but got code “550”, with message “550-Unexisting, forged or unallowed sender address\r\n550-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated\r\n550 connection (mautic@briskby.com)\r\n” (code: 550)\n<< 503-All RCPT commands were rejected with this error:\r\n503-Unexisting, forged or unallowed sender address\r\n503-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated\r\n503-connection (mautic@briskby.com)\r\n503 Valid RCPT command must precede DATA\r\n\n!! Expected response code 354 but got code “503”, with message “503-All RCPT commands were rejected with this error:\r\n503-Unexisting, forged or unallowed sender address\r\n503-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated\r\n503-connection (mautic@briskby.com)\r\n503 Valid RCPT command must precede DATA\r\n” (code: 503)\nLog data:\n++ Starting Swift_Transport_EsmtpTransport\n<< 220 mx1uk.supremebox.com ESMTP\r\n\n>> EHLO mautik.briskby.com\r\n\n<< 250-mx1uk.supremebox.com Hello mautik.briskby.com [159.65.54.248]\r\n250-SIZE 31457280\r\n250-8BITMIME\r\n250-PIPELINING\r\n250-AUTH CRAM-MD5 PLAIN LOGIN\r\n250-CHUNKING\r\n250-STARTTLS\r\n250 HELP\r\n\n>> AUTH LOGIN\r\n\n<< 334 VXNlcm5hbWU6\r\n\n>> bWF1dGljQGJyaXNrYnkuY29t\r\n\n<< 334 UGFzc3dvcmQ6\r\n\n>> NUhQRnp5OHA3JQ==\r\n\n<< 235 Authentication succeeded\r\n\n++ Swift_Transport_EsmtpTransport started\n>> MAIL FROM:\r\n\n>> RCPT TO:\r\n\n>> DATA\r\n\n<< 250 OK\r\n\n<< 550-Unexisting, forged or unallowed sender address\r\n550-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated\r\n550 connection (mautic@briskby.com)\r\n\n!! Expected response code 250/251/252 but got code “550”, with message “550-Unexisting, forged or unallowed sender address\r\n550-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated\r\n550 connection (mautic@briskby.com)\r\n” (code: 550)\n<< 503-All RCPT commands were rejected with this error:\r\n503-Unexisting, forged or unallowed sender address\r\n503-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated\r\n503-connection (mautic@briskby.com)\r\n503 Valid RCPT command must precede DATA\r\n\n!! Expected response code 354 but got code “503”, with message “503-All RCPT commands were rejected with this error:\r\n503-Unexisting, forged or unallowed sender address\r\n503-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated\r\n503-connection (mautic@briskby.com)\r\n503 Valid RCPT command must precede DATA\r\n” (code: 503)\n!! Expected response code 354 but got code “503”, with message “503-All RCPT commands were rejected with this error:\r\n503-Unexisting, forged or unallowed sender address\r\n503-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated\r\n503-connection (mautic@briskby.com)\r\n503 Valid RCPT command must precede DATA\r\n”\nLog data:\n++ Starting Swift_Transport_EsmtpTransport\n<< 220 mx1uk.supremebox.com ESMTP\r\n\n>> EHLO mautik.briskby.com\r\n\n<< 250-mx1uk.supremebox.com Hello mautik.briskby.com [159.65.54.248]\r\n250-SIZE 31457280\r\n250-8BITMIME\r\n250-PIPELINING\r\n250-AUTH CRAM-MD5 PLAIN LOGIN\r\n250-CHUNKING\r\n250-STARTTLS\r\n250 HELP\r\n\n>> AUTH LOGIN\r\n\n<< 334 VXNlcm5hbWU6\r\n\n>> bWF1dGljQGJyaXNrYnkuY29t\r\n\n<< 334 UGFzc3dvcmQ6\r\n\n>> NUhQRnp5OHA3JQ==\r\n\n<< 235 Authentication succeeded\r\n\n++ Swift_Transport_EsmtpTransport started\n>> MAIL FROM:\r\n\n>> RCPT TO:\r\n\n>> DATA\r\n\n<< 250 OK\r\n\n<< 550-Unexisting, forged or unallowed sender address\r\n550-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated\r\n550 connection (mautic@briskby.com)\r\n\n!! Expected response code 250/251/252 but got code “550”, with message “550-Unexisting, forged or unallowed sender address\r\n550-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated\r\n550 connection (mautic@briskby.com)\r\n” (code: 550)\n<< 503-All RCPT commands were rejected with this error:\r\n503-Unexisting, forged or unallowed sender address\r\n503-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated\r\n503-connection (mautic@briskby.com)\r\n503 Valid RCPT command must precede DATA\r\n\n!! Expected response code 354 but got code “503”, with message “503-All RCPT commands were rejected with this error:\r\n503-Unexisting, forged or unallowed sender address\r\n503-(mautic+bounce_624369019bfb4759895462@briskby.com) used with authenticated\r\n503-connection (mautic@briskby.com)\r\n503 Valid RCPT command must precede DATA\r\n” (code: 503) (code: 503) at /home/mautik/public_html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/LoggerPlugin.php:124)”}
I setup a SendGrid account, validated my domain (on CF) and connected to Mautic via SendGrid API. I finally managed to deliver my first custom email.
It seems to me there’s an issue in Mautic SMTP relay when it comes to ‘other smtp’.
When testing an email from under Configuration → Email settings I am able to receive it.
When sending a custom email (haven’t tried a mass/campaign mailing) it looks like Mautic is unable to use the settings as saved under Configuration → Email settings and it returns this errors.
mautic.ERROR: [MAIL ERROR] Expected response code 354 but got code “503”, with message "503-All RCPT commands were rejected with this error: 503-Unexisting, forged or unallowed sender address 503
Mautic seems to have issues with ‘other smtp servers’ type of configuration, regardless of the configuration. I tried with and without SSL, different ports etcc… It does work on test mode, but when sending actual emails ‘send a custom email to…’ it looks like it ignores the general settings and returns and error.
Different story if you use a SMTP gateway, like Sendgrid, as it is working for me now (but not the choice I’d make as I want to use my SMTP server).
For a while I think I used Other SMTP option only in dev. environment, but it worked at the time. Maybe I will test it again just to see the situation. Thanks for pointing it out @wlsfh
I still have the issue, i opened a ticket but it was forgotten, and i gave up; I only have “other smpt” relays, so if this is the issue i won’t be able to use mautic for the time being
Hello, I just like to say I had this same issue with the 550 errors when having mautic send out an email, I put in a ticket to my hosting support team showing them the error message along with the log file that offers the same information. They did some fixing on their mail server itself and after that, everything was back to operating without any errors. Sometimes these errors are directly related to hardware / the web hosting that you have no control over. I am using my own SMTP from my web hosting server with my domain. This also has the same issues if you are trying to use your email with a 3rd party application that also is listed with Mautic. It always starts at the hosting where your domain is setup and where your email was created. If something happens with errors with email for sending or receiving I would check with your hosting support people next time. Saves a lot of time and frustration.