Hi there,
I have 2 problems I want to discuss with you guys.
1. I want to block e-mails from some specific address. So I used
header_checks = regexp:/usr/local/etc/postfix/header_checks and in
header_checks I have:
/^From: badaddr...@domain.com/ REJECT message
But nothing happens.
2. I am getting spams from remote smtp servers with forged sender
address (it is my address). The e-mail comes from myaddr...@mydomain.com
to myaddr...@mydomain.com
So, I decided to block all e-mails that come to my servers to my domains
(virtual) from remote smtp servers.
Fort that a added in check_sender_access
hash:/usr/local/etc/postfix/access_sender in
smtpd_recipient_restrictions. But surprise, today I got such a e-mail.
In access_sender I have: mydomain REJECT message1
I also ran postmap access_sender.
Why is that possible? What should I do?
Here is the output of postconf -n
command_directory = /usr/local/sbin
config_directory = /usr/local/etc/postfix
daemon_directory = /usr/local/libexec/postfix
data_directory = /var/db/postfix
debug_peer_level = 2
debug_peer_list = domain.com
header_checks = regexp:/usr/local/etc/postfix/header_checks
html_directory = no
mail_owner = postfix
mailq_path = /usr/local/bin/mailq
manpage_directory = /usr/local/man
myhostname = mail.domain.com
mynetworks_style = host
newaliases_path = /usr/local/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
sample_directory = /usr/local/etc/postfix
sendmail_path = /usr/local/sbin/sendmail
setgid_group = maildrop
smtpd_helo_restrictions = reject_invalid_hostname permit
smtpd_recipient_restrictions = permit_mynetworks
permit_sasl_authenticated reject_unauth_destination check_sender_access
hash:/usr/local/etc/postfix/access_sender check_helo_access
pcre:/usr/local/etc/postfix/helo_checks reject_non_fqdn_recipient
reject_unknown_recipient_domain reject_unverified_recipient
reject_rbl_client zen.spamhaus.org, reject_rhsbl_sender
dsn.rfc-ignorant.org permit
smtpd_sasl_auth_enable = yes
smtpd_sender_restrictions = reject_unknown_sender_domain,
reject_non_fqdn_sender, permit
soft_bounce = no
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/usr/local/etc/postfix/valias.txt
virtual_gid_maps = static:1000
virtual_mailbox_base = /var/spool/vmail
virtual_mailbox_domains = /usr/local/etc/postfix/vhost.txt
virtual_mailbox_maps = hash:/usr/local/etc/postfix/vmaps.txt
Thank you.