установил недавно ограничение на 50 писем в час и увидел в логах такое:
2015-07-06 19:05:39 H=(WIN-HLE7D72QTPN) [31.204.150.148] F=<notificaciones@notificaciones.santander.com.mx> rejected RCPT <carlos_bermudez@hotmail.com>: Sender rate SMTP overlimit - 50.6 / 1h
2015-07-06 19:05:42 H=(WIN-HLE7D72QTPN) [31.204.150.148] F=<notificaciones@notificaciones.santander.com.mx> rejected RCPT <carlo-sanchez@hotmail.com>: Sender rate SMTP overlimit - 50.6 / 1h
2015-07-06 19:05:44 H=(WIN-HLE7D72QTPN) [31.204.150.148] F=<notificaciones@notificaciones.santander.com.mx> rejected RCPT <carlosnoevh@hotmail.com>: Sender rate SMTP overlimit - 50.6 / 1h
2015-07-06 19:05:47 H=(WIN-HLE7D72QTPN) [31.204.150.148] F=<notificaciones@notificaciones.santander.com.mx> rejected RCPT <carmen_crazy@hotmail.com>: Sender rate SMTP overlimit - 50.5 / 1h
Не совсем понятно. Получается, через мой почтовый сервер пытается отправлять какой-то notificaciones@notificaciones.santander.com.mx и у него это успешно получается?
Потом я взял лог конкретной попйтки отправления:
сat mainlog.0 | grep '1ZC6aL-000LzP-EB'
2015-07-06 17:37:29 1ZC6aL-000LzP-EB SA: Debug: SAEximRunCond expand returned: '0'
2015-07-06 17:37:29 1ZC6aL-000LzP-EB SA: Action: Not running SA because SAEximRunCond expanded to false (Message-Id: 1ZC6aL-000LzP-EB). From <notificaciones@notificaciones.santander.com.mx> (host=NULL [31.204.150.107]) for ariadna528@yahoo.com
2015-07-06 17:37:29 1ZC6aL-000LzP-EB <= notificaciones@notificaciones.santander.com.mx H=(WIN-HLE7D72QTPN) [31.204.150.107] P=esmtpa A=auth_login:admin S=7623 from <notificaciones@notificaciones.santander.com.mx> for ariadna528@yahoo.com
2015-07-06 17:37:31 1ZC6aL-000LzP-EB ** ariadna528@yahoo.com R=dnslookup T=remote_smtp: SMTP error from remote mail server after end of data: host mta5.am0.yahoodns.net [66.196.118.35]: 554 delivery error: dd This user doesn't have a yahoo.com account (ariadna528@yahoo.com) [-5] - mta1350.mail.bf1.yahoo.com
2015-07-06 17:37:31 1ZC6aR-000LzS-6w <= <> R=1ZC6aL-000LzP-EB U=mailnull P=local S=8864 from <> for notificaciones@notificaciones.santander.com.mx
2015-07-06 17:37:31 1ZC6aL-000LzP-EB Completed
Это что за фигня такая? %) Получается, мой сервак выступает открытым релеем? Почему?
Пример конфига:
cat configure
# $Cambridge: exim/exim-src/src/configure.df
######################################################################
# Runtime configuration file for Exim #
######################################################################
disable_ipv6 = true
primary_hostname = mail.myserver.ru
daemon_smtp_ports = 25:465
tls_on_connect_ports = 465
tls_advertise_hosts = *
tls_certificate = /etc/ssl/certs/mail.crt
tls_privatekey = /etc/ssl/private/mail.key
domainlist local_domains = ${lookup mysql{ SELECT domain FROM domains \
WHERE domain='${quote_mysql:${domain}}' \
AND (type='LOCAL' OR type='VIRTUAL')}}
domainlist relay_to_domains = ${lookup mysql{ SELECT domain FROM domains \
WHERE domain='${quote_mysql:${domain}}' \
AND type='RELAY'}}
domainlist bl_domains_from = ${lookup mysql{ SELECT domain FROM DNSBL \
WHERE ((domain='${quote_mysql:${domain}}') AND (dest='from'))}}
domainlist bl_domains_to = ${lookup mysql{ SELECT domain FROM DNSBL \
WHERE ((domain='${quote_mysql:${domain}}') AND (dest='to'))}}
domainlist collout_domains_from = verdi.ru:amik.ru:regreal.ru
hostlist relay_from_hosts = 127.0.0.1:/usr/local/etc/exim/ourhosts
acl_smtp_helo = acl_check_helo
acl_smtp_mail = acl_check_from
acl_smtp_rcpt = acl_check_rcpt
acl_smtp_mime = acl_check_mime
acl_smtp_data = acl_check_data
#av_scanner = clamd:127.0.0.1 3310
av_scanner = clamd:/var/run/clamav/clamd
#spamd_address = 127.0.0.1 783
spamd_address = /var/run/spamd/spamd
qualify_domain = myserver.ru
#qualify_recipient =
#allow_domain_literals = false
log_selector = \
+all_parents \
+lost_incoming_connection \
+received_sender \
+received_recipients \
+smtp_confirmation \
+smtp_syntax_error \
+smtp_protocol_error \
-queue_run
never_users = root:daemon:bin
#host_lookup = *
#rfc1413_hosts = *
rfc1413_query_timeout = 0s
# sender_unqualified_hosts = +relay_from_hosts
# recipient_unqualified_hosts = +relay_from_hosts
ignore_bounce_errors_after = 30m
timeout_frozen_after = 3d
freeze_tell = postadmins@myserver.ru
auto_thaw = 1h
smtp_banner = $smtp_active_hostname SMTP $tod_full
#message_size_limit = 20M
smtp_accept_max = 200
smtp_accept_max_per_connection = 50
smtp_accept_max_per_host = 25
split_spool_directory = true
#romote_max_parallel = 15
helo_allow_chars = _
smtp_enforce_sync = true
hide mysql_servers = localhost/exim/exim/Yfcnfkf_JctyM?
#smtp_receive_timeout = 60s
#receive_timeout = 60s
######################################################################
# ACL CONFIGURATION #
# Specifies access control lists for incoming SMTP mail #
######################################################################
begin acl
acl_check_helo:
deny message = host $sender_host_address is listed in $dnslist_domain
# dnslists = zen.spamhouse.org: \
dnslists = bl.spamcop.net
accept
acl_check_from:
deny message = Host is in our FROM_DNSBL list!
sender_domains = +bl_domains_from
deny message = Banned Characters Found!
condition = ${if match_address{$sender_address} \
{\N^\|\N}{yes}{no}}
accept
acl_check_rcpt:
deny message = Sender rate SMTP overlimit - $sender_rate / $sender_rate_period
ratelimit = 50 / 1h / leaky
accept hosts = :
deny message = "restricted characters in address"
domains = +local_domains
local_parts = ^[.] : ^.*[@%!/|]
deny message = "restricted characters in address"
domains = !+local_domains
local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
require verify = sender
accept local_parts = postmaster
domains = +local_domains
deny message = HELO/EHLO required by SMTP RFC
condition = ${if eq {$sender_helo_name}{}{yes}{no}}
deny message = "Your IP in HELO - access denied!"
hosts = * : !+relay_from_hosts
condition = ${if eq{$sender_helo_name}\
{$sender_host_address}{true}{false}}
deny condition = ${if eq{$sender_helo_name}\
{$interface_address}{yes}{no}}
hosts = !127.0.0.1 : !localhost : *
message = "Main IP in your HELO! Access denied!"
deny condition = ${if match{$sender_helo_name}\
{\N^\d+$\N}{yes}{no}}
hosts = !127.0.0.1 : !localhost : *
message = "Can't be only digits in HELO!"
# deny condition = ${if eq{$sender_address}{}{yes}{no}}
# hosts = !127.0.0.1 : !localhost : *
# message = "Who's the sender of this mail?!"
deny message = "Bad hostname (dsl, poll, ppp and so on)."
condition = ${if match{$sender_host_name} \
{bezeqint\\.net|net\\.il|dialup|dsl|pool|peer|dhcp|cassa|livingroom}\
{yes}{no}}
deny message = Host is in our TO_DNSBL list!
domains = +bl_domains_to
deny message = It's only local delivery allowed for You!!!
domains = !+local_domains
condition = ${if eq{} {${lookup mysql{SELECT id FROM users \
WHERE id='${quote_mysql:${sender_address_local_part}}' \
AND mbox_host='${quote_mysql:${sender_address_domain}}' \
AND local='Y'}}}{no}{yes}}
accept domains = +local_domains
local_parts = m2all : mail_2_all
endpass
message = It's not allowed for You!!!
hosts = 10.0.1.167
condition = ${if eq{} {${lookup mysql{SELECT id FROM users \
WHERE id='${quote_mysql:${sender_address_local_part}}' \
AND mbox_host='${quote_mysql:${sender_address_domain}}' \
AND m2all='Y'}}}{no}{yes}}
warn
set acl_m0 = 10s
warn
hosts = +relay_from_hosts
set acl_m0 = 0s
delay = $acl_m0
accept domains = +local_domains
endpass
message = Unknown mailbox
verify = recipient
accept domains = +relay_to_domains
endpass
message = unroutable address
verify = recipient
accept authenticated = *
accept hosts = +relay_from_hosts
# deny message = host $host_address is listed in $dnslist_domain
# dnslists = zen.spamhouse.org: \
# bl.spamcop.net : \
# cbl.abuseat.org: \
# dnsbl.njabl.org
deny message = relay not permitted
acl_check_mime:
warn decode = default
deny message = Blacklisted file extension Detected
condition = ${if match {${lc:$mime_filename}} \
{\N(\.waw|\.cpl|\.pif|\.bat|\.scr|\.lnk|\.com|\.exe|\.vbs)$\N}}
# deny message = Sorry. none speaks chinees here
# condition = ${if eq{$mime_charset}{gb2312}{1}{0}}
accept
acl_check_data:
warn message = X-Spam-Flag: YES
hosts = !+relay_from_hosts
#sender_domains = !+local_domains
condition = ${if < {$message_size}{100K}}
spam = spamd
# /defer_ok
warn message = X-Spam-Score: $spam_score ($spam_bar)
deny message = It really looks like a SPAM!
condition = ${if >{$spam_score_int}{49}{1}{0}}
warn message = X-new-subject: ***SPAM*** $h_subject
condition = ${if >{$spam_score_int}{49}{1}{0}}
warn message = X-new-subject: $h_subject:
condition = ${if >{$spam_score_int}{49}{0}{1}}
# warn message = X-Spam-ScoreInt: {$spam_score_int}
# warn message = X-Spam-Scanned: Yes
warn message = X-Spam-Scanner: SpamAssassin
warn message = X-Spam-Report: $spam_report
deny message = Go Away! Eat Your Spam Self!
condition = ${if match{$message_body} \
{105[-_]*51[-_]*86|778[-_]*98[-_]*94} \
{yes}{no}}
deny message = Banned Words Found!
condition = ${if match{lc:$message_headers} \
{(blowjob|penis|fuck|\}\{)} \
{yes}{no}}
deny message = Banned Words Found!
condition = ${if match{lc:$message_body} \
{(blowjob|penis|fuck)} \
{yes}{no}}
deny message = Message rejected: virus $malware_name found. \
Your message was successfully trashed.
hosts = *
demime = *
malware = */defer_ok
warn message = X-Virus-Scanned: by ClamAV
accept