All mail going to same account

Hi there,

I am using webmin/virtualmin since many many years and am totally happy with it. I set up endless numbers of servers with it and never had any problems I couldn't solve.

But now, apparently I ran into one:

On a webmin/virtualmin instance that runs since like 2 years without any problems, we suddenly experience issues w. email. I guess some update messed things up, but I am not sure about that or even which packet might be the cause. The current configuration of the box is a debian 7 wheezy with the latest stable updates, postfix mail_version = 2.7.1, webmin 1.7, Virtualmin 4.09gpl.

As described in the title, since like 2 weeks postfix resp. procmail is delivering ALL email to ALL virtual-servers to ONE single mailbox resp. Maildir, namely to the default account that we used when we originally set up the server hostname@hostname.tld.

Virtualmin "Re-check and refresh configuration" didn't show any problems.

We compared postfix main.cf and master.cf to one of our other virtualmin-boxes, one which works fine: they are basically the same and /etc/procmailrc and /etc/webmin/postfix/config on both boxes are 100% identical, so the bug doesn't seem to live there (that's why we didn't post them here). We stopped spamassassin, to see if this somehow caused the problem: no, same thing. greylisting is not installed. The server that is working and that we used for comparison is Virtualmin 4.08gpl though.

Reading http://www.virtualmin.com/node/34015 we tired removing the refs to the hostname at the beginning of /etc/postfix/virtual rendering all incoming mail to become undeliverable. Could our problem still be related to this post?

Your feedback is appreciated!

Thanks, Hans

Status: 
Active

Comments

Howdy -- do you have a Virtual Server with the same name as the hostname of your server?

That's a possible cause of what you're seeing.

We'd recommend using a hostname in the form of "host.domain.tld". And then, rather than having a Virtual Server with that name, go into the Virtual Server with the name "domain.tld", and there setup a DNS record for "host.domain.tld".

If you make changes to your hostname, verify that it exists in /etc/hosts, and that it's listed on the mydestination line of /etc/postfix/main.cf.

You'd also need to restart Postfix if you make changes to that.

thanks for your quick reply! :)

When I do as you propose, I get the usual "Undelivered Mail Returned to Sender... Action: failed, Status: 5.0.0 Diagnostic-Code: X-Postfix; User unknown in virtual alias table"-stuff :(

I have to admit, that we do use "a Virtual Server with the same name as the hostname of the server" since decades on basically any box we set up and it never generated any problems. This of course doesn't mean, it will always work, cuz new versions of packages come w. tighter application of policies, but apparently this didn't cause our problem.

Any other ideas/proposals?

Thanks! :)

Hmm, that particular change shouldn't cause a "User unknown" error... that may just be highlighting a bigger problem.

I was hoping the above ideas would resolve it for you though. Since you're using Virtualmin GPL, we'll probably need to move our troubleshooting over to the Forums... we monitor those, along with lots of wonderful folks in the community!

If you could, open up a new forum thread using the "Forums" link above, and in there, explain the error you're seeing, along with the following --

  • Show us the full message(s) generated in the /var/log/mail.log file when trying to deliver a message

  • Let us know the output of the command "hostname"

  • What does the "mydestination" line in /etc/postfix/main.cf look like?

You also may want to take a peek at /etc/postfix/virtual, and make sure that file exists and lists your various domains and email addresses.

Huups, sorry, I haven't realized I was in the "wrong" section - didn't see here is for the commercial version only. Feel free to move the thread to the appropriate section, thanks.

/var/log/mail.log always, for every mail that comes in, says like:

Aug 25 21:17:04 [hostname] postfix/local[3504]: 9D669419C62: to=<[hostname]@[hostname.tld]>, orig_to=<[username]@[hosted-domain-name] >, relay=local, delay=15, delays=0.44/0.01/0/14, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME)
Aug 25 21:17:04 [hostname] postfix/qmgr[31448]: 9D669419C62: removed

hostname gives the current hostname. It is identical w. the domain-name which is used for the server itself and the default/first virtual-host.

mydestination = /etc/postfix/virtual

We tried putting the actual hostname here, "hardcoded", but this resulted in all incoming mails being returned as undeliverable.

/etc/postfix/virtual exist and contains ~250 lines.

As I said, we compared these files with the corresponding files on a working Virtualmin 4.0.8.gpl instance and couldn't find relevant differences. Still this 4.0.9 system doesn't deliver mail (it did until it was upgraded recently), while the 4.0.8 one does.

And reading the other post mentioned above, we are unsure, wether this is cause by the latest version of virtualmin, to which the machine was recently updated or if maybe some other package that might have been upgraded causes this erratic behaviour of the server.

Thanks :)