Hi,
First, I checked that from the docker, I can reach the postfix machine and port and send emails :
root@d67a6a8d00c5:/var/www/html# s-nail -v -s "Test email" -S smtp=smtp://postfix.pub_net -S from="Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser." Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. host "postfix.pub_net:smtp" ... doneConnecting to "10.30.10.1:smtp" ...connected.
And the email has reached the mailbox. So the configuration is working. Here are the logs requested :
- configuration "connexion direct socket" :
- Success reported
- Non mail received
- No logs on the files/logs
- No logs (no connection) from postfix side
- Configuration PHPMailer
- Error reported : SMTP connect() failed.
- Non mail received
- Logs on the files/logs :
2021-01-10 21:22:26.312 ***** ERROR ***** [V9.0.1] Error sending mail
2021-01-10 21:22:26.312 ***** ERROR ***** [V9.0.1] SMTP Server : postfix.pub_net
2021-01-10 21:22:26.312 ***** ERROR ***** [V9.0.1] SMTP Port : 25
2021-01-10 21:22:26.312 ***** ERROR ***** [V9.0.1] Mail stored in Database : #138
2021-01-10 21:22:26.312 ***** ERROR ***** [V9.0.1] PHPMail error : SMTP connect() failed. github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
2021-01-10 21:22:26.312 ***** ERROR ***** [V9.0.1] PHPMail debug :
-
- No logs (no connection) from postfix side
- configuration "PHPMail" :
- Success reported
- Non mail received
- No logs on the files/logs
- No logs (no connection) from postfix side
I confirm that the $parameter.php is :
$paramLdap_user_filter = 'uid=%USERNAME%';
//$paramMailSmtpServer = 'localhost';
//$paramMailSmtpPort = '25';
//$paramMailSendmailPath = '';
$paramPasswordMinLength = '5';
$paramDefaultLocale = 'fr';
I can delete the lines but I kept it for now. Let me know but I think that the // will void the lines.
To answer your query, I checked that the software sendmail is existing in the docker:
root@3bf5e5927c46:/var/www/html# sendmailExim is a Mail Transfer Agent. It is normally called by Mail User Agents,not directly from a shell command line. Options and/or arguments controlwhat it does when called. For a list of options, see the Exim documentation.
When I add the sendmail path : /usr/sbin/sendmail, boht PHPMailer and PHPMail indicate a success but no email is sent. Same with /usr/sbin/. no error is indcated in the logs. I tried also to install and inidcate the mailx package, same results.
In fact, the mail sent indication is positive whatever directory is indicated. Even non existing directory. No logs are generated in that case. No email are sent. I find this quite strange so I tried ot localize the function in the source code but I failed to find it. Best regards,