How to get rid of these Postfix warnings

Looking at my maillog, I see lots of entries like this:

Dec 3 15:31:44 XXX postfix/trivial-rewrite[15874]: warning: do not list domain XXX.com in BOTH mydestination and virtual_alias_domains

Of course XXX was added by me for this post (I dont own XXX.com :open_mouth: )
What do I need to do to fix the problem? (CentOS 4.8)

Thanks

how I interpret the entry is that you can remove the domain listing from mydestination

Well I wouldnā€™t be asking the question if I knew where to do that :stuck_out_tongue:

Sorry, im not a mindreader yet :stuck_out_tongue:
That would be in postfix configuration file.

webmin - servers - postfix mail server - Edit Config Files and look for the $mydestination line. If your domain is listed in there you can remove it and reload or restart postfix.
/etc/init.d/postfix restart

Note that this can get a little bit tricky, if the system hostname exactly matches one of your virtually hosted domains. It will confuse Postfix to remove the hostname from mydestination, because Postfix process the virtual maps before the delivery stage, and so when it gets to the end and it tries to deliver to ā€œname@hostnameā€ itā€™ll fail if itā€™s not in mydestination.

Soā€¦simpler to name your server something other than the bare domain name. So, Iā€™d name my system, say ā€œns0.virtualmin.comā€ or ā€œsrv1.virtualmin.comā€ or similar, instead of ā€œvirtualmin.comā€. There are ways to deal with this within Postfix, but I never seem to get it right. :wink:

Oh, yeah, also note that this error is harmless.

Excuse me, folks.
I wouldnā€™t be updating this thread, except that I get that rewirte warning too.
It might be harmles, but Iā€™d prefer not to see it.
My mydestination line (after I tinkered about to try to make it work) reads:
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

Should it just contain something like mydestination = $myhostname?
Or just:
mydestination =
?
Thanks.

After edit main,cf any entry for domain listas.biomanantial.com

Restart postfixā€¦ but problem persist

Dec 20 11:25:47 listas postfix/postfix-script[11989]: stopping the Postfix mail system
Dec 20 11:25:47 listas postfix/master[11604]: terminating on signal 15
Dec 20 11:25:48 listas postfix/postfix-script[12061]: starting the Postfix mail system
Dec 20 11:25:48 listas postfix/master[12062]: daemon started ā€“ version 2.6.6, configuration /etc/postfix
Dec 20 11:26:41 listas postfix/smtpd[12091]: connect from mail-ea0-f180.google.com[209.85.215.180]
Dec 20 11:26:42 listas postfix/trivial-rewrite[12097]: warning: do not list domain listas.biomanantial.com in BOTH mydestination and virtual_alias_domains