My Mautic version is: 3.10
My PHP version is: 7.2
I have queued 11.000 emails. Then I went to the server and I executed manually:
/usr/bin/php -q /var/www/clients/client1/web4/web/mautic/bin/console mautic:emails:send --no-interaction --no-ansi -vvv > err.log 2>&1
I got errors, not in log, but from console execution.
It is not clear to me how many emails have been sent to users, and either messages are warnings or have crashed console.
I’m not even able to find LoggerPlugin.php in the app
These errors are showing in the log (from execution):
In LoggerPlugin.php line 124:
Expected response code 250 but got code “503”, with message "503 5.5.1 Error: nested MAIL comma
++ Starting Swift_Transport_EsmtpTransport
<< 220 mail-fast1.merqurio.net ESMTP Postfix
I have my own smtp server (postfix), but I think whatever the error messages coming from mail servers and reported from postfix, Mautic shouldn’t crash.
Moreover I’m not able to understand how many emails have been sent.
The answer to this will be in your postfix mail logs. An exception like this will stop Mautic from sending unless you modify the code in such a way that permits the process to skip the problem mail command.
The error means that the code is trying to send an email with several “ MAIL FROM” commands , which is not valid for SMTP server (there can be only one “ MAIL FROM” command for an email message).
This is generally caused by some sort of proxy which would appear in your ect/postfix/master.cf or main.cf as something like -o content_filter=smtp-amavis:[127.0.0.1]:10026 within the submission portion.
Antispam stuff, maybe even related to spam assassin depending on how its configured. Upon submission from Swift to Postfix you may be channeling mail submissions through the filter before it gets to Postfix and it rewrites or garbles the proper Mail From
If you have root access to your server check var/spool/postfix
In the postfix folder there will be folders like active, bounce, defer, deferred and so on. Most likely you will find the answer in there
Postfix is working well. We send 500k/day emails with it with other tools. We are trying to switch to Mautic.
My issue is that Mautic is crashing, while I would expect that it ignores wrong emails and goes on sending all others.
Sending emails to 300k business users, it’s quite common that some emails become invalid, but this shouldn’t invalidate the entire sending.
I think that there is a bug making Mautic crash, and I would like to find it and maybe solve it.
I am searching for some help to find the place where the bug is, as I don’t know Mautic source base.
I don’t think its a postfix issue per say either, but it is probably an issue of how swiftmailer submits the mail to postfix in its current configuration. I did research your log errors and those cases indicated the same. Its up to you if you want to explore that avenue.
You can research "503 5.5.1 Error: nested MAIL command"
You can also post your: ect/postfix/master.cf and ect/postfix/main.cf if you are comfortable doing so to see if a configuration error can be spotted. The most helpful would be to post your var/log/maillog entries that occurred during this send.
I am investigating this issue.
I still think that no error message should crash Mautic, and that they should be logged and presented in a report of incorrect contacts.
Do you know where in the code are stored all possible erros?