我有一些后缀服务器用于从网络表单发送电子邮件,我希望能够将电子邮件从外部域发送到我的域,从我的域发送到我的域,以及从我的域发送到外部域。
我不希望能够从外部域发送到外部域。
仅 mynetworks 似乎就构成了一个完全开放的中继(从任何到任何),这是我不想要的。
内部域 = example.com,example.org 外部域 = yahoo.com
从内部到任何 = 允许
期望的结果:
mail from: [email protected] < 2.1.0 OK
rcpt to: [email protected] < 2.1.5 OK
rcpt to: [email protected] < 2.1.5 OK
rcpt to: [email protected] < 2.1.5 OK
实际结果:
rcpt to: [email protected] < 2.1.5 OK
rcpt to: [email protected] < 2.1.5 OK
rcpt to: [email protected] < 454 4.7.1 Relay Access Denied
从任何到仅限内部
期望的结果:
mail from: [email protected] < 2.1.0 OK
rcpt to: [email protected] < 2.1.5 OK
rcpt to: [email protected] < 2.1.5 OK
rcpt to: [email protected] < 454 4.7.1 Relay Access Denied
实际结果:
mail from: [email protected] < 2.1.0 OK
rcpt to: [email protected] < 2.1.5 OK
rcpt to: [email protected] < 2.1.5 OK
rcpt to: [email protected] < 454 4.7.1 Relay Access Denied
当我经历每一个场景时,我想通了!
/etc/postfix/main.cf
/etc/postfix/sender_access