do not list domain example.com in BOTH mydestination

Hi!

Getting a few of these lines in my Postfix log every day:````
Sep 13 06:53:32 lixxx-yyy postfix/trivial-rewrite[18654]: warning: do not list domain example.com in BOTH mydestination and virtualmailboxdomains

In my postfix config (main.cf) I have:````
mydestination = localhost

And in the mysql table for my virtual domains: example.com lixxx-yyy.members.linode.com lixxx-yyy localhost.lixxx-yyy.members.linode.com

I.e. I do not have "localhost" listed here as the error message says? It is due to that postfix resolves "localhost" to "example.com"? Can I remove the mydestination-line from the postfix config?

Please advise,

6 Replies

Hello,

I'm confused by your configuration. Are you trying to send e-mail from @lixxx-yy.members.linode.com? Are you also trying to send e-mail from example.com?

You shouldn't need example.com at all, as it's just an example. You should probably remove it, and that would most likely resolve this issue. I'd also consider using an actual domain to send e-mail.

Thanks,

Dave.

A couple possibilities:

After editing main.cf, have you restarted Postfix so the new settings take effect?

The value of mydestination is being set somewhere else. Use the command postconf | grep mydest to see what Postfix is actually using for the value. If it's not just "localhost" then there may be a second line somewhere in main.cf setting a different value. Deleting the mydestination line(s) from main.cf will cause it to assume the default value, not a blank one.

(I am assuming you aren't really using example.com - if you are, you have bigger problems. Obscuring your real domain/host name makes it harder for us to help you. Note that neither mydestination nor virtualmailboxdomains should have anything to do with sending mail, only how received mail is treated.)

Of course example.com was just an example, I'm using a real, other domain, which I'm sending ALL emails from. The box is used for sending email only, but has Dovecot configured to receive emails as well. Also using SPF, DKIM and Cluebringer (PolicyD). Just getting this error and don't know how to solve it. I've searched for mydestination before I wrote the original post and the line I've got is the only one.

I think the issue may be localhost resolves example.com (example.com is the fqdn…)

More suggestions?

What does postconf | grep mydest show? As far as I know, Postfix shouldn't be expanding "localhost" to anything else, but I guess it's possible.

It shows:

mydestination = localhost
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $sender_bcc_maps $recipient_bcc_maps $smtp_generic_maps $lmtp_generic_maps
relay_domains = $mydestination

Hmm. The only other place I can think of that Postfix might be pulling example.com from is /etc/hosts (if it's on the same line as localhost there). But I just tried it out on CentOS 7, and Postfix doesn't appear to do this.

You could put "mydestination =" in main.cf to blank out the setting completely, but that might break things like cron that expect to send local mail to root.

Sorry, that's about as far as I can reach on this one.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct