Stuff…

I know I will forget.

Stuff… header image 2

Plesk mail delivery issues to domain with disabled mail

March 24th, 2010 · 4 Comments

OS: CentOS 5.4
CP: Plesk 9.3
MTA: Postfix

Plesk appears to have a bug in it where if you disable a domain mail function Plesk leaves various entries in the postfix mailertables.  For example, domain test.com has mail disabled on it, but, Plesk leaves entries in the following mail tables used by postfix:

/var/spool/postfix/plesk/alias.db:
_plesk_bounce_test.com
/var/spool/postfix/plesk/virtual.db:
@test.com
root@test.com
postmaster@test.com
mailer-daemon@test.com
anonymous@test.com
drweb@test.com

This is a big problem when the domain has mail hosted else where and they want to send emails to the domain via web forms on the site.  This is a very common requirement especially when the sites has contact, enquiry and sales forms sending emails to the domain.

There shouldn’t be any local entries in the mailer tables so that the mail server looks up the MX record of the domain and sends the email to the remote mail server.

This bug has been prsent for a few months now and even Parallels paid support hasn’t been able to grasp the problem:

Not only that, what is the deal with the other random entries for the domain such as: root, postmaster, drweb and anonymous.  Some are part of recommended email addresses RFC (rfc2142), however, it still breaks what we need/what to do.

Not sure at the moment if this bug only affects Postfix.  Will be testing qmail shortly.

UPDATE 25/03/2010:

Found a work around for this.

strings virtual.db | grep test.com
_plesk_bounce_test.com@localhost.localdomain
@test.com
drweb@test.com
root@test.com
postmaster@test.com
mailer-daemon@test.com
anonymous@test.com

Went into the Plesk control panel for the domain and checked the the domains email was disabled under mail preferences… it was.

“Mail to nonexistent user” did not have any options selected which was a bit strange.  Possibly was not selected due to migrating site from Plesk 8.x.

Then:

  • Enabled mail for the domain
  • Selected “Forward to address” and then changed it to “Reject mail to nonexistent user”
    (One or the other will probably work)

At this point the @test.com virtual.db entries disappeared.  It was still gone once mail for the domain was disabled again.

Then, to get rid of the individual aliases such as: drweb, root, postmaster, anonymous

Add new mail accounts (doesn’t need to be mailbox) for each alias and then delete them again.  This appears to remove the entries from the virtual.db file.  To make removing them all slightly faster you can create one mail account and add the rest as aliases and just delete the mail account.

Tags: Control Panels · Linux · Operating System

4 responses so far ↓

  • 1 Andrew Holt // May 14, 2010 at 4:24 pm

    I’ve got the exact same problem but with a fresh CentOS 5.3 server and Plesk 9.0 updated to 9.2.5. Unfortunately the guide above didn’t help me and I’m continuing to search for a resolution to the problem.

  • 2 Imo // May 15, 2010 at 10:17 am

    Hi Andrew,

    Strange. Have you confirmed entries in the virtual.db file for the affected domains/email addresses? Did you try adding those email addresses for the domain and deleting them?

    Imo

  • 3 Jim // Sep 28, 2010 at 1:06 am

    I’ve been having the exact same problem, coincidently on CentOS, i see a pattern here. I’ve tried you fix and i am just waiting now for the system to generate automated email to test the theory :) As i have read it will reapply itself after an update, so one to keep an eye on .

  • 4 Imo // Sep 28, 2010 at 10:08 am

    Hi Jim,

    I hope it worked. You can check manually very quickly via the command line by going into the /var/qmail/controls directory and running “strings virtual.db | grep test.com”… this should show the entries for the domain. Hopefully the entries have gone after adding and removing the aliases/mailboxes.

Leave a Comment