Temp fail not working... - SpamAssassin

This is a discussion on Temp fail not working... - SpamAssassin ; Hello all. My spamass-milter INPUT_MAIL_FILTER config in sendmail is as follows: INPUT_MAIL_FILTER(`spamassassin',`S=local:/var/run/spamass.sock,F=T, ...)dnl Yet when I test this feature by manually shutting down spamassassin (service spamassassin stop), I still receive messages. Shouldn't they be temp failed? What I see in ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Temp fail not working...

  1. Temp fail not working...

    Hello all.

    My spamass-milter INPUT_MAIL_FILTER config in sendmail is as follows:

    INPUT_MAIL_FILTER(`spamassassin',`S=local:/var/run/spamass.sock,F=T, ...)dnl

    Yet when I test this feature by manually shutting down spamassassin (service
    spamassassin stop), I still receive messages. Shouldn't they be temp
    failed?

    What I see in the logs is 3 failed attempts by spamass-milter (spamc) to
    connect to spamassassin (spamd) after which sendmail delivers the message to
    the recipient:

    May 23 13:57:43 mail spamc[10285]: connect(AF_INET) to spamd at 127.0.0.1
    failed, retrying (#1 of 3): Connection refused
    May 23 13:57:44 mail spamc[10284]: connect(AF_INET) to spamd at 127.0.0.1
    failed, retrying (#3 of 3): Connection refused
    May 23 13:57:44 mail spamc[10285]: connect(AF_INET) to spamd at 127.0.0.1
    failed, retrying (#2 of 3): Connection refused
    May 23 13:57:45 mail spamc[10284]: connection attempt to spamd aborted after
    3 retries
    May 23 13:57:45 mail spamc[10285]: connect(AF_INET) to spamd at 127.0.0.1
    failed, retrying (#3 of 3): Connection refused
    May 23 13:57:46 mail sendmail[10287]: STARTTLS=client,
    relay=server.mydomain.local., version=TLSv1/SSLv3, verify=FAIL,
    cipher=RC4-MD5, bits=128/128
    May 23 13:57:46 mail sendmail[10287]: m4N3va6b010268:
    to=, delay=00:00:06, xdelay=00:00:00, mailer=smtp,
    pri=127244, relay=server.mydomain.local. [10.1.1.2], dsn=2.0.0, stat=Sent (
    <996101c7ccdd$b0256d30$c0a80002@Annie> Queued mail for delivery)

    I absolutely need to have all messages scanned for SPAM - too much of it in
    our domains! What can I do to rectify this issue?

    Server config:

    OS - Red Hat Enterprise Linux AS 4 (Nahant)
    Sendmail - 8.13.1-2
    spamass-milter - 0.3.1
    spamassassin - 3.1.7 (2006-10-05)
    Perl - 5.8.5-12


    Cheers,
    AK.


  2. RE: Temp fail not working...

    > -----Original Message-----
    > From: Anthony Kamau [mailto:anthony@anroet.com]
    > Sent: Friday, 23 May 2008 2:07 PM
    > To: users@spamassassin.apache.org
    > Subject: Temp fail not working...
    >
    > I absolutely need to have all messages scanned for SPAM - too much of it
    > in
    > our domains! What can I do to rectify this issue?
    >


    After further diagnosis, it appears that if I keep spamassassin running but
    busy enough not to respond to new connections, then new connections will be
    temp failed. Maybe I have it all wrong, but I'd think that one would like
    it to temp fail whether or not spamassassin is running!!! Can someone
    please set me on the straight and narrow, please? It is killing me when I
    get all sorts of complaints from my users when they get spam that is not
    tagged! Company policy dictates that all mail is delivered as long as it is
    scanned for spam and viruses!


    Cheers,
    AK.


  3. Re: Temp fail not working...

    >> -----Original Message-----
    >> From: Anthony Kamau [mailto:anthony@anroet.com]
    >> Sent: Friday, 23 May 2008 2:07 PM
    >> To: users@spamassassin.apache.org
    >> Subject: Temp fail not working...
    >>
    >> I absolutely need to have all messages scanned for SPAM
    >> - too much of it in
    >> our domains! What can I do to rectify this issue?
    >>

    >
    > After further diagnosis, it appears that if I keep
    > spamassassin running but busy enough not to respond to
    > new connections, then new connections will be temp
    > failed. Maybe I have it all wrong, but I'd think that
    > one would like it to temp fail whether or not
    > spamassassin is running!!! Can someone please set me on
    > the straight and narrow, please? It is killing me when I
    > get all sorts of complaints from my users when they get
    > spam that is not tagged! Company policy dictates that
    > all mail is delivered as long as it is scanned for spam
    > and viruses!
    >
    >
    > Cheers,
    > AK.



    Do you have -x in your call to spamc?


    man spamc

    -x, --no-safe-fallback

    Disables the 'safe fallback' error-recovery method, which passes through the unaltered message if an error occurs. Instead, exit with an error code, and let the MTA queue up the mails for a retry later. See also "EXIT CODES".


  4. RE: Temp fail not working...

    > -----Original Message-----
    > From: Jari Fredriksson [mailto:jarif@iki.fi]
    > Sent: Friday, 23 May 2008 3:29 PM
    > To: Anthony Kamau; users@spamassassin.apache.org
    > Subject: Re: Temp fail not working...
    >
    >
    > Do you have -x in your call to spamc?
    >
    >


    Thanks for that. I added that option to the startup script and restarted
    spamc (service spamass-milter restart) then killed spamd (service
    spamassassin stop).

    Oddly enough, messages are still being delivered by sendmail!!! I then
    checked the process list and saw the following:

    /usr/bin/spamd -d -c -m5 -H -x -q -u spambucket -r /var/run/spamd.pid
    spamass-milter -p /var/run/spamass.sock -f -x

    Further reading of `man spamc' revealed that option `-f' is non-existent (at
    least not mentioned in my spamc man pages); there's only a `-F' option - so
    why do I have this option that appears to do nothing for me? Could it be
    that it was meant to be `-F'?

    Well, I removed that option from the startup script and on trying to start
    the service, it hang indefinitely! I then added `-F' in its place and I got
    the following output:

    ################################################## #########
    [akk@localhost ~]# sudo /sbin/service spamass-milter start
    Starting spamass-milter: spamass-milter: invalid option -- F
    spamass-milter - Version 0.3.1
    SpamAssassin Sendmail Milter Plugin
    Usage: spamass-milter -p socket [-b|-B bucket] [-d xx[,yy...]] [-D host]
    [-e defaultdomain] [-f] [-i networks] [-m] [-M]
    [-P pidfile] [-r nn] [-u defaultuser] [-x]
    [-- spamc args ]
    -p socket: path to create socket
    -b bucket: redirect spam to this mail address. The orignal
    recipient(s) will not receive anything.
    -B bucket: add this mail address as a BCC recipient of spam.
    -d xx[,yy ...]: set debug flags. Logs to syslog
    -D host: connect to spamd at remote host (deprecated)
    -e defaultdomain: pass full email address to spamc instead of just
    username. Uses 'defaultdomain' if there was none
    -f: fork into background
    -i: skip (ignore) checks from these IPs or netblocks
    example: -i 192.168.12.5,10.0.0.0/8,172.16.0.0/255.255.0.0
    -m: don't modify body, Content-type: or Subject:
    -M: don't modify the message at all
    -P pidfile: Put processid in pidfile
    -r nn: reject messages with a score >= nn with an SMTP error.
    use -1 to reject any messages tagged by SA.
    -u defaultuser: pass the recipient's username to spamc.
    Uses 'defaultuser' if there are multiple recipients.
    -x: pass email address through alias and virtusertable expansion.
    -- spamc args: pass the remaining flags to spamc.
    [FAILED]
    [akk@localhost ~]#
    ################################################## #########

    This is when I realized that the man page falsely states what the `-x'
    option does, and as seen above, there isn't even a -F option as stated in
    the man pages. From the above, it is clear what `-x' does:

    -x: pass email address through alias and virtusertable expansion.

    I also understand why when I killed the Ctrl-C'd from the hang session, I
    got the [OK] message; the process was not forking to the background!

    So, is it that I have a real old version of spamass-milter? Odd thing is
    that I cannot find a newer version!!!


    Puzzled,
    AK.


  5. Re: Temp fail not working...

    >>
    >>
    >> Do you have -x in your call to spamc?
    >>
    >>

    >
    > Thanks for that. I added that option to the startup script and restarted
    > spamc (service spamass-milter restart) then killed spamd (service
    > spamassassin stop).
    >
    > Oddly enough, messages are still being delivered by sendmail!!! I then
    > checked the process list and saw the following:
    >
    > /usr/bin/spamd -d -c -m5 -H -x -q -u spambucket -r /var/run/spamd.pid
    > spamass-milter -p /var/run/spamass.sock -f -x
    >
    > Further reading of `man spamc' revealed that option `-f' is non-existent (at
    > least not mentioned in my spamc man pages); there's only a `-F' option - so
    > why do I have this option that appears to do nothing for me? Could it be
    > that it was meant to be `-F'?
    >
    > Well, I removed that option from the startup script and on trying to start
    > the service, it hang indefinitely! I then added `-F' in its place and I got
    > the following output:
    >
    > ################################################## #########
    > [akk@localhost ~]# sudo /sbin/service spamass-milter start
    > Starting spamass-milter: spamass-milter: invalid option -- F
    > spamass-milter - Version 0.3.1
    > SpamAssassin Sendmail Milter Plugin
    > Usage: spamass-milter -p socket [-b|-B bucket] [-d xx[,yy...]] [-D host]
    > [-e defaultdomain] [-f] [-i networks] [-m] [-M]
    > [-P pidfile] [-r nn] [-u defaultuser] [-x]
    > [-- spamc args ]
    > -p socket: path to create socket
    > -b bucket: redirect spam to this mail address. The orignal
    > recipient(s) will not receive anything.
    > -B bucket: add this mail address as a BCC recipient of spam.
    > -d xx[,yy ...]: set debug flags. Logs to syslog
    > -D host: connect to spamd at remote host (deprecated)
    > -e defaultdomain: pass full email address to spamc instead of just
    > username. Uses 'defaultdomain' if there was none
    > -f: fork into background
    > -i: skip (ignore) checks from these IPs or netblocks
    > example: -i 192.168.12.5,10.0.0.0/8,172.16.0.0/255.255.0.0
    > -m: don't modify body, Content-type: or Subject:
    > -M: don't modify the message at all
    > -P pidfile: Put processid in pidfile
    > -r nn: reject messages with a score >= nn with an SMTP error.
    > use -1 to reject any messages tagged by SA.
    > -u defaultuser: pass the recipient's username to spamc.
    > Uses 'defaultuser' if there are multiple recipients.
    > -x: pass email address through alias and virtusertable expansion.
    > -- spamc args: pass the remaining flags to spamc.
    > [FAILED]
    > [akk@localhost ~]#
    > ################################################## #########
    >
    > This is when I realized that the man page falsely states what the `-x'
    > option does, and as seen above, there isn't even a -F option as stated in
    > the man pages. From the above, it is clear what `-x' does:
    >
    > -x: pass email address through alias and virtusertable expansion.
    >
    > I also understand why when I killed the Ctrl-C'd from the hang session, I
    > got the [OK] message; the process was not forking to the background!
    >
    > So, is it that I have a real old version of spamass-milter? Odd thing is
    > that I cannot find a newer version!!!
    >
    >
    > Puzzled,
    > AK.
    >
    >
    >


    Hey! Do not mix options for spamc and spamass-milter! Put all the options back as they were, and then

    (I do not know spamass-milter, but your message has the help in it!)

    add

    -- -x

    to the end of the milter call. See the last line of then milter usage:
    > -- spamc args: pass the remaining flags to spamc.


    -x for milter is different from -x for spamc! Same goes with -f and -F !!


  6. RE: Temp fail not working...

    > -----Original Message-----
    > From: Jari Fredriksson [mailto:jarif@iki.fi]
    > Sent: Saturday, 24 May 2008 12:54 PM
    > To: Anthony Kamau; users@spamassassin.apache.org
    > Subject: Re: Temp fail not working...
    >
    > Hey! Do not mix options for spamc and spamass-milter! Put all the options
    > back as they were, and then
    >


    Thanks for setting me on the straight and narrow. I now clued in on what
    I'm doing wrong!

    Cheers,
    AK.


  7. RE: Temp fail not working...

    > -----Original Message-----
    > From: Jari Fredriksson [mailto:jarif@iki.fi]
    > Sent: Saturday, 24 May 2008 12:54 PM
    > To: Anthony Kamau; users@spamassassin.apache.org
    > Subject: Re: Temp fail not working...
    >
    > Hey! Do not mix options for spamc and spamass-milter! Put all the options
    > back as they were, and then
    >
    > (I do not know spamass-milter, but your message has the help in it!)
    >
    > add
    >
    > -- -x
    >
    > to the end of the milter call. See the last line of then milter usage:
    > > -- spamc args: pass the remaining flags to spamc.

    >
    > -x for milter is different from -x for spamc! Same goes with -f and -F !!
    >
    >


    Thanks so much Jari for sorting me out. Your help was invaluable!

    All is now working as I was hoping it would.


    Cheers,
    AK.


+ Reply to Thread