Hello,
I need to do e-mail black list. I need to prevent some tld names sending me e-mails.
What is the easiest way to achieve this …
something like *.domain_name.com REJECT … where to but the files how to name them … ?
Hello,
I need to do e-mail black list. I need to prevent some tld names sending me e-mails.
What is the easiest way to achieve this …
something like *.domain_name.com REJECT … where to but the files how to name them … ?
erik100 wrote:
> Hello,
>
> I need to do e-mail black list. I need to prevent some tld names
> sending me e-mails.
>
> What is the easiest way to achieve this …
>
> something like *.domain_name.com REJECT … where to but the files
> how to name them … ?
E.g.:
smtpd_client_restrictions =
check_recipient_access hash:/etc/postfix/recipient-whitelist,
check_client_access cidr:/etc/postfix/ok-clients,
check_client_access cidr:/etc/postfix/bad-clients,
check_client_access hash:/etc/postfix/access
reject_rbl_client t1.dnsbl.net.au,
reject_rbl_client dnsbl.sorbs.net,
…]
permit
See also smtpd_helo_restrictions, smtpd_recipient_restrictions and smtpd_sender_restrictions in postconf(5)
Theo
When I add check_client_access hash:/etc/postfix/access under smtpd_client_restrictions =
and *.domain_name.com REJECT in /etc/postfix/access fails to work, there is a mail server error :\
erik100 wrote:
> I need to do e-mail black list. I need to prevent some tld names
> sending me e-mails.
Are you sure you want to reject some domain names? Usually is not very
useful as domain names are easy to fake. Better use a good spam filter such
spamassassin so the users can delete themselves the e-mails.
> What is the easiest way to achieve this …
>
> something like *.domain_name.com REJECT … where to but the files
> how to name them … ?
Postfix header and body checks are very powerfull and easy to setup:
http://www.postfix.org/BUILTIN_FILTER_README.html
http://www.postfix.org/header_checks.5.html
Greetings,
–
Camaleón
erik100 wrote:
> When I add check_client_access hash:/etc/postfix/access under
> smtpd_client_restrictions =
> and *.domain_name.com REJECT in /etc/postfix/access fails to work,
> there is a mail server error :\
Read access(5)
HOST NAME/ADDRESS PATTERNS
With lookups from indexed files such as DB or DBM, or from networked
tables such as NIS, LDAP or SQL, the following lookup patterns are
examined in the order as listed:
domain.tld
Matches domain.tld.
The pattern domain.tld also matches subdomains, but only when
the string smtpd_access_maps is listed in the Postfix par-
ent_domain_matches_subdomains configuration setting. Otherwise,
specify .domain.tld (note the initial dot) in order to match
subdomains.
…domainname.com REJECT
Theo