• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Postfix configuration: error regarding host name and virtual domains

B_P

Regular Pleskian
Dear all,

I run a virtual server (Ubuntu 12.04, Plesk 12, Postfix 2.9.6) using plesk to manage multiple domains.
The server address is server.domain1.com. I use plesk to also manage domain1.com regarding all services, including DNS and mail.

What I just found is that postfix sometimes issues the following warning:
server postfix/trivial-rewrite[7397]: warning: do not list domain server.domain1.com in BOTH mydestination and virtual_alias_domains


The essential part of my main.cf is:
myhostname = server.domain1.com
mydestination = localhost.$mydomain, localhost.localdomain, localhost
virtual_mailbox_domains = $virtual_mailbox_maps, hash:/var/spool/postfix/plesk/virtual_domains
virtual_alias_maps = $virtual_maps, hash:/var/spool/postfix/plesk/virtual
virtual_mailbox_maps = , hash:/var/spool/postfix/plesk/vmailbox
virtual_transport = plesk_virtual

And /var/spool/postfix/plesk/virtual_domains contains amongst others:
domain1.com domain1.com/

I do not have any issues with receiving or sending e-mails right now, but would like to get rid of the error message however.

Could it be the problem that postfix automatically sets mydomain to $myhostname with skipping the first part (i.e., mydomain is implicitly set to domain1.com)?
Should I manually set mydomain to server.domain1.com instead? Any other recommendations? Since mydomain seems to be used in multiple options (http://www.postfix.org/postconf.5.html#mydomain), I wonder what I might destroy with changing this? As all mail services run without any further troubles at the moment, I don't want to break this...

As I assume that quite some people use a plesk-based server to manage the domain to which the server itself belongs to, I would assume that there should be a general fix/check to updated mydomain accordingly?
 
Last edited:
Hi B_P,

Should I manually set mydomain to server.domain1.com instead?
No, please use:
Code:
mydestination = localhost.domain1.com, localhost, localhost.localdomain
... to avoid warning - messages as desccribed.

Such a warning may occur, if you changed the hostname over the Plesk Control Panel to the same name of a used domain with Plesk. Please be aware, that such a message is only a "warning" - and nothing more. It shouldn't cause any issues at all. :)
 
Hi UFHH01,

No, please use:
Code:
mydestination = localhost.domain1.com, localhost, localhost.localdomain
... to avoid warning - messages as desccribed.
Since mydomain is equal to domain1.com, what does this change?
What would happen if I changed mydomain to the full host name? I went through the whole Postfix config description and did not find a setting where I would assume any conflict.

Such a warning may occur, if you changed the hostname over the Plesk Control Panel to the same name of a used domain with Plesk. Please be aware, that such a message is only a "warning" - and nothing more. It shouldn't cause any issues at all. :)
That is exactly the case as I mentioned before. But if it does not cause any issues, the warning should not appear?o_O
 
Hi B_P,

Since mydomain is equal to domain1.com, what does this change?
well, you can answer the question by yourself, B_P, because you can see that "server.domain1.com" isn't the same as "localhost.domain1.com". As you already read in the documentation,

"$mydomain" seems to be used in multiple options"
and therefore may conflict with standard ( and not explicit, manually changed in your main.cf ) settings from postfix - you therefore experienced this warning in your logs from time to time.


Postfix knows 4 address classes: "local domains", "relay domains", "virtual_alias domains" and "virtual_mailbox domains". If a domain exists in more than one of these 4 classes, you will receive such a warning, because it could be ( a very rare existent case!!! ), that a never-ending loop could be created, if postfix isn't able to sort an eMail to one of it's 4 classes. The different specific "local" definitions for "mydestination" should prevent such a never-ending loop creation.
 
Back
Top