• 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

Question Wrong or not custom hostname on Mail Delivery System

PeopleInside

Regular Pleskian
Server operating system version
Ubuntu 22.04.2 LTS
Plesk version and microupdate number
Plesk Obsidian Version 18.0.52
Hi,
today I sent an email from my domain and Plesk managed email to a not existent user.

A Delivery Status Notification has informed me about that but the email start with:
This is the mail system at host reverent-sanderson.(MY VPS IP).plesk.page.

I expect here to see my domain or VPS hostname.
How can I customize that?

I logged in into SSH and at hostname ssh command the result is my domain not that string.
Also login on Plesk, in the Dashboard my hostname showed is not the hostname showed in the Delivery System email.

Can I fix customize this?
How?

Thank you!
 
What does the hostname show when you log into Plesk that shows under System Overview?
 
No. The mailer uses the hostname. However, you can edit that hostname in /etc/postfix/main.cf. Search for the line that sets "myhostname". If it is still commented, remove the "#" to activate it and enter your domain instead of the example. If it is already active, change the existing myhostname content to the domain name you want to use as the sender domain.
 
Thanks, I done this change.
Mail still be delivered correctly, seems but Delivery Status Notification is no more delivered after changing that hostname so I'm reverting back the change.
Seems if I change myhostname in /etc/postfix/main.cf I stop to reeving alerts when an email is not delivered.. so seems is not the right solution. I need keep as is by default.
 
If the alerts are stopped by changing the myhostname entry in main.cf it means that they are sent to an address that cannot be reached. You need to verify that the domain name is correct and can receive emails.
 
Thanks for the answer.
My domain is peopleinside.it and I use email with that domains and works but changing that settings create the issue.
If the alerts are stopped by changing the myhostname entry in main.cf it means that they are sent to an address that cannot be reached.
I'm asking with address is sent? If I send an email from email 1 I expect to get the Delivery at the email 1.
It works with default myhostname entry in main.cf but it not work if I set as hostname peopleinside.it
 
On the log browser the mail log say
Code:
DE21C61E0D: DMARC: smtpdomain= maildomain=peopleinside.it [email protected] stamp=1684483859 ip=unknown adkim=relaxed aspf=relaxed p=REJECT sp=REJECT pct=100 align_dkim=fail align_spf=fail spfres=unknown dkimres=unknown dmarccheck=DMARC_POLICY_REJECT dmarcstatus=STOP

DE21C61E0D: SPF record was not found in Authentication-Results
dk_check [156327]
DE21C61E0D: DKIM Feed: No signature

So maybe issue are related to DNS or something I dont know.
Seems a DMARC issue is caused if I change the hostname from what I'm understanding.
 
Does your domain have a proper SPF entry and a DKIM entry? At least SPF will be required. If you have DMARC configured it checks against SPF (and DKIM), so if SPF is missing, the test will fail and the mail coming from the domain may be discarded, if the SPF setting is "-" instead of "~".
 
Without changing myhostname entry in main.cf my email are dkim, spf and DMARC validated.

I have no idea why if i replace myhostname from reverent-sanderson.(MY VPS IP).plesk.page to peopleinside.it Delivery Status notification are not delivered to me.

If so means I need to keep the default myhostname, seems if I try to customize this I get issue because no Delivery Status N are anymore sent in case email are not delivered.

peopleinside.it

v=spf1 mx a ip4:82.XXX.77.57 -all

This is my SPF record.
Maybe changing myhostname will invalidate DKIM?

I have no idea why is not working if I change the myhostname :)
 
In my server i configured SPF, DKIM and DMARC.
Those record are checked by me sending a test email from my domain to for example Gmail then checking email headers confirm all records are passed.

Recently I discovered that if I use the default myhostname in the file /etc/postfix/main.cf I am able to receive the Delivery Status Notification email only if from my domain I send an email to an inexistent email address for example inexistent Gmail account [email protected] used also in the Google Guide for explain things.

BUT

from my test if a Gmail account write to an not existent email address of mine, no Delivery Status Notification is delivered to the sender.

Now the Plesk support changed my default myhostname in the file /etc/postfix/main.cf from the default to my domain, the same of my PTR record.
They showed a screenshot where an email sent from Gmail to a not existent email generate the correct Delivery Status Notification.

I'm unable to replicate this as I continue to get no Delivery Status Notification Email.

I discovered that if I change my default myhostname in the file /etc/postfix/main.c to a custom one I never get anymore Delivery Status Notification when I write from my domain to a not existent email address.

A server log say this:

Code:
May 31 01:47:12 peopleinside postfix-local[74857]: 69C4761BCD: dkcheck: stderr: PASS May 31 01:47:12 peopleinside dmarc[74862]: 69C4761BCD: SPF record was not found in Authentication-Results May 31 01:47:12 peopleinside dmarc[74862]: 69C4761BCD: DMARC: smtpdomain= maildomain=peopleinside.it [email protected] stamp=1685490432 ip=unknown adkim=relaxed aspf=relaxed p=REJECT sp=REJECT pct=100 aligndkim=fail alignspf=fail spfres=unknown dkimres=unknown dmarccheck=DMARCPOLICY_REJECT dmarcstatus=STOP
May 31 01:47:12 peopleinside postfix-local[74857]: 69C4761BCD: dmarc: stderr: STOP
May 31 01:47:12 peopleinside postfix-local[74857]: message discarded by a mail handler

So the agent in the ticket said to me the issue was the DMARC record where, the suggestion was: change the DMARC record for the recipient domain. Change "p=quarantine" or "p=reject" to "p=none" at Domains > example.com > DNS Settings.

I set "p=quarantine" but the issue still be the same.
What I can see is the logs say an unknow IP is sending the email.
SPF and DKIM seems fail this can be the cause email are not delivered but I'm asking why this happen.

Why I share this in this discussion?
First for keep it updated.

Seconds because I'm asking if someone else has configured email in Plesk with a valid SPF and with a valid DKIM.
Umh I have also activate greylisting for prevent spam.

I think if a server is configured in this way, maybe some issues with the Delivery Status Notification can happen.

I'm still investigating this with the support by Ticket but I don't know IF I will finally find a solution :) I don't know yet.
Looks strange to me I get the Delivery Status Notification only in some case, different if I change the myhostname.

I see also that changing myhostaname never remove fully the default domain from email headers of Delivery Status Notification, this means reading the email headers I found again, somewhere else the default myhostname.

I will try to update here if I found other things.
 
Hum now seems changing the DMARC has delivered the Delivery Status Notification in the spam folder.
The email alert me that I send an email to a inexistent Gmail account.
Interesting so seems to be an issue with the DMARC.

Good to know so seems I cannot have reject in the DMARC
 
@Peter Debik can I ask last thing in this topic?
I was able to set the custom hostname and edit the DMARC to make Delivery Status Notification not rejected just do you know how I can customize the plesk bounce email address that appear on the Delivery Email?

 
Back
Top