• 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

Mail problem

M

Marien

Guest
I've got a problem with sending mail from the server.

I've got a domain (@blabla.com) with mail turned off in plesk and the mx-record with the highest priority point at an external mailserver.

All normal mail works just fine but when I try to send an email from the server using something like
PHP:
<?php 
mail("[email protected]", "test", "Test");
?>

The email get's bounced, even if I specify the Sender(From)

Any ideas, cause this gives me headaches

thanks
 
PHP will be using the internal sendmail, unless you've specifically configured it to use an external smtp server.
 
Where can I find this setting?

We used to have 2 other servers where this was no problem.
Not all the domains on the server have a own external mailserver.
How can we solve this?

This is how it should be:

-Mail turned off in Plesk
-External mailserver configured
Mail from PHP is send to mailserver (first MX record)

-Mail turned on in Plesk
Mail from PHP is send internal.
 
It looks like Plesk is not communicating very well with qmail.

Turning off the mail in Plesk should do the trick, but it seems qmail doesn't know anything about that.

Can anyone help me with this problem at SWSOFT, it seems like a bug!?
 
"bounced" can mean a lot of things. What is the exact error report from the MTA that is bouncing the mail, and what are the headers of that email?
 
The bounce is caused by the fact that the server can't find the mailbox. We solved the problem just now by

removing the domain from the following files:
/var/qmail/control/rcpthosts
/var/qmail/control/virtualdomains
/var/qmail/control/rejectnonexist

And remove the complete directory entirely
/var/qmail/mailnamed/domain.com

This did the trick, also turning off and on the domain seems to do the same.
Problems occured after a migration from 7.5 plesk server.
 
Where would those bounced messages be stored?

Is there any way to get the body of those bounced messages? I had this same situation happen to me and lost a number of customer inquiries due to it. Are the messages stored in some error log or mail queue somewhere?

Thanks in advance!
 
Back
Top