Muối Nhạt's site

Make notes and share experiences

Make notes and share experiences

Rejecting Unknown Local Recipients with Postfix

By default, the Postfix SMTP server rejects mail for unknown recipients in local domains.. this configuration causes the problem when you try sending an email (ie. from Mozilla Thunderbird) to unknown user in the same domain, it will pop-up a windows like this (it was not happened with Gmail):

I found this regarding document (http://www.postfix.org/LOCAL_RECIPIENT_README.html), but this made no difference. Finally, I recognize that this is because the current postfix system is using virtual_alias_maps (and other virtual mailbox solutions don’t seem to apply here either). So I tried some research more, like these (try them, then you will see some interesting things):

root@ubuntu:~#     postconf | grep local
root@ubuntu:~#     postconf | grep recipient
root@ubuntu:~#     postconf | grep unknown

After all, I re-configured these below lines (/etc/postfix/main.cf):

#Virtual domains, users, and aliases
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
#Comment below line
#virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_mailbox_maps =
#Comment below line
#virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
virtual_alias_maps =

Try again from email client, hopefully, it’s working pretty well now.

Updated on Jan 19, 2018: the above method maybe cause the problem with some other running services on your system. If so, let’s redo as the original. Then follow below is exact what we need to do for this subject:

I was recognize the problem by investigation:

root@ubuntu:~#     postconf | grep reject

 

So, I tried to re-config postfix:

root@ubuntu:~#     postconf -e “smtpd_reject_unlisted_recipient = no”
root@ubuntu:~#     postfix reload

Now, the problem is totally solved.

RELATED POSTS
Share the Post: