• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Local mails are marked as SPAM using the new DMARC feature

Thomas Poisl

Basic Pleskian
I recently upgraded to plesk 12.5 and tried the new DMARC feature for incoming mails "Enable DMARC to check incoming mail".

After that I noticed, that all mails that are send from my server to an email address, that is hosted on the server were marked as SPAM by DMARC.

My guess is that this is due to the fact, that the hostname of my virtual server is different from the hosted domains and provided by my ISP.

But the reverse entries for my IPs is pointing to the correct domain.

The ISP suggests not to change the server hostname in it's FAQ.

Do you have some advice for me, how to use the DMARC feature for incoming mail correctly?
 
Hi Thomas Poisl,

The ISP suggests not to change the server hostname in it's FAQ.
You can safely ignore that.

Do you have some advice for me, how to use the DMARC feature for incoming mail correctly?
You can use the "/etc/aliases" file on your server, to tell postfix for example, which sender eMail it should use.

Examples ( Ubuntu/Debian ):
Code:
# See man 5 aliases for format
root:          [email protected]
postmaster:    root
MAILER-DAEMON: root
fail2ban:    [email protected]
watchdog:    [email protected]
www-data:    root

Examples ( CentOS/RHEL ):
Code:
# See man 5 aliases for format
root:          [email protected]
postmaster:    root
MAILER-DAEMON: root
fail2ban:    [email protected]
watchdog:    [email protected]
apache:      root
 
Thanks for your quick reply.

I have now changed the hostname, without a problem.

After enabling DMARC check for incoming mails, I did a quick check and sent a mail from one local mail account to another, unfortunately it ended up in the spam folder.

Code:
dmarc[23875]: SPF record was not found in Authentication-Results:
dmarc[23875]: DKIM record was not found in Authentication-Results:
...
dmarc[23875]: DMARC: message moved to QUARANTINE for <some_local_mailbox>@<your-domain.com>


I re-checked my configuration send a mail to DKIM Test - DKIM Verify - DKIM Validator and everything seems fine.

Any idea what is going wrong?

Also it would be great to know, which SPF and DKIM record is looked up by plesk.

BTW: After changing the hostname I saw some erros like this:
Code:
spamd[16778]: plugin: eval failed: bayes: (in learn) locker: safe_lock: cannot create tmp lockfile <some_local_mailbox>@<our-domain.com>/.spamassassin/bayes.lock.<old_server_hostname>.16778 for <some_local_mailbox>@<your-domain.com>/.spamassassin/bayes.lock: Datei oder Verzeichnis nicht gefunden

Rerunning /usr/local/psa/admin/sbin/mchk seemed to solve this problem.
 
Back
Top