Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Thread

FreeBSD install from pkg; is it running?

FreeBSD install from pkg; is it running?

2004-08-30 by William F. Dudley Jr.

Hi,

I installed milter-greylist 1.5.6 from the FreeBSD package.
System is: FreeBSD 4.10-STABLE.

Added to /etc/rc.conf:
miltergreylist_enable="YES"
miltergreylist_flags="${miltergreylist_flags} -v"

Customized /usr/local/etc/mail/greylist.conf appropriately.

Added this to sendmail.mc:
INPUT_MAIL_FILTER(`greylist', `S=local:/var/milter-greylist/milter-greylist.sock')
define(`confMILTER_MACROS_CONNECT', `j, {if_addr}')
define(`confMILTER_MACROS_HELO', `{verify}, {cert_subject}')
define(`confMILTER_MACROS_ENVFROM', `i, {auth_authen}')

rebuilt sendmail.cf and restarted sendmail ("make restart").

started greylist-milter by running:
"/usr/local/etc/rc.d/milter-greylist.sh start"

Both milter daemons are running as shown by "ps ax":
  218  ??  Ss     3:24.97 /usr/local/sbin/clamav-milter --postmaster-only --local --outgoing --max-children=50 /var/run/clamav/clmilter.sock
  43202  ??  Ss     0:07.33 /usr/local/bin/milter-greylist -P /var/run/milter-greylist.pid -f /usr/local/etc/mail/greylist.conf -p /var/milter-greylist/milter-greylist.sock -u smmsp -v

Tailing /var/log/maillog show no messages indicating greylist is functioning.

I have clamav milter running, so I know I can get milters
to run successfully.  I've got various black-holes configured and working
in my sendmail.mc file as well, but I'm not the kind of guy that hacks
sendmail.cf directly.  That way lies madness, I'm told.

(clamav-milter enters messages in maillog when it does it's thing,
plus puts a couple of lines in the message header.)

Mail is still being sent and received normally.  Spam is being rejected by
black holes or else is delivered if not listed.

Questions:
1. Did I miss something?
2. Where next to debug?

Thanks in advance,
Bill Dudley

below: greylist.conf changes from the "stock" sample, with comments:
this is my own address block:
31c31
< addr 209.191.27.16/28
---
> #addr 192.0.2.0/16

This is machines I wish to whitelist
36,38d35
< addr 209.191.58.1	# mail.monmouth.com
< addr 24.73.236.123	# linux-wlan-user mailing list
< addr 206.168.1.1	# sohc4 mailing list

addresses I wish to whitelist (yes, I know, redundancy here)
44,49d40
< from Loopframe_Guzzi@...
< from linux-wlan-user-request@...-wlan.com
< from sohc4@...
< from jddudley@...
< from tzaneo@...
< from gjdud@...

fixed a spelling error
55c46
< # recipient envelope address to achieve that.
---
> # recipient enveloppe address to achieve that.

don't greylist this user:
60,66d50
< rcpt kate@...
< rcpt kate1@...
< rcpt kate2@...
< rcpt kate3@...
< rcpt kate4@...
< rcpt kate5@...
< rcpt kate6@...

set autowhite to 10 days
91c75
< autowhite 10d
---
> #autowhite 3d

Re: [milter-greylist] FreeBSD install from pkg; is it running?

2004-08-30 by Jack L. Stone

At 02:06 PM 8.30.2004 -0400, William F. Dudley Jr. wrote:
>Hi,
>
>I installed milter-greylist 1.5.6 from the FreeBSD package.
>System is: FreeBSD 4.10-STABLE.
>
>Added to /etc/rc.conf:
>miltergreylist_enable="YES"
>miltergreylist_flags="${miltergreylist_flags} -v"
>
>Customized /usr/local/etc/mail/greylist.conf appropriately.
>
>Added this to sendmail.mc:
>INPUT_MAIL_FILTER(`greylist',
`S=local:/var/milter-greylist/milter-greylist.sock')
>define(`confMILTER_MACROS_CONNECT', `j, {if_addr}')
>define(`confMILTER_MACROS_HELO', `{verify}, {cert_subject}')
>define(`confMILTER_MACROS_ENVFROM', `i, {auth_authen}')
>
>rebuilt sendmail.cf and restarted sendmail ("make restart").
>
>started greylist-milter by running:
>"/usr/local/etc/rc.d/milter-greylist.sh start"
>
>Both milter daemons are running as shown by "ps ax":
>  218  ??  Ss     3:24.97 /usr/local/sbin/clamav-milter --postmaster-only
--local --outgoing --max-children=50 /var/run/clamav/clmilter.sock
>  43202  ??  Ss     0:07.33 /usr/local/bin/milter-greylist -P
/var/run/milter-greylist.pid -f /usr/local/etc/mail/greylist.conf -p
/var/milter-greylist/milter-greylist.sock -u smmsp -v
>
>Tailing /var/log/maillog show no messages indicating greylist is functioning.
>
>I have clamav milter running, so I know I can get milters
>to run successfully.  I've got various black-holes configured and working
>in my sendmail.mc file as well, but I'm not the kind of guy that hacks
>sendmail.cf directly.  That way lies madness, I'm told.
>
>(clamav-milter enters messages in maillog when it does it's thing,
>plus puts a couple of lines in the message header.)
>
>Mail is still being sent and received normally.  Spam is being rejected by
>black holes or else is delivered if not listed.
>
>Questions:
>1. Did I miss something?
>2. Where next to debug?
>
>Thanks in advance,
>Bill Dudley

You might consider adding this log-level line to your sendmail m4:
define(`confMILTER_LOG_LEVEL', 14)dnl

Then, while in /etc/mail:
make
make install
make restart

Now, you should be able to tail the progress of ALL of the milters in maillog.


Best regards,
Jack L. Stone,
Administrator

Sage American
http://www.sage-american.com
jacks@...

Re: [milter-greylist] FreeBSD install from pkg; is it running?

2004-08-30 by William F. Dudley Jr.

Thanks!  I've done it.  I'll let you know if I learn something interesting.

Bill Dudley
Show quoted textHide quoted text
> At 02:06 PM 8.30.2004 -0400, William F. Dudley Jr. wrote:
> >Hi,
> >
> >I installed milter-greylist 1.5.6 from the FreeBSD package.
> >System is: FreeBSD 4.10-STABLE.
> >
> >Added to /etc/rc.conf:
> >miltergreylist_enable="YES"
> >miltergreylist_flags="${miltergreylist_flags} -v"
> >
> >Customized /usr/local/etc/mail/greylist.conf appropriately.
> >
> >Added this to sendmail.mc:
> >INPUT_MAIL_FILTER(`greylist',
> `S=local:/var/milter-greylist/milter-greylist.sock')
> >define(`confMILTER_MACROS_CONNECT', `j, {if_addr}')
> >define(`confMILTER_MACROS_HELO', `{verify}, {cert_subject}')
> >define(`confMILTER_MACROS_ENVFROM', `i, {auth_authen}')
> >
> >rebuilt sendmail.cf and restarted sendmail ("make restart").
> >
> >started greylist-milter by running:
> >"/usr/local/etc/rc.d/milter-greylist.sh start"
> >
> >Both milter daemons are running as shown by "ps ax":
> >  218  ??  Ss     3:24.97 /usr/local/sbin/clamav-milter --postmaster-only
> --local --outgoing --max-children=50 /var/run/clamav/clmilter.sock
> >  43202  ??  Ss     0:07.33 /usr/local/bin/milter-greylist -P
> /var/run/milter-greylist.pid -f /usr/local/etc/mail/greylist.conf -p
> /var/milter-greylist/milter-greylist.sock -u smmsp -v
> >
> >Tailing /var/log/maillog show no messages indicating greylist is functioning.
> >
> >I have clamav milter running, so I know I can get milters
> >to run successfully.  I've got various black-holes configured and working
> >in my sendmail.mc file as well, but I'm not the kind of guy that hacks
> >sendmail.cf directly.  That way lies madness, I'm told.
> >
> >(clamav-milter enters messages in maillog when it does it's thing,
> >plus puts a couple of lines in the message header.)
> >
> >Mail is still being sent and received normally.  Spam is being rejected by
> >black holes or else is delivered if not listed.
> >
> >Questions:
> >1. Did I miss something?
> >2. Where next to debug?
> >
> >Thanks in advance,
> >Bill Dudley
> 
> You might consider adding this log-level line to your sendmail m4:
> define(`confMILTER_LOG_LEVEL', 14)dnl
> 
> Then, while in /etc/mail:
> make
> make install
> make restart
> 
> Now, you should be able to tail the progress of ALL of the milters in maillog.
> 
> 
> Best regards,
> Jack L. Stone,
> Administrator
> 
> Sage American
> http://www.sage-american.com
> jacks@...
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> !DSPAM:4133758d590288238818889!

Re: FreeBSD install from pkg; is it running? -- yes, now

2004-08-31 by William F. Dudley Jr.

To follow up with the answer to my own post:

You need to have a line like this:
define(`confINPUT_MAIL_FILTERS', `greylist,clmilter')dnl

in your sendmail.mc (or equivalent).  I have two milters installed,
but the line above only had clmilter listed, so that was the
only one that ran.  Once I modified to look like above,
now both milters are running.

Here's the entire excerpt from my .mc file for both milters:

--------------------- from my sendmail.mc ---------------------------
define(`confMILTER_LOG_LEVEL', 14)dnl

INPUT_MAIL_FILTER(`greylist', `S=local:/var/milter-greylist/milter-greylist.sock')dnl
define(`confMILTER_MACROS_CONNECT', `j, {if_addr}')dnl
define(`confMILTER_MACROS_HELO', `{verify}, {cert_subject}')dnl
define(`confMILTER_MACROS_ENVFROM', `i, {auth_authen}')dnl

INPUT_MAIL_FILTER(`clmilter',`S=local:/var/run/clamav/clmilter.sock,F=, T=S:4m;R:4m')dnl

define(`confINPUT_MAIL_FILTERS', `greylist,clmilter')dnl
------------------ end of excerpt from my sendmail.mc ----------------

The first line turns logging up so you see more messages in
/var/log/maillog.  Remove it when you have things running correctly
so maillog doesn't get so big.  (Thanks to Jack Stone for this
helpful bit.)

The last line was omitted from the sendmail example in the file:

http://hcpnet.free.fr/milter-greylist/README

If offered the chance, I would alter README to explain how to run two
milters.

Bill Dudley

Re: [milter-greylist] Re: FreeBSD install from pkg; is it running? -- yes, now

2004-08-31 by Graham Dunn

On Tue, Aug 31, 2004 at 01:16:05PM -0400, William F. Dudley Jr. wrote:
> To follow up with the answer to my own post:
> 
> You need to have a line like this:
> define(`confINPUT_MAIL_FILTERS', `greylist,clmilter')dnl
> 
> in your sendmail.mc (or equivalent).  I have two milters installed,
> but the line above only had clmilter listed, so that was the
> only one that ran.  Once I modified to look like above,
> now both milters are running.

INPUT_MAIL_FILTER(`milter-greylist', `S=local:/var/milter-greylist/milter-greylist.sock, T=S:4m;R:4m')dnl
INPUT_MAIL_FILTER(`mimedefang', `S=local:/var/spool/MIMEDefang/mimedefang.sock, F=T, T=S:6m;R:6m;E:15m')dnl

works for me...

the sendmail cf readme says:

----
For example, the two commands:

        INPUT_MAIL_FILTER(`archive', `S=local:/var/run/archivesock, F=R')
        INPUT_MAIL_FILTER(`spamcheck', `S=inet:2525@localhost, F=T')

are equivalent to the three commands:

        MAIL_FILTER(`archive', `S=local:/var/run/archivesock, F=R')
        MAIL_FILTER(`spamcheck', `S=inet:2525@localhost, F=T')
        define(`confINPUT_MAIL_FILTERS', `archive, spamcheck')

In general, INPUT_MAIL_FILTER() should be used unless you need to define
more filters than you want to use for `confINPUT_MAIL_FILTERS'.

Note that setting `confINPUT_MAIL_FILTERS' after any INPUT_MAIL_FILTER()
commands will clear the list created by the prior INPUT_MAIL_FILTER()
commands.
----

> 
> Here's the entire excerpt from my .mc file for both milters:
> 
> --------------------- from my sendmail.mc ---------------------------
> define(`confMILTER_LOG_LEVEL', 14)dnl
> 
> INPUT_MAIL_FILTER(`greylist', `S=local:/var/milter-greylist/milter-greylist.sock')dnl
> define(`confMILTER_MACROS_CONNECT', `j, {if_addr}')dnl
> define(`confMILTER_MACROS_HELO', `{verify}, {cert_subject}')dnl
> define(`confMILTER_MACROS_ENVFROM', `i, {auth_authen}')dnl
> 
> INPUT_MAIL_FILTER(`clmilter',`S=local:/var/run/clamav/clmilter.sock,F=, T=S:4m;R:4m')dnl
> 
> define(`confINPUT_MAIL_FILTERS', `greylist,clmilter')dnl
> ------------------ end of excerpt from my sendmail.mc ----------------

So the problem was the last line, which was clearing the greylist entry
from the milter list (until you added the greylist part).

You only need the `confINPUT_MAIL_FILTERS' bit when using MAIL_FILTER
entries, not INPUT_MAIL_FILTER.

So in summary, remove the last line and things should work as desired.

Graham

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.