• 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

MX Record ignored by php mail script und mailer daemon

SörenP

New Pleskian
Hi there,

i'm using plesk 11.5.30 for linux on a virtual server hostet at strato.de.
I have an mx record to an external mail server to resolve emails for a domain hosted at the plesk server
on the external mailserver. the external mailserver send the emails via smtp over the plesk server, so
i have to activate the email function on this domain.

all works fine... BUT: i have a contact form and it ignores the mx record. Some mailerdaemons too.

How can i fix this problem?

thanks for your answers.
 
Hello,

PHP mails function is sending the mail from web server using the php and due to that you are facing this issues, If you want to use external mail server for your contact form than you will have to use SMTP instead of php mail function in your site setting.
 
Hello,

PHP mails function is sending the mail from web server using the php and due to that you are facing this issues, If you want to use external mail server for your contact form than you will have to use SMTP instead of php mail function in your site setting.

Thanks for your answer, but this is not what i am looking for - qmail and postfix ignores the mx record by php forms and some mailerdeamons.
 
Hi,

am I right, that you have the mailbox functions enabled on Plesk? In this case, the MX-Record is being ignored, because the domain is listed in localdomains.
If this is your situation, you'll have to deactivate the mailbox features.

Kind regards
Henning
 
Hi,

am I right, that you have the mailbox functions enabled on Plesk? In this case, the MX-Record is being ignored, because the domain is listed in localdomains.
If this is your situation, you'll have to deactivate the mailbox features.

Kind regards
Henning

Please see my screenshot, did you mean the yellow marked checkbox? I have only 1 Email Account for sending mails via the plesk server.
If i deactivate the checkbox, i can't sent emails via this account.

mailboxes.jpg
 
Sören,

Why do you use an external Mail Server to send Mails to your Plesk Server?
Your configuration Sounds a Little bit confusing ...
 
Sören,

Why do you use an external Mail Server to send Mails to your Plesk Server?
Your configuration Sounds a Little bit confusing ...


We have a Linux Mailserver in our company. We receive the mails via MX.
If i send the mails directly from this linux server, if got some mailer daemons cause
the reverse DNS isnt correct. So, the linux server use a mailbox on the plesk server
to send mails out. So, the reverse DNS is correct.
 
Which mailer daemon is answering you? The Plesk one or the company internal one?

If i send directly out of our internal server, the other server (for example email to [email protected]) answers he can't accept this mail because of the wrong or no reverse dns.

If i send via the plesk server, it's okay, i have no mailer deamons, it works! But thats not my problem... the problem is:

1. The contact form an the plesk server hosted website looking for a mailbox on the plesk server, but it doesnt exist... thats correct so it have to use the mx record... but it didnt work.
2. Some Mailerdeamons are answering the Server directly (via ip i think) and plesk ignores the mx record in this situation too- the same problem... no mailbox... no looking for the mx record.
 
If i send directly out of our internal server, the other server (for example email to [email protected]) answers he can't accept this mail because of the wrong or no reverse dns.

If i send via the plesk server, it's okay, i have no mailer deamons, it works! But thats not my problem... the problem is:

1. The contact form an the plesk server hosted website looking for a mailbox on the plesk server, but it doesnt exist... thats correct so it have to use the mx record... but it didnt work.
2. Some Mailerdeamons are answering the Server directly (via ip i think) and plesk ignores the mx record in this situation too- the same problem... no mailbox... no looking for the mx record.

Hi Sören (i think),

I could provide you with more information and help in such a case in a private session (i.e. Skype).
I would post a resolution for your case then here.

There is a possibility, but not easy to explain. Why don't you solve the Reverse DNS problem and you are happy?

Off: German? ;-)
 
Actually I think this is a very simple problem with a very simple solution but I think there may be a communication problem between everybody.

Henning has provided the correct answer, but I think Soren has not quite understood.

Soren: No, NOT the box in yellow in your screen shot.

Instead, Plesk -> Subscription containing domain -> Domain -> Open in Control Panel -> Click on Mail tab -> Click on Settings -> Remove tick from "Activate Mail Service for this domain". (see the link that Henning gave - it shows the tab)


When you remove this tick:
1) Plesk will not accept any email for any domains in this Subscription
2) That is all. Email server continues to run. Email will be received on all other domains. Server continues to allow email to be sent from any domain to any domain.

The problem you are having is that when a Plesk server has the tick in "Activate Mail Service for this domain", any email generated by the Plesk server (e.g. contact form) is ALWAYS delivered to a local (on Plesk) mailbox. When such a mailbox does not exist, the message is lost. It does not matter what MX records you have for the domain, messages are ALWAYS delivered to a local mailbox in this situation.

When you remove the tick, Plesk no longer treats the domain has having local email, and will then look at the MX records configured, and will send the email to the appropriate mailserver as defined by those MX records.

IMPORTANT:
If you have more than one domain in your Subscription, the "Activate Mail Service for this domain" tick box will affect ALL domains in the Subscription. If you only want to do it for one domain, you have to move the domain to its own Subscription.


Maybe this will help? I hope so!
 
Back
Top