Sendmail 检查 dnsbl 是否存在垃圾邮件

Sendmail 检查 dnsbl 是否存在垃圾邮件

我一直在尝试让 sendmail 使用 zen.spamhaus.org 作为 dnsbl。我尝试了Crynwr 测试然后它给我发邮件说它失败了。我收到一封邮件说,Uh-oh, your SBL block is not working! 第二封邮件说,

I connected to 24.238.61.107 and here's the conversation I had:
220 Almaren.bgm.local ESMTP Sendmail 8.14.2/8.14.2; Tue, 22 Sep 2009 15:26:13 -0400
helo pbl.crynwr.com
250 Almaren.bgm.local Hello cpe-static-bgmfastnerco-rtr.cmts.haw.ptd.net
[24.238.61.107], pleased to meet you
mail from:<>
250 2.1.0 <>... Sender ok
rcpt to:<[email protected]>
250 2.1.5 <[email protected]>... Recipient ok
data
354 Enter mail, end with "." on a line by itself
From: [email protected]
To: [email protected]
Date: Tue, 22 Sep 2009 19:26:16 -0000
Message-Id: <[email protected]>
Precedence: junk

Test message
.
250 2.0.0 n8MJQDD4018781 Message accepted for delivery
quit
Successful termination.  As far as I can tell, the email was delivered.
That might not be what you want.

这是我的 sendmail mc 文件:

