I was reading through "Linux Email" and it has an example policy where only 
clients from "your" networks are allowed to use "your" domain in the sender 
address:

smtpd_sender_restrictions =
check_sender_access hash:/etc/postfix/sender_access

# /etc/postfix/sender_access
example.com permit_mynetworks, reject


I tried to take that example and add a custom message after 'reject', but I get 
varying warning messages depending on the table type. (mysql, hash).

mysql:

warning: restriction `Unauthorized' after `reject' is ignored

hash (log message is all on one line):

line 35: missing '=' after attribute name: "example.com permit_mynetworks, 
REJECT Unauthorized use of domain name"


However I get the same results back via postmap:

# postmap -q example.com mysql:/$PWD/mysql-sender_access.cf
permit_mynetworks, REJECT Unauthorized use of domain name

# postmap -q example.com hash:/$PWD/sender_access.conf
permit_mynetworks, REJECT Unauthorized use of domain name

I know I'm missing something obvious here, but so far my conclusion is that 
what I'm trying isn't supported. I looked over the documentation, but perhaps 
I'm overlooking the obvious answer. Thanks for reading this.

P.S.

I'm testing this with two nodes, one sending as an example.com address and the 
other node receiving the mail and applying the check. soft bounces are enabled.

Reply via email to