
Originally Posted by
bsasninja
#!!# ACL that is used after the RCPT command
check_recipient:
# Exim 3 had no checking on -bs messages, so for compatibility
# we accept if the source is local SMTP (i.e. not over TCP/IP).
# We do this by testing for an empty sending host field.
accept hosts = :
deny local_parts = ^.*[@%!/|] : ^\\.
message = I`ve never seen @, %, !, / or | in an e-mail. Neither should you!
deny message = Only one recipient accepted for NULL sender
senders = :
condition = ${if>{$rcpt_count}{1}{1}}
deny message = HELO/EHLO with my ip address. You are not me.
log_message = HELO/EHLO my.ip
condition = ${if eq{$sender_helo_name}{$interface_address}{yes}{no}}
deny message = Polite hosts say HELO first. Please see RFC 2821 section 4.1.1.1
log_message = Bad HELO: Empty HELO
condition = ${if eq{$sender_helo_name}{}}
deny message = RFC 1918 IP address in HELO.
log_message = RFC 1918 IP address
!hosts = +relay_hosts
!authenticated = *
condition = ${if match {$sender_helo_name}{\N^(\[)?(10\.[0-9]{1,3}|172\.(1[6-9]|2[0-9]|31)|192\.168)\.[0-9]{1,3}\.[0-9]{1
,3}(\])?$\N}{yes}{no}}
deny message = Forged HELO: you are not $sender_helo_name our local domain and you are not allowed to use as per RFC standa
rds.
log_message = Forged HELO as local domain
!hosts = +relay_hosts
!authenticated = *
condition = ${if match_domain{$sender_helo_name}{+local_domains}{yes}{no}}
deny message = Hacked HELO: you are not $sender_helo_name
log_message = Hacked HELO
!hosts = +relay_hosts
!authenticated = *
condition = ${if match {$sender_helo_name}{\N^[A-Z0-9]+\.[a-z]+$\N}{yes}{no}}
condition = ${if match {$sender_helo_name}{\N^[0-9]+\.[a-z]+$\N}{no}{yes}}
deny message = $sender_helo_name is a silly HELO
log_message = Silly HELO
!hosts = +relay_hosts
!authenticated = *
condition = ${if match {$sender_helo_name}{\N^(127\.0\.0\.1|localhost(\.localdomain)?)$\N}{yes}{no}}
deny message = Underscores are not allowed in hostnames
log_message = Underscore in hostname
!hosts = +relay_hosts
!authenticated = *
condition = ${if match {$sender_helo_name}{\N.*_.*\N}{yes}{no}}
deny message = Hacked HELO: you are not $sender_helo_name
log_message = Hacked HELO: constructed by viruses (random)
!hosts = +relay_hosts
!authenticated = *
condition = ${if match {$sender_helo_name}{smtp}{no}{yes}}
condition = ${if match {$sender_helo_name}{\N^[a-z0-9]+\.[a-z]+$\N}}
condition = ${if match {$sender_helo_name}{\N.*[bcdfghjklmnpqrstvwxz]{7,}.*\.[a-z]+$\N}}
deny message = Faked Yahoo.com address, so you must be spam.
senders = *@yahoo.com:*@yahoo.es:*@yahoo.com.ar:*yahoo.com.br:*@yahoo.it:*@yahoo.co.uk:*@yahoo.ca:*@yahoo.fr
condition = ${if match {$sender_host_name}{\Nyahoo.com$\N}{no}{yes}}
deny message = Faked Hotmail.com address, so you must be spam.
senders = *@hotmail.com
condition = ${if match {$sender_host_name}{\Nhotmail.com$\N}{no}{yes}}
deny message = Faked MSN.com address, so you must be spam.
senders = *@msn.com
condition = ${if match {$sender_host_name}{\N(hotmail|msn).com$\N}{no}{yes}}
deny message = Faked AOL.com address, so you must be spam.
senders = *@aol.com
condition = ${if match {$sender_host_name}{\Naol.com$\N}{no}{yes}}
deny message = Faked Gmail.com address, so you must be spam.
senders = *@gmail.com
condition = ${if match {$sender_host_name}{\N(google|gmail).com$\N}{no}{yes}}
deny message = Faked Mail.ru address, so you must be spam.
senders = *@mail.ru
condition = ${if match {$sender_host_name}{\Nmail.ru$\N}{no}{yes}}
deny message = Faked Fibertel.com.ar address, so you must be spam.
senders = *@fibertel.com.ar
condition = ${if match {$sender_host_name}{\Nfibertel.com.ar$\N}{no}{yes}}
deny message = Faked Ciudad.com.ar address, so you must be spam.
senders = *@ciudad.com.ar
condition = ${if match {$sender_host_name}{\N(ciudad|prima).com.ar$\N}{no}{yes}}
deny message = Faked Argentina.com address, so you must be spam.
senders = *@argentina.com
condition = ${if match {$sender_host_name}{\Nargentina.com$\N}{no}{yes}}
deny message = Faked Excite.com address, so you must be spam.
senders = *@excite.com
condition = ${if match {$sender_host_name}{\Nexcite.com$\N}{no}{yes}}
deny message = Faked Mixmail.com address, so you must be spam.
senders = *@mixmail.com
condition = ${if match {$sender_host_name}{\Nmixmail.com$\N}{no}{yes}}
deny message = Faked Latinmail.com address, so you must be spam.
senders = *@latinmail.com
condition = ${if match {$sender_host_name}{\Nlatinmail.com$\N}{no}{yes}}
deny message = Faked Arnet.com.ar address, so you must be spam.
senders = *@arnet.com.ar
condition = ${if match {$sender_host_name}{\Narnet.com.ar$\N}{no}{yes}}
deny message = Faked Microsoft.com address, so you must be spam.
senders = *@microsoft.com
condition = ${if match {$sender_host_name}{\Nmicrosoft.com$\N}{no}{yes}}
deny message = Faked Wanadoo.com address, so you must be spam.
senders = *@wanadoo.com
condition = ${if match {$sender_host_name}{\Nwanadoo.com$\N}{no}{yes}}
deny message = Faked Mail.com address, so you must be spam.
senders = *@mail.com
condition = ${if match {$sender_host_name}{\N(mail|outblaze).com$\N}{no}{yes}}
deny message = Faked Hotpop.com address, so you must be spam.
senders = *@hotpop.com
condition = ${if match {$sender_host_name}{\Nhotpop.com$\N}{no}{yes}}
deny message = Faked Mac.com address, so you must be spam.
senders = *@mac.com
condition = ${if match {$sender_host_name}{\Nmac.com$\N}{no}{yes}}
deny message = Faked Net.il address, so you must be spam.
senders = *@net.il
condition = ${if match {$sender_host_name}{\Nnet.il$\N}{no}{yes}}
deny message = Faked Walla.com address, so you must be spam.
senders = *@walla.com
condition = ${if match {$sender_host_name}{\Nwalla.com$\N}{no}{yes}}
deny message = Faked Topmail.com.ar address, so you must be spam.
senders = *@topmail.com.ar
condition = ${if match {$sender_host_name}{\Ntopmail.com.ar$\N}{no}{yes}}
deny message = Faked Tutopia.com address, so you must be spam.
senders = *@tutopia.com
condition = ${if match {$sender_host_name}{\Ntutopia.com$\N}{no}{yes}}
deny message = Faked Uyuyuy.com address, so you must be spam.
senders = *@uyuyuy.com
condition = ${if match {$sender_host_name}{\Nuyuyuy.com$\N}{no}{yes}}