Replies: 1 comment 2 replies
-
We have a related FAQ entry about this: https://docker-mailserver.github.io/docker-mailserver/edge/faq/#can-i-use-nakedbare-domains-no-host-name It's not advised to setup your email this way though. When you use If this is not working out for you, it's likely you have a misconfiguration, but you have not shared what your |
Beta Was this translation helpful? Give feedback.
-
Hi,
I had been having certificate confusion between mail.example.com and example.com
So I tried only setting example.com as a domain
by changing
in the docker-compose.yml file to
but doing this causes errors like
postfix/smtpd[2250]: NOQUEUE: reject: RCPT from mail-oa1-f46.google.com[209.85.160.46]: 550 5.1.1 [email protected]: Recipient address rejected: User unknown in local recipient table; from=[email protected] to=[email protected] proto=ESMTP helo=<mail-oa1-f46.google.com>
Even thoug the account does appear when typing
Some search led me to this serverfault page
https://serverfault.com/questions/1061720/debian-postfix-rejecting-user-user-unknown-in-local-recipient-table-in-reply
I tried the commands
However they recommend
"Configure a proper mail server host name & domain. Ideally, not just the second-level mydomain.example but with a name like mx2.mydomain.example. The settings myhostname and mydomain should typically not equal."
So maybe I should have both mail.example.com and example.com ? Is this even possible ?
Another posts suggest that I remove $mydomain from mydestination
https://serverfault.com/questions/179419/postfix-recipient-address-rejected-user-unknown-in-local-recipient-table
I haven't tried that as I'm not sure in this case it -should- send the mail to the local account ?
I tried checking if my "user" exists in /etc/passwd, it does not
and this last one might be the cause but I don't understand why it doesn't exist, should it exist if I don't have a second, virtual domain ?
I tried deleting the mailbox and recreating
I ran all the commands above, but nothing changed
Here is the entire log from sending an email from another domain
And [email protected] can send email to other domains, that works, but they can't send email to themselves, that fails but not with the exact same error messages strangely
The error
postfix/trivial-rewrite[7686]: warning: do not list domain example.com in BOTH mydestination and virtual_mailbox_domains
looks like the best lead, but this is how the comments in docker-compose.yml say to do it !?
This discussion
https://serverfault.com/questions/491601/postfix-do-not-list-domain-example-com-in-both-mydestination-and-virtual-alias
also says to remove $domainname from mydestination
This other discussion
https://www.howtoforge.com/postfix-do-not-list-domain-example.com-in-both-mydestination-and-virtual_mailbox_domains
says "You can list example.com either in virtual_mailbox_domains or in mydestination, but not in both."
So everything now does point to removing $myhostname from
mydestination = $myhostname, localhost.$mydomain, localhost
and then running /etc/init.d/postfix restart inside the container
I imagine the problem is that if I do that, next time I down/up or update the container, this change will be overwritten ?
I guess it's worth a shot anyway !
And that works actually !
But can I restart the container and keep this change ? No the changes are lost
Ok, so how do I make this change permanent OR am I going about this the right way ?
Does anyone else here run a docker-mailserver without a 2nd level dns name ?
thanks !
Beta Was this translation helpful? Give feedback.
All reactions