View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Support us on Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - Unable to setup an SMTP on dockerized install - ProjeQtOr
 
 

Unable to setup an SMTP on dockerized install

More
04 Jan 2021 23:26 #1 by it@convexum.fr
HI, 

First thanks for the high quality of the software.

I have for test setup an install of the latest version 9.0.1 based on on the image: lavoweb/php-7.4. I can share if you want the docker-compose but I think that it is not really relevant.

I can not make the smtp section working (no email sent). My constraints are : 
SMTP with 587 to smept.ionos.fr
Login + passwords (containing char like %ù)

I tried the 3 options : 
- PHPMailer : 
The test function is indicating : 
SMTP connect() failed. github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

and the logs are showing :2021-01-04 22:32:37.334 ***** ERROR ***** [V9.0.1] Error sending mail2021-01-04 22:32:37.334 ***** ERROR ***** [V9.0.1]    SMTP Server : localhost2021-01-04 22:32:37.334 ***** ERROR ***** [V9.0.1]    SMTP Port : 252021-01-04 22:32:37.334 ***** ERROR ***** [V9.0.1]    Mail stored in Database : #332021-01-04 22:32:37.334 ***** ERROR ***** [V9.0.1]    PHPMail error : SMTP connect() failed. github.com/PHPMailer/PHPMailer/wiki/Troubleshooting2021-01-04 22:32:37.334 ***** ERROR ***** [V9.0.1]    PHPMail debug :- PHPMail indicate a success

- direct socket failed directly.

I try to bind it to a local (ie lan) smtpd with these 3 configurations (even with an open relay), but I did not get any success.  I expect the problem to be in the docker image and not on the software but I am quite surprised to not have logs of the two options.

I know that docker is not supported but I am looking for some options to follow up this issue. One main way would be to implement the SMTPDebug = SMTP::DEBUG_SERVER of PHPMailer (indicated in one thread on previous version) but I did not find were to enable it. 

Thanks in advance,

Please Log in or Create an account to join the conversation.

More
05 Jan 2021 00:38 #2 by babynus
Your connection fails with (as written is the log)
SMTP Server : localhost
SMTP Port : 25

It'n not what you expect.
Possibly you have extra data in parameters.php that ovewrites DB parameters.
Try and remove all SMTP parameters from parameter.php file.

Babynus
Administrator of ProjeQtOr web site
The following user(s) said Thank You: it@convexum.fr

Please Log in or Create an account to join the conversation.

More
09 Jan 2021 02:46 #3 by it@convexum.fr
Hu Babynus,

Thanks for your quick answer !
I dig into that and the things seems a bit more complex than expected.
I have remove the credential of the user to avoid any problem.

I can, from the docker, check that :
- sendmail is okay (existing using EXIM4).
- the EXIM package is not configured (expected as it is a docker)
- if I configure it in the docker, it is working fine locally (that will be my solution I think)

However, from a clean docker (i.e. no EXIM configured), whatever the configuration of projetqtor, it is impossible to send an email. I check that, from the docker even with the not configured EXIM, a remote smtp enabled mail (s-nail) MTA is okay to send email (i.e. I can connect to the smtp server and send the email).

I am a bit puzzled by that because all the proposed option (PHPMailer, PHPmail and direct socket) should be able to connect to the SMTP server directly. I still have errors just as they are trying to go using the local EXIM configuration.

I understand that my configuration is not really typical but I can try to provide you more data if you want.

How can I help to look into that and to provide you some information ?

Thanks !

Please Log in or Create an account to join the conversation.

More
09 Jan 2021 03:04 #4 by it@convexum.fr
Sorry I forgot to add that I have removed the parameters relating to SMTP that were left in the parameter.php and the logs is pointing that the address is now correct. Yet I still have the same issue on the SMTP.

The log is now : 2021-01-09 02:52:19.927 ***** ERROR ***** [V9.0.1] Error sending mail2021-01-09 02:52:19.927 ***** ERROR ***** [V9.0.1]    SMTP Server : postfix.pub_net2021-01-09 02:52:19.927 ***** ERROR ***** [V9.0.1]    SMTP Port : 252021-01-09 02:52:19.927 ***** ERROR ***** [V9.0.1]    Mail stored in Database : #1262021-01-09 02:52:19.927 ***** ERROR ***** [V9.0.1]    PHPMail error : SMTP connect() failed. github.com/PHPMailer/PHPMailer/wiki/Troubleshooting2021-01-09 02:52:19.927 ***** ERROR ***** [V9.0.1]    PHPMail debug :

The postfix address is resolving : 

 root@040029cc484e:/var/www/html/files# ping postfix.pub_netPING postfix.pub_net (10.30.10.15) 56(84) bytes of data.64 bytes from postfix.pub_net (10.30.10.15): icmp_seq=1 ttl=64 time=0.062 ms64 bytes from postfix.pub_net (10.30.10.15): icmp_seq=2 ttl=64 time=0.067 ms64 bytes from postfix.pub_net (10.30.10.15): icmp_seq=3 ttl=64 time=0.064 ms

and the direct delivery on the port 25 is okay (telnet cheked + email using s-nail). 

Voici le parameter.php : 

 <?php// =======================================================================================// Automatically generated parameter file// =======================================================================================$paramDbType = 'XXX;$paramDbHost = 'XXX;$paramDbPort = '3306';$paramDbUser =XXXX$paramDbPassword = XXXXX$paramDbName = 'projeqtor';$paramDbDisplayName = 'ProjeQtOr';$paramDbPrefix = '';$SslKey = '';$SslCert = '';$SslCa = '';$paramLdap_allow_login = 'false';$paramLdap_base_dn = 'dc=mydomain,dc=com';$paramLdap_host = 'localhost';$paramLdap_port = '389';$paramLdap_version = '3';$paramLdap_search_user = 'cn=Manager,dc=mydomain,dc=com';$paramLdap_search_pass = 'secret';$paramLdap_user_filter = 'uid=%USERNAME%';//$paramMailSmtpServer = 'localhost';//$paramMailSmtpPort = '25';$paramMailSendmailPath = '';$paramPasswordMinLength = '5';$paramDefaultLocale = 'fr';$paramDefaultTimezone = 'Europe/Paris';$currency = '€';$currencyPosition = 'after';$paramAttachmentDirectory = '../files/attach/';$documentRoot = '../files/documents/';$paramAttachmentMaxSize = '10485760';$AttachmentMaxSizeMail = '2097152';$paramReportTempDirectory = '../files/report/';$paramMemoryLimitForPDF = '512';$logFile = '../files/logs/projeqtor_${date}.log';$logLevel = '2';

 

Please Log in or Create an account to join the conversation.

More
09 Jan 2021 16:52 #5 by babynus
Please post the connection error message that is logged on projeqtor log file

Babynus
Administrator of ProjeQtOr web site

Please Log in or Create an account to join the conversation.

More
10 Jan 2021 22:28 #6 by it@convexum.fr
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="This email address is being protected from spambots. You need JavaScript enabled to view it." This email address is being protected from spambots. You need JavaScript enabled to view it. 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, 
 

Please Log in or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.043 seconds

Cookies settings

×

Functional Cookies

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Please login to see yours activities!

Other cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.