Submitted by Vince42 on Sat, 08/13/2016 - 18:37 Pro Licensee
Hi,
I have regular entries in /var/log/mail.log which reads postfix/trivial-rewrite[: warning: do not list domain domain.tld in BOTH mydestination and virtual_alias_domains
.
The server is named server.domain.tld and I also (of course) do have the domain.tld as virtual host managed in Virtualmin. Removing $mydomain from the $mydestination line in /etc/postfix/main.cf results in mails not being delivered, as all the virutal user mails are internally forwarded to virtual.tld-user@domain.tld.
Is there any way to get this fixed without breaking the system's or Webmin's or Virtualmin's logic?
Status:
Active
Comments
Submitted by andreychek on Sat, 08/13/2016 - 23:05 Comment #1
Howdy -- it shouldn't be a problem to have domain.tld added as a Virtual Server, and server.domain.tld in the mydestination line.
The only thing that might cause that notice, is if server.domain.tld is added as a Virtual Server. Do you know if that's the case?
However, are things working, in spite of that warning message?
Submitted by JamieCameron on Sat, 08/13/2016 - 23:09 Comment #2
Yeah, unless mail delivery is failing, I'd recommend ignoring that message.
Submitted by Vince42 on Sun, 08/14/2016 - 15:05 Pro Licensee Comment #3
Everything works fine - I am just annoyed by superfluous log entries and think that there should / must be a "proper" way to handle this ... probably by removing domain.tld from the virtual hosts - but that is uncomfortable. Anyway, I have to accept that this is an unavoidable behaviour ... very sad.
Submitted by JamieCameron on Sun, 08/14/2016 - 19:45 Comment #4
This trigger for this is creating a Virtualmin domain which matches your system's hostname. Because we add all domains to
virtual_alias_domains
regardless, you can end up seeing this (quite harmless) warning.Submitted by vstoykov on Sun, 03/19/2017 - 13:26 Comment #5
My hostname is server.example.com and I have virtual server server.example.com and I get this in my error log:
Mar 19 18:41:27 server postfix/trivial-rewrite[28256]: warning: do not list domain server.example.com in BOTH mydestination and virtual_alias_domains
I added a virtual server with the same FQDN in order to make a test page for server and make use of Webmin's automatic issuance of Let's Encrypt certificate, etc.
Is it safe to remove server.example.com from virtual_alias_domains?
Submitted by JamieCameron on Sun, 03/19/2017 - 15:45 Comment #6
You should remove it from
mydestination
instead.Submitted by Vince42 on Mon, 03/20/2017 - 15:40 Pro Licensee Comment #7
Everything that I have tried so far failed or had bad side effects - just to warn you. ;)
Submitted by JamieCameron on Mon, 03/20/2017 - 18:40 Comment #8
In that case, maybe just ignore this message?
Submitted by Vince42 on Tue, 03/21/2017 - 16:58 Pro Licensee Comment #9
For the time being: yes.
But it is absolutely desirable to understand, why this happens and to find some solution to avoid the error messages. This also applies to some other issues that I have raised in the past. No administrator likes to read "meaningless" warnings in his log files - at least none administrator, I know. ;)
Submitted by JamieCameron on Tue, 03/21/2017 - 22:35 Comment #10
Agreed ... but I've yet to find a solution that doesn't have other side-effects.
Submitted by Vince42 on Fri, 03/24/2017 - 15:23 Pro Licensee Comment #11
I quite imagine how difficult it is to change such a big configuration / administration system without breaking anything - I keep fingers crossed for all of us. :)