• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

php mail() don't work and no configuration menu ?

FlorianD_______

New Pleskian
Hi,

I'm experiecing some issue with the php function mail(). No mails can get out and no errors from php. Is there any menu where we can paramater this php function ?
Do I need to check up some services ?

CentOS 6.5 with Plesk 11.5
Fresh install

Thanks for your answers
 
Hi ForianD,

try the following command from Shell:
tail -f /usr/local/psa/var/log/maillog

Now call your mail() Function and see if it actually reaches the local Mailserver and why it might be dropped.
You can posts the output of the log here if you wish.

Regards,
Kristian
 
Hi,

Thanks for your reply

It seems that the local smtp server is trying to deliver the mail locally and not outside the server.
Is there a way to activate le smtp server to get outside ?

Mar 11 09:01:02 serverX postfix/pickup[5812]: E44BC1C8C05F: uid=10000 from=<laxxxxxxxxes>
Mar 11 09:01:02 serverX postfix/cleanup[10128]: E44BC1C8C05F: message-id=<[email protected]>
Mar 11 09:01:03 serverX postfix/qmgr[17680]: E44BC1C8C05F: from=<[email protected]>, size=438, nrcpt=1 (queue active)
Mar 11 09:01:03 serverX postfix-local[10261]: postfix-local: [email protected], [email protected], dirname=/var/qmail/mailnames
Mar 11 09:01:04 serverX postfix-local[10261]: cannot chdir to mailname dir florian: No such file or directory
Mar 11 09:01:04 serverX postfix-local[10261]: Unknown user: [email protected]
Mar 11 09:01:04 serverX postfix/pipe[10130]: E44BC1C8C05F: to=<[email protected]>, relay=plesk_virtual, delay=2.8, delays=2/0/0/0.85, dsn=2.0.0, status=sent (delivered via plesk_virtual service)
Mar 11 09:01:04 serverX postfix/qmgr[17680]: E44BC1C8C05F: removed
 
Hi,

try the following:
(Not sure it will work)

# /usr/local/psa/bin/domain -u domain.tld -mail_service false

As an alternative, which I have also never tried:
# /usr/local/psa/bin/domain -u domain.tld -mail_service_node_ip <IP address>

The first command is only suitable if there is absolutly no local Mailboxes for that domain on the Plesk Node.
The second one I'm not sure if it only works for PPA Envirourments or for all.

Please do give Feedback if either helped. I'd try the first solution first if thats possible.

Regards,
Kristian
 
It works !

I just understood that a domain that is configured as local website with external MX is concidered a being able to delivery by local smtp

Thanks for your help
 
Hi,

that is correct.
If I understood right you will be able to configure this within Plesk as of version 12.0.
So no CLI will be required as of then I hope :)

Regards,
Kristian
 
Hi i have a similiar Problem.
my out is:


[root@v37367 /]# tail -f /usr/local/psa/var/log/maillog

Aug 15 17:12:56 v37367 msmtp: host=smtp.1blu.de tls=on auth=on user=u188719_0-website from=admin_qt [email protected] errormsg='the server sent an empty reply' exitcode=EX_PROTOCOL



I cant send via php mail. My plesk is configured with MSMTP to use an external mail server.
 
Last edited:
Hi Kristian,

can you please tell me how and where I can deactivate TLS/SSL?

BR,
Ersan


Edit:

when using Port 25 in the settings the echo was:

Aug 15 18:56:58 v37367 msmtp: host=smtp.1blu.de tls=on auth=on user=u188719_0-website from=admin_qt [email protected] smtp status=501 smtpmsg='501 <admin_qt>: sender address must contain a domain' errormsg='envelope from address admin_qt not accepted by the ser ver' exitcode=EX_DATAERR

when using Port 465 in the settings the echo was:

Aug 15 19:00:13 v37367 msmtp: host=smtp.1blu.de tls=on auth=on user=u188719_0-website from=admin_qt [email protected] errormsg='the server sent an empty reply' exitcode=EX_PROTOCOL
 
Last edited:
Hi there,

I have a similar problem. I ran the above script and got this:

Aug 15 19:33:40 me plesk_saslauthd[5271]: client 10 processed
Aug 15 19:33:40 me plesk_saslauthd[5271]: main cycle iteration

Aug 15 19:33:40 me postfix/smtpd[5259]: warning: s15968772.onlinehome-server.info[217.160.252.130]: SASL LOGIN authentication failed: authentication failure
Aug 15 19:33:40 me postfix/smtpd[5259]: lost connection after AUTH from s15968772.onlinehome-server.info[217.160.252.130]
Aug 15 19:33:40 me postfix/smtpd[5259]: disconnect from s15968772.onlinehome-server.info[217.160.252.130]

Aug 15 19:34:10 me plesk_saslauthd[5271]: activity on 0 channel(s)
Aug 15 19:34:10 me plesk_saslauthd[5271]: select timeout, exiting

Aug 15 19:37:00 me postfix/anvil[5261]: statistics: max connection rate 1/60s for (smtp:87.106.75.70) at Aug 15 19:32:34
Aug 15 19:37:00 me postfix/anvil[5261]: statistics: max connection count 1 for (smtp:87.106.75.70) at Aug 15 19:32:34
Aug 15 19:37:00 me postfix/anvil[5261]: statistics: max cache size 1 at Aug 15 19:32:34
Aug 15 19:43:30 me postfix/smtpd[5410]: connect from 60-251-226-157.HINET-IP.hinet.net[60.251.226.157]
Aug 15 19:43:30 me postfix/smtpd[5410]: lost connection after CONNECT from 60-251-226-157.HINET-IP.hinet.net[60.251.226.157]
Aug 15 19:43:30 me postfix/smtpd[5410]: disconnect from 60-251-226-157.HINET-IP.hinet.net[60.251.226.157]
Aug 15 19:46:51 me postfix/anvil[5412]: statistics: max connection rate 1/60s for (smtp:60.251.226.157) at Aug 15 19:43:30
Aug 15 19:46:51 me postfix/anvil[5412]: statistics: max connection count 1 for (smtp:60.251.226.157) at Aug 15 19:43:30
Aug 15 19:46:51 me postfix/anvil[5412]: statistics: max cache size 1 at Aug 15 19:43:30

An authentication issue? How do I resolve this?
 
when using Port 25 in the settings the echo was:

Aug 15 18:56:58 v37367 msmtp: host=smtp.1blu.de tls=on auth=on user=u188719_0-website from=admin_qt [email protected] smtp status=501 smtpmsg='501 <admin_qt>: sender address must contain a domain' errormsg='envelope from address admin_qt not accepted by the ser ver' exitcode=EX_DATAERR

What does your code look like?
Looks like you did not set the sender address right?

Regards,
Kristian
 
Hi Kristian,

I might found the Problem.
1.) I switched back from MSMTP to postfix
2.) I set the correct external smtp mail server informations in the php.ini
3.) now I can send via the quantitec.de/test/sendmail.php but still not via the contact form in wordpress quantitec.de/kontakt
 
Back
Top