Sendmail + Greylisting + SpamAssassin

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
dougp23
Posts: 22
Joined: 2006/12/06 00:31:08

Sendmail + Greylisting + SpamAssassin

Post by dougp23 » 2008/04/23 13:47:03

I am running a sendmail server on CentOS 4.4.

I use SpamAssassin to get a lot of spam, but want to enable greylisting.

Can someone show me a sample sendmail.cf file that incorporates both greylisting and spamassassin?

My portion of sendmail.cf for SpamAssassin looks like this right now:

# Input mail filters
O InputMailFilters=spamassassin

# Milter options
#O Milter.LogLevel
O Milter.macros.connect=j, _, {daemon_name}, {if_name}, {if_addr}
O Milter.macros.helo={tls_version}, {cipher}, {cipher_bits}, {cert_subject},
{cert_issuer}
O Milter.macros.envfrom=i, {auth_type}, {auth_authen}, {auth_ssf},
{auth_author}, {mail_mailer}, {mail_host}, {mail_addr}
O Milter.macros.envrcpt={rcpt_mailer}, {rcpt_host}, {rcpt_addr}
O Milter.macros.eom={msg_id}

I found one writeup that looks close, but seems to ignore the InputMailFilters line. Here it is:

INPUT_MAIL_FILTER(`greylist',`S=local:/var/lib/milter-greylist/run/milter-greylist.sock')
define(`confMILTER_MACROS_CONNECT', `j, {if_addr}')
define(`confMILTER_MACROS_HELO', `{verify}, {cert_subject}')
define(`confMILTER_MACROS_ENVFROM', `i, {auth_authen}')
INPUT_MAIL_FILTER(`spamassassin', `S=local:/var/run/spamass-milter/spamass-milter.sock, F=,T=C:15m;S:4m;R:4m;E:10m')dnl

Any ideas anyone?

michaelnel
Posts: 1478
Joined: 2006/05/29 16:50:11
Location: San Francisco, CA

Sendmail + Greylisting + SpamAssassin

Post by michaelnel » 2008/04/30 00:00:12

This is what I use in /etc/mail/sendmail.mc:

[code]
dnl
define(`_FFR_MILTER', `1')dnl
dnl
dnl --- Milter-Greylist -----------------------------------------------
dnl
dnl See /usr/share/doc for the milter-greylist documentation.
dnl
FEATURE(`milter-greylist',`S=local:/var/milter-greylist/milter-greylist.sock')dnl
define(`confMILTER_MACROS_CONNECT', `j, {if_addr}')
dnl This makes it bypass greylisting for users that use STARTTLS with a
dnl client certificate
define(`confMILTER_MACROS_HELO', `{verify}, {cert_subject}')
dnl This makes it bypass greylisting for users who have SMTP AUTHed
define(`confMILTER_MACROS_ENVFROM', `i, {auth_authen}')
dnl This lets you do fancy greylisting using the WHITE value in access.db
define(`confMILTER_MACROS_ENVRCPT', `{greylist}')
dnl #
[/code]

msimpson
Posts: 4
Joined: 2007/03/03 12:04:17

Re: Sendmail + Greylisting + SpamAssassin

Post by msimpson » 2008/12/13 02:50:39

Hi all,

We are running Centos 4.7 and started having trouble with milter-greylist. Here is the startup error

Dec 9 14:28:59 neptune sendmail[28471]: mB93Sw3d028471: Milter (greylist): local socket name /var/lib/milter-greylist/run/milter-greylist.sock unsafe
Dec 9 14:28:59 neptune sendmail[28471]: mB93Sw3d028471: Milter (greylist): to error state

Here is our sendmail.mc:
INPUT_MAIL_FILTER(`greylist',`S=local:/var/lib/milter-greylist/run/milter-greylist.sock, F=, T=S:1m;R:1m')dnl
define(`confMILTER_MACROS_CONNECT', `j, {if_addr}')
define(`confMILTER_MACROS_HELO', `{verify}, {cert_subject}')
define(`confMILTER_MACROS_ENVFROM', `i, {auth_authen}')
define(`confMILTER_MACROS_ENVRCPT', `{greylist}')dnl

# ls -Flags /var/milter-greylist
total 24
8 drwxr-xr-x 2 smmsp 4096 Dec 13 13:07 ./
8 drwxr-xr-x 26 root 4096 Dec 12 17:24 ../
8 -rwxr-xr-x 1 root 6 Dec 12 18:15 milter-greylist.pid*
0 srwxr-xr-x 1 smmsp 0 Dec 13 13:07 milter-greylist.sock=


Can anyone help?

Matt

Post Reply

Return to “CentOS 4 - Server Support”