Hi.
My goal:
only allow mail to certains domains
@a.com
@b.com
@c.com
everything else should bounce.
main.cf:
smtpd_recipient_restrictions =
check_sender_access hash:/etc/postfix/recipient_access,
reject
cat /etc/postfix/recipient_access
a.dk OK
b.dk OK
c.dk OK
postmap /etc/postfix/recipient_access
postfix reload
mails to other domains other then a.dk b.dk c.dk still goes through.
I have also tried to do this access control with
main.cf:
header_checks = pcre:/etc/postfix/header_checks
cat /etc/postfix/header_checks
!/(@a\.dk|@b\.dk|@c\.dk)/ REJECT Bye
but its like the "!" part is not really working.
postmap -q "[email protected]" /etc/postfix/header_checks dosnt return anything
postmap -q "[email protected]" /etc/postfix/header_checks returns "REJECT Bye"
like it should
but postfix dosnt really care.
i test from bash with something like "echo hej | mail <mailaddress>"
Any pointers on where to look?
Morten