问题原文
原帖链接 · rvh · CC BY-SA 4.0
My postfix install denies relaying. But I'd like to configure it to make an exception for one specific destination address or a specific domain?
For example, allow relaying of all messages from anyone destined for [email omitted] or @example.com, but continue to deny relaying for all other cases.
How would that exception be configured in postfix?
已采纳解答
原帖链接 · rvh · CC BY-SA 4.0
some trial and error but finally figured this out.
tested and confirmed on postfix versions 2.10.1 and 3.4.13.
start with a postfix server that blocks all relays.
to allow relaying for one specific recipient address, such as [email omitted], create a file like, /etc/postfix/relay_recipients.
in the file add the line: [email omitted] x
then create a lookup table using this command:
postmap /etc/postfix/relay_recipients
then in main.cf add:
relay_domains = example.com
relay_recipient_maps = hash:/etc/postfix/relay_recipients
restart postfix.
now postfix will continue to block all relays, except when the recipient email address is [email omitted].
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
