Почему то Postfix его не отсекает хотя заголовки явно некорректные.
Вот, например, заголовок письма:
Код: Выделить всё
Return-Path: <bsgllsp@mail.ru>
X-Original-To: mymailbox@myserver.ru
Delivered-To: mymailbox@myserver.ru
Received: from myserver.ru (myserver.ru [127.0.0.1])
by myserver.ru (Postfix) with ESMTP id 469957C074B;
Wed, 3 Jun 2009 03:59:48 +1100 (VLAST)
Received: from server100.welcometelecom.ru (unknown [64.251.48.194])
by myserver.ru (Postfix) with SMTP id 1FBBF7C074A;
Wed, 3 Jun 2009 03:59:36 +1100 (VLAST)
Message-ID: <003e01c9e3a3$81f3c220$c85fa8c0@server100.welcometelecom.ru>
From: "=?utf-8?B?0JLQmNCfLdCX0JDQm9Cr?=" <bsgllsp@mail.ru>
To: anothermailbox@myserver.ruX-Original-To: и To: явно не совпадают, как и
Received: from server100.welcometelecom.ru и From: <bsgllsp@mail.ru>
Но почему то Postfix смотрит не на X-Original-To, что было бы правильнее, а на To: и то же самое с Received:
В From: можно что угодно прописать а Received: это настоящий адрес, но почему то берется From:, что, мне кажется, неправильно.
Вот кусок лога
Код: Выделить всё
Jun 3 03:59:37 myserver postfix/smtpd[11863]: 1FBBF7C074A: client=unknown[64.251.48.194]
Jun 3 03:59:46 myserver postfix/cleanup[12546]: 1FBBF7C074A: message-id=<003e01c9e3a3$81f3c220$c85fa8c0@server100.welcometelecom.ru>
Jun 3 03:59:48 myserver postfix/qmgr[19373]: 1FBBF7C074A: from=<bsgllsp@mail.ru>, size=41123, nrcpt=9 (queue active)
Jun 3 03:59:48 myserver postfix/smtp[12551]: 1FBBF7C074A: to=<mymailbox@myserver.ru>, relay=127.0.0.1[127.0.0.1]:10027, delay=12, delays=12/0.01/0.09/0.08, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 469957C074B)
Jun 3 03:59:48 myserver postfix/qmgr[19373]: 1FBBF7C074A: removedИ конфиг:
Код: Выделить всё
postconf -n
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = scan:[127.0.0.1]:10027
daemon_directory = /usr/libexec/postfix
debug_peer_level = 10
debug_peer_list = mysql:/etc/postfix/debug.cf
header_checks = regexp:/etc/postfix/header.cf
html_directory = /usr/share/doc/postfix/html
inet_interfaces = all
local_transport = virtual
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
message_size_limit = 10000000
mime_header_checks = regexp:/etc/postfix/header_mime.cf
mydestination = localhost
mydomain = myserver.ru
myhostname = myserver.ru
mynetworks = 127.0.0.0/8, 192.168.1.0/24, 192.168.2.0/24
mynetworks_style = host
myorigin = $myhostname
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix/README_FILES
receive_override_options = no_address_mappings
relay_domains = myserver.ru
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_helo_timeout = 60s
smtp_mail_timeout = 60s
smtp_rcpt_timeout = 90s
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = mysql:/etc/postfix/virtual_password.cf
smtp_use_tls = yes
smtpd_banner = Welcome to $myhostname ESMTP Mail Server
smtpd_etrn_restrictions = permit_mynetworks, reject
smtpd_recipient_restrictions =
permit_sasl_authenticated,
permit_mynetworks,
check_helo_access hash:/etc/postfix/postmaster.cf,
check_sender_access hash:/etc/postfix/postmaster.cf,
reject_unknown_hostname,
reject_invalid_hostname,
reject_unauth_destination,
reject_unauth_pipelining,
reject_invalid_helo_hostname,
reject_non_fqdn_sender,
reject_non_fqdn_helo_hostname,
reject_unknown_sender_domain,
reject_unverified_sender,
reject_unverified_recipient,
check_sender_access hash:/etc/postfix/allow.cf,
check_helo_access hash:/etc/postfix/allow.cf,
check_client_access pcre:/etc/postfix/access_pcre.cf,
check_policy_service inet:127.0.0.1:10023,
permit_auth_destination,
reject
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = cyrus
smtpd_timeout = 120s
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_received_header = no
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:/var/spool/postfix/smtpd_tls_session_cache
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
transport_maps = hash:/etc/postfix/transport.cf
unknown_local_recipient_reject_code = 450
virtual_gid_maps = mysql:/etc/postfix/virtual_gid.cf
virtual_mailbox_base = /var/maildir
virtual_mailbox_limit = 100000000
virtual_mailbox_maps = mysql:/etc/postfix/mailbox_maps.cf
virtual_uid_maps = mysql:/etc/postfix/virtual_uid.cfЕсли кто знает как отсекать такие письма, был бы очень рад ...