Mail users and spam broken after migration

Hi - a few days ago I migrated a server and at the time all seemed fine. Now I see that mail for users in a specific domain is appearing only in the catch-all account, and no spam processing is occuring, which results in tons of e-mail for one person and none for anyone else. In fact, every domain is working this way.

Any quick ideas why this is? I have checked the user names under the virtual server and it seems fine.

Closed (fixed)


Well, if you can, I might suggest waiting for Jamie's thoughts before doing anything I list below, as he'd be able to work with you to figure out what went wrong, and then prevent it from occurring again.

However, if you're in a hurry and dealing with bounced emails -- what I might suggest for starters is to remove the catchall from that one account, and then to add it back in. Doing that may correct the problem you're seeing with email delivery.

Next, you may want to try something similar with the Spam feature -- go into Edit Virtual Server -> Enabled Features, and then disable and re-enable the Spam feature.

I'd be interested to see what the "Edit Mail Aliases" page shows for this domain. Is there perhaps a catchall alias that is forwarding to a single user?

Sure there are - any mail that does not have an addressee in a particular domain gets forwarded to a single e-mail. But this is something that worked until the migration.

1 - I did this, but it made no difference

2 - I did try this, and when I checked off the spam feature I got this:

Failed to modify server : Virus filtering cannot be enabled unless email and spam filtering is

I then disabled the virus check, then was able to disable spam filtering, so I then re-enabled both simultaneously with no errors.

But it made no difference - the spam continues unabated.

If you edit one of the other users who isn't getting email, does he have "Primary email address enabled?" set to "Yes" ? Without this, email to that user will fall through to the catchall alias ..

I already checked that, and just for fun set it off and then on again; no difference.-

Mail for is going to as an example, even though was set up and runing prior to the move, and seems to be totally correct when you look at it in Virtualmin menus.

This is getting annoying as I have to move messages to the proper users manually.

By the way, I did a test by adding a user to a domain and then sending mail to that user; the mail arrived at the catchall instead.

Would it be possible for us to login to your system to see what is going wrong here? Something is clearly broken, but it is tough to debug via the bug tracker.

If that is possible, email me directly at

Thanks .. looking now.

I forgot to ask - what is the actual domain name and username that is seeing this problem?

All of them on the server - for instance, the atlanta one does not deliver mail or check spam. It all goes to the catchall of the main domain.

Ok, I see the issue now, and have fixed the problem.

The cause was that Postfix was configured to read your system's "mail original" from the /etc/mailname file, but this file contained just which was one of the domains on your system. This caused all email to any domain to be re-written to be in the domain, which then matched the catchall for that domain!

The fix was simply to put the system's full hostname in /etc/mailname and then restart Postfix.

By the way, how then can I get the spam filtering back up and running?

It should be working now .. unless you have the spam feature disabled for that domain?

It is all enabled, but it seems to not get scanned. Is there some file which likewise requires an edit that I can do?

Can you paste the email headers for one of your emails in here?

Especially one that should be marked as spam.

That should help us figure out what SpamAssassin is doing with those. Thanks!

Return-Path: <>
Received: from ( [])
by (Postfix) with SMTP id CFD6B22808DE;
Fri, 17 Aug 2012 01:39:56 +0200 (CEST)
To: <>
Subject: BigMan and Manhood Plus and are proven to increase penis size. Recommended Penis Enlargement Pills to Increase Your Penis Size ddvngk
Date: Fri, 17 Aug 2012 06:36:02 +0600
Message-ID: <44k11r87d23-85989803-807c9d93@fuqguvh>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

Recommended Penis Enlargement Pills to Increase Your Penis Size
In the world of penis enlargement pills, two brands stand clearly above the rest. BigMan and Manhood Plus and are proven to increase penis size.

I had another look at your system, and I see the cause of this problem - in /etc/postfix/ , the mailbox_command line was set incorrectly.

I changed it to :

mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME

which is what Virtualmin sets at install time. Spamassassin now appears to be scanning your incoming email ..

Thank you. One day I will not waste your time so much, but in the meantime, thank you VERY much!

Are these installer issues, or it is due to issue from the backup and migration?

I'm not sure how the second issue happened - but the first is likely due to a clash between your hostname and one of your domains. I'll add better detection for this case in a future release...

Once again, thank you very much.

I really think if more people understood the difference between Virtualmin and Virtualmin Pro they would upgrade more readily.

Automatically closed -- issue fixed for 2 weeks with no activity.