You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by John Ackley <jo...@ackley.net> on 2006/06/14 05:35:11 UTC

Going in circles with Postfix

Stuck in a loop.

New to SpamAssassin
Installed per
http://www.geekly.com/entries/archives/00000155.htm
    steps 1 through 8

(at step 3 I was confused about the use of sendmail which was moved to 
sendmail.sendmail
when postfix was installed and also installed was sendmail.postfix - I 
chose sendmail.sendmail
because sendmail.postfix resulted in an error message)
(at step 7 I do not understand the ":" (colon)- no reference to ";" in 
man 5 master - tried with and without
the ":" in step 7 - same results
# 
-----------------------------------------------------------------------------------
smtp inet n - n - - smtpd
  -o content_filter=spamfilter:
# 
-----------------------------------------------------------------------------------)

apparently I am stuck in a never ending loop as shown in maillog
(and a complaint from sendmail about use of -f)

Jun 13 22:47:50 kp2a postfix/postfix-script: starting the Postfix mail 
system
Jun 13 22:47:50 kp2a postfix/master[19055]: daemon started -- version 
2.2.8, configuration /etc/postfix

Jun 13 22:47:50 kp2a postfix/qmgr[19058]: A998F10C8CAE: from=<>, 
size=122823, nrcpt=1 (queue active)
Jun 13 22:47:50 kp2a spamd[17507]: spamd: connection from kp2a.vi 
[127.0.0.1] at port 48988
Jun 13 22:47:50 kp2a spamd[17507]: spamd: setuid to spamfilter succeeded
Jun 13 22:47:50 kp2a spamd[17507]: spamd: processing message 
<20...@kp2a.vi> for spamfilter:509
Jun 13 22:47:51 kp2a sendmail[19063]: k5E2lpPd019063: 
Authentication-Warning: kp2a.vi: spamfilter set sender to 
MAILER-DAEMON@kp2a.vi using -f
Jun 13 22:47:51 kp2a spamd[17507]: spamd: clean message (-1.4/5.0) for 
spamfilter:509 in 0.8 seconds, 120383 bytes.
Jun 13 22:47:51 kp2a spamd[17507]: spamd: result: . -1 - 
ALL_TRUSTED,AWL,SPF_HELO_PASS 
scantime=0.8,size=120383,user=spamfilter,uid=509,required_score=5.0,rhost=kp2a.vi,raddr=127.0.0.1,rport=48988,mid=<20...@kp2a.vi>,autolearn=unavailable
Jun 13 22:47:51 kp2a spamd[17504]: prefork: child states: II
Jun 13 22:47:51 kp2a sendmail[19063]: k5E2lpPd019063: 
from=MAILER-DAEMON@kp2a.vi, size=120387, class=0, nrcpts=1, 
msgid=<20...@kp2a.vi>, relay=spamfilter@localhost
Jun 13 22:47:51 kp2a postfix/smtpd[19064]: connect from kp2a.vi[127.0.0.1]
Jun 13 22:47:51 kp2a postfix/smtpd[19064]: 9B1E810C8CAC: 
client=kp2a.vi[127.0.0.1]
Jun 13 22:47:51 kp2a postfix/cleanup[19066]: 9B1E810C8CAC: 
message-id=<20...@kp2a.vi>

Jun 13 22:47:51 kp2a postfix/qmgr[19058]: 9B1E810C8CAC: from=<>, 
size=123238, nrcpt=1 (queue active)
this last entry is the start of an identical cycle - except file is 
bigger now?

help!

Versions:
Linux kp2a.vi 2.6.16-1.2122_FC5smp #1 SMP i686 athlon i386 
GNU/Linux                         
Mail-SpamAssassin-3.1.3 ohn@kp2a ~]$ perl -v
This is perl, v5.8.8 built for i386-linux-thread-multi
postfix.i386  2:2.2.8-1.2 installed

