Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've been trying to get sendmail to use zen.spamhaus.org as a dnsbl. I try the Crynwr test and it emails me telling me that it failed. I get one email saying, Uh-oh, your SBL block is not working! and the second email,

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:<anelson@bgmfastners.com>
250 2.1.5 <anelson@bgmfastners.com>... Recipient ok
data
354 Enter mail, end with "." on a line by itself
From: nelson-PBL-test@crynwr.com
To: anelson@bgmfastners.com
Date: Tue, 22 Sep 2009 19:26:16 -0000
Message-Id: <1253647576@pbl.crynwr.com>
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.

This is my sendmail mc file:

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

Any pointers or hints is greatly appreciated

share|improve this question

1 Answer 1

up vote 0 down vote accepted

I'm not a sendmail expert, but I can provide a sample of working config (tested it on crynwr via telnet). Taken from one of my old RH servers, so it can be in quite bad shape. Also you should consider that order of options in sendmail configuration file could be the culprit of your problems.

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

HTH

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.