include(`../m4/cf.m4')
VERSIONID(`default setup for Slackware Linux')dnl
OSTYPE(`linux')dnl
dnl# These settings help protect against people verifying email addresses
dnl# at your site in order to send you email that you probably don't want:
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun,goaway')dnl
define(`confAUTH_MECHANISMS',`DIGEST-MD5 CRAM-MD5')
define(`confAUTH_OPTIONS', `A p y')dnl
TRUST_AUTH_MECH(`DIGEST-MD5 CRAM-MD5')dnl
DAEMON_OPTIONS(`M=A')

dnl# No timeout for ident:
define(`confTO_IDENT', `0')dnl
dnl# Enable the line below to use smrsh to restrict what sendmail can run:
dnl FEATURE(`smrsh',`/usr/sbin/smrsh')dnl

dnl# See the README in /usr/share/sendmail/cf for a ton of information on
dnl# how these options work:
FEATURE(`dnsbl',`zen.spamhaus.org',`"554 Rejected " $&{client_addr} " found in   zen.spamhaus.org Please contact your systems administrator "',`t')dnl
FEATURE(`use_cw_file')dnl
FEATURE(`use_ct_file')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access')dnl
FEATURE(`blacklist_recipients')dnl
FEATURE(`local_procmail',`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`always_add_domain')dnl
FEATURE(`redirect')dnl
EXPOSED_USER(`root')dnl
MASQUERADE_AS(`bgmfastners.com') dnl
dnl# Also accept mail for localhost.localdomain:
dnl#LOCAL_DOMAIN(`localhost.localdomain')dnl
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl

任何指示或提示都非常感谢

答案1

我不是 sendmail 专家,但我可以提供一个工作配置示例(通过 telnet 在 crynwr 上测试过)。取自我的一台旧 RH 服务器,因此可能状况相当糟糕。此外,您还应该考虑 sendmail 配置文件中的选项顺序可能是导致问题的罪魁祸首。

divert(-1)dnl 
# * `sendmailconfig`
divert(0)dnl 
define(`_USE_ETC_MAIL_')dnl 
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl 
VERSIONID(`$Id: sendmail.mc, v 8.13.4-3 2005-06-03 16:49:22 cowboy Exp $')dnl
OSTYPE(`linux')dnl 
define(`confDEF_USER_ID',``8:12'')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST',true)dnl
define(`confDONT_PROBE_INTERFACES',true)dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
FEATURE(`no_default_msa')dnl 
DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl 
DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp, Addr=some_ip')dnl 
DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=6725, Addr=some_ip')dnl 
DAEMON_OPTIONS(`Family=inet,  Name=MSP-v4, Port=submission, Addr=127.0.0.1')dnl 
CLIENT_OPTIONS(`Family=inet, Modifier=h, Address=some_ip')dnl
dnl ### do STARTTLS
define(`confCACERT_PATH', `/etc/pki/tls/certs/')dnl
define(`confCACERT', `/etc/pki/tls/certs/ca-bundle.crt')dnl
define(`confSERVER_CERT', `/etc/mail/certs/sendmail.crt')dnl
define(`confSERVER_KEY', `/etc/mail/certs/sendmail.key')dnl
define(`confCLIENT_CERT', `/etc/mail/certs/sendmail.crt')dnl
define(`confCLIENT_KEY', `/etc/mail/certs/sendmail.key')dnl
define(`confDH_PARAMETERS',`/etc/mail/certs/dhparam.pem')dnl
DAEMON_OPTIONS(`Family=inet, Port=465, Name=MTA-SSL, M=s')dnl
define(`confSMTP_LOGIN_MSG', `$j Server is ready at $b')dnl 
define(`confEIGHT_BIT_HANDLING', `pass8')dnl
define(`confALIAS_WAIT', `10')dnl 
dnl Common timeouts dnl
define(`confTO_INITIAL', `30s')dnl
define(`confTO_HELO', `3m')dnl
define(`confTO_DATAFINAL', `5m')dnl
define(`confTO_STARTTLS', `30s')dnl
define(`confTO_COMMAND', `1m')dnl
define(`confTO_IDENT', `0s')dnl 
dnl Message-delivery notes & warning timeouts dnl 
define(`confTO_QUEUERETURN', `2d')dnl
define(`confTO_QUEUEWARN_NORMAL', `1h')dnl 
define(`confTO_QUEUEWARN_NONURGENT', `1h')dnl 
define(`confTO_QUEUEWARN', `1h')dnl
define(`confTRY_NULL_MX_LIST',true)dnl 
define(`confDONT_PROBE_INTERFACES',true)dnl
define(`confMAX_MESSAGE_SIZE', `10000000')dnl 
define(`confMAX_RCPTS_PER_MESSAGE', `20')dnl 
define(`confMAX_DAEMON_CHILDREN', `200')dnl
define(`confMAX_QUEUE_CHILDREN', `100')dnl
define(`confMAX_QUEUE_RUN_SIZE', `15000')dnl 
define(`confMCI_CACHE_SIZE', `4')dnl
define(`confLOCAL_MAILER',`cyrusv2')
FEATURE(`limited_masquerade')dnl
FEATURE(`masquerade_envelope')dnl 
FEATURE(mailertable)dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')dnl 
FEATURE(`genericstable', `hash -o /etc/mail/genericstable')dnl
GENERICS_DOMAIN(`somedomain.tld')dnl
FEATURE(`virtuser_entire_domain')
FEATURE(always_add_domain)dnl 
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
FEATURE(`access_db')dnl
FEATURE(`blacklist_recipients')dnl
FEATURE(`enhdnsbl', `bl.spamcop.net', `"Spam blocked see: http://spamcop.net/bl.shtml?"$&{client_addr}')dnl
FEATURE(`dnsbl', `blackholes.mail-abuse.org',`550 Mail from $&{client_addr} rejected; see http://mail-abuse.org/cgi-bin/lookup?$&{client_addr}')dnl
FEATURE(`dnsbl', `dialups.mail-abuse.org',`550 Mail from $&{client_addr} rejected; see http://mail-abuse.org/dul/enduser.htm')dnl
FEATURE(`dnsbl', `relays.mail-abuse.org',`550 Mail from $&{client_addr} rejected; see http://work-rss.mail-abuse.org/cgi-bin/nph-rss?$&{client_addr}')dnl
FEATURE(`greet_pause', `1000')dnl 3 seconds
FEATURE(`relay_based_on_MX')dnl
FEATURE(`delay_checks')dnl
define(`confBAD_RCPT_THROTTLE',`3')dnl
FEATURE(`conncontrol', `nodelay', `terminate')dnl
FEATURE(`ratecontrol', `nodelay', `terminate')dnl 
FEATURE(local_procmail)dnl 
FEATURE(`nouucp', `reject')dnl 
define(`confAUTH_OPTIONS', `A')dnl 
define(`confAUTH_MECHANISMS', `GSSAPI DIGEST-MD5 CRAM-MD5 PLAIN LOGIN')dnl 
TRUST_AUTH_MECH(`GSSAPI DIGEST-MD5 CRAM-MD5 PLAIN LOGIN')dnl
INPUT_MAIL_FILTER(`clamav', `S=local:/var/run/clamd/milter.sock, F=, T=S:4m;R:4m')dnl
MAILER_DEFINITIONS
MAILER(`smtp')dnl
MAILER(`cyrusv2')dnl
dnl MAILER(`procmail')dnl
MASQUERADE_AS(`mx1.somedomain.tld')dnl 

高血压

相关内容