Running processes:
[root@kp2a postfix]# ps auxw | grep spam*
root     17504  0.0  2.4  30416 25124 ?        Ss   20:04   0:01 
/usr/bin/spamd -d -c -m5 -H -
r /var/run/spamd.pid
509      17507  0.5  4.2  49488 44072 ?        R    20:04   1:01 spamd child
root     18818  0.0  2.2  30416 23424 ?        S    22:43   0:00 spamd child
postfix  19388  0.0  0.1   6176  1780 ?        S    23:01   0:00 pipe -n 
spamfilter -t unix fl
ags=Rq user=spamfilter argv=/usr/bin/postfixfilter -f${sender} -- 
${recipient}
postfix  19393  0.5  0.2   6324  2284 ?        S    23:01   0:00 smtpd 
-n smtp -t inet -u -s 2
 -o content_filter spamfilter:
postfix  19396  0.0  0.1   6176  1776 ?        S    23:01   0:00 pipe -n 
spamfilter -t unix fl
ags=Rq user=spamfilter argv=/usr/bin/postfixfilter -f${sender} -- 
${recipient}
509      19403  0.0  0.1   4596  1280 ?        R    23:01   0:00 
/usr/bin/spamc




Re: Going in circles with Postfix

Posted by Bob Proulx <bo...@proulx.com>.
John Ackley wrote:
> Installed per
> http://www.geekly.com/entries/archives/00000155.htm
>    steps 1 through 8

Are you installing this for your own personal use?  Or for the use of
a larger group of people getting mail through a server?  Because those
directions are integrating spamassassin tighly into postfix in the
master.cf file.  That works and is what an ISP would typically do to
filter zillions of messages.  But I personally don't run spamassassin
that way.  It is much easier to run spamassassin out of your local
.forward file.

  http://wiki.apache.org/spamassassin/UsedViaProcmail

> (at step 3 I was confused about the use of sendmail which was moved to 
> sendmail.sendmail
> when postfix was installed and also installed was sendmail.postfix - I 
> chose sendmail.sendmail
> because sendmail.postfix resulted in an error message)

What operating system are you using?  It sounds to me from your
description that you are using Red Hat.  If so then what you are
seeing is normal because Red Hat normally installs both sendmail and
postfix both on the same machine at the same time.  That is actually a
pretty bizarre thing to do but so it is.  The executable
/usr/sbin/sendmail must exist and point to the configured program.  So
they use the (ported from Debian) alternstives system to symlink from
there to the configured binary.  The default mailer on Red Hat is the
old Sendamil program but Postfix is also installed but unconfigured.

You say that you chose sendmail.sendmail to avoid errors from
sendmail.postfix.  How did you choose this?  And by that stetement it
means that postfix is not configured on your machine so any
configuration you are doing to the postfix master.cf files will not
have any effect in that case.  If you *do* have postfix configured
then you should not be using sendmail.sendmail.  That won't work.

What errors are you seeing from sendmail.postfix?

Personally I recommend that you get your MTA straightened out without
trying to integrate spamassassin and then follow the instructions on
the wiki page to install spamassassin into your .procmailrc file.

> apparently I am stuck in a never ending loop as shown in maillog
> (and a complaint from sendmail about use of -f)

I think your base problem is that you have part sendmail and part
postfix going at the same time now.

> Jun 13 22:47:50 kp2a postfix/postfix-script: starting the Postfix mail system
> Jun 13 22:47:50 kp2a postfix/master[19055]: daemon started -- version 2.2.8, configuration /etc/postfix
> Jun 13 22:47:50 kp2a postfix/qmgr[19058]: A998F10C8CAE: from=<>, size=122823, nrcpt=1 (queue active)

Postfix running there.

> Jun 13 22:47:51 kp2a sendmail[19063]: k5E2lpPd019063: Authentication-Warning: kp2a.vi: spamfilter set sender to  MAILER-DAEMON@kp2a.vi using -f Jun 13 22:47:51 kp2a spamd[17507]: spamd: clean message (-1.4/5.0) for spamfilter:509 in 0.8 seconds, 120383 bytes.

Sendmail running there.

"Don't cross the streams."

If you are running Red Hat and want to configure postfix then here are
the steps to convert to postfix.  I have this scripted for use on
RHEL.  On other systems your mileage may vary.

  service sendmail stop
  chkconfig --del sendmail
  chkconfig postfix on
  service postfix restart
  update-alternatives --set mta /usr/sbin/sendmail.postfix

Bob