Professional Web Applications Themes

Spamassassin and procmail - Debian

Hi all, I currently use fetchmail and procmail to get and sort my mail. I'd like to use spamassassin as well, however when I add :0fw: spamassassin.lock | /usr/bin/spamassassin to my .procmailrc, it works ok, but then the mail gets delivered to /var/mail/<username>, rather than following the rest of my procmail recipes. Any ideas on how to alter this behaviour? A -- To UNSUBSCRIBE, email to [email]debian-user-requestlists.debian.org[/email] with a subject of "unsubscribe". Trouble? Contact [email]listmasterlists.debian.org[/email]...

  1. #1

    Default Spamassassin and procmail

    Hi all,

    I currently use fetchmail and procmail to get and sort my mail. I'd
    like to use spamassassin as well, however when I add
    :0fw: spamassassin.lock
    | /usr/bin/spamassassin
    to my .procmailrc, it works ok, but then the mail gets delivered to
    /var/mail/<username>, rather than following the rest of my procmail
    recipes.

    Any ideas on how to alter this behaviour?

    A


    --
    To UNSUBSCRIBE, email to [email]debian-user-requestlists.debian.org[/email]
    with a subject of "unsubscribe". Trouble? Contact [email]listmasterlists.debian.org[/email]
    Antony Gelberg Guest

  2. #2

    Default Re: Spamassassin and procmail

    On Sun, 2003-08-03 at 18:17, Antony Gelberg wrote:
    > I currently use fetchmail and procmail to get and sort my mail. I'd
    > like to use spamassassin as well, however when I add
    > :0fw: spamassassin.lock
    > | /usr/bin/spamassassin
    > to my .procmailrc, it works ok, but then the mail gets delivered to
    > /var/mail/<username>, rather than following the rest of my procmail
    > recipes.
    Use something like one of the following (first is for mbox,
    second for maildirs):

    :0fw: spamassassin.lock
    |/usr/bin/spamassassin
    /usr/home/username/mail/mailbox

    or

    :0fw: spamassassin.lock
    |/usr/bin/spamassassin
    /usr/home/username/Maildir/.Folder/

    Actually, locking isn't needed with maildirs, but I forget
    the correct syntax of the first line as I don't use procmail
    anymore ("man 5 {procmailrc,procmailex}") should give insight.

    HTH,
    j.

    --
    Jeremy L. Gaddis <jeremygaddis.org> <http://www.gaddis.org>



    --
    To UNSUBSCRIBE, email to [email]debian-user-requestlists.debian.org[/email]
    with a subject of "unsubscribe". Trouble? Contact [email]listmasterlists.debian.org[/email]
    Jeremy Gaddis Guest

  3. #3

    Default Re: Spamassassin and procmail

    On Sun, 2003-08-03 at 18:17, Antony Gelberg wrote:
    > I currently use fetchmail and procmail to get and sort my mail. I'd
    > like to use spamassassin as well, however when I add
    > :0fw: spamassassin.lock
    > | /usr/bin/spamassassin
    > to my .procmailrc, it works ok, but then the mail gets delivered to
    > /var/mail/<username>, rather than following the rest of my procmail
    > recipes.
    adding -P after | /usr/bin/spamassassin should do it:
    :0fw
    |/usr/bin/spamassassin -P
    /usr/home/username/mail/mailbox

    HTH,
    jernej


    --
    To UNSUBSCRIBE, email to [email]debian-user-requestlists.debian.org[/email]
    with a subject of "unsubscribe". Trouble? Contact [email]listmasterlists.debian.org[/email]
    J. Zidar Guest

  4. #4

    Default Re: Spamassassin and procmail

    On Mon, Aug 04, 2003 at 01:45:55AM -0500, Jeremy Gaddis wrote:
    > On Sun, 2003-08-03 at 18:17, Antony Gelberg wrote:
    > > I currently use fetchmail and procmail to get and sort my mail. I'd
    > > like to use spamassassin as well, however when I add
    > > :0fw: spamassassin.lock
    > > | /usr/bin/spamassassin
    > > to my .procmailrc, it works ok, but then the mail gets delivered to
    > > /var/mail/<username>, rather than following the rest of my procmail
    > > recipes.
    >
    > Use something like one of the following (first is for mbox,
    > second for maildirs):
    >
    > :0fw: spamassassin.lock
    > |/usr/bin/spamassassin
    > /usr/home/username/mail/mailbox
    But then doesn't that just deliver all the mail to
    /usr/home/username/mail/mailbox ? I want the output from spamassassin
    to go through the rest of my procmail recipes - I didn't spend days
    tuning them for nothing!

    A


    --
    To UNSUBSCRIBE, email to [email]debian-user-requestlists.debian.org[/email]
    with a subject of "unsubscribe". Trouble? Contact [email]listmasterlists.debian.org[/email]
    Antony Gelberg Guest

  5. #5

    Default Re: Spamassassin and procmail


    Antony Gelberg wrote:
    > Hi all,
    >
    > I currently use fetchmail and procmail to get and sort my mail. I'd
    > like to use spamassassin as well, however when I add
    > :0fw: spamassassin.lock
    > | /usr/bin/spamassassin
    > to my .procmailrc, it works ok, but then the mail gets delivered to
    > /var/mail/<username>, rather than following the rest of my procmail
    > recipes.
    >
    > Any ideas on how to alter this behaviour?
    >
    > A
    >
    >

    :0fw
    # Or, use spamd and spamd, which is a lot nicer to your machine
    # under heavy load:
    #|/usr/bin/spamc -s 500000 -d <host> -p 783
    | /usr/bin/spamassassin -P

    :0:
    * ^X-Spam-Status: Yes
    ..spam/


    ....might work better. The pipe to spamassassin just tags the mail, the
    second rule is what actually delivers the message. Depending on the
    version of spamassassin, the -P flag is not needed any more (my 2.55
    install's man page says that pipe to stdout is default behavior).

    You could also sort based on the level of "spamminess":


    #Sort into spam folders based on "spamminess". Folder names
    # have leading number so that Netscape sorts them correctly.
    :0:
    * ^X-Spam-Status: Yes
    #.spam/
    {
    :0:
    * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
    .spam.4-very-spammy/


    :0:
    * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*
    .spam.3-pretty-spammy/

    :0:
    * ^X-Spam-Level: \*\*\*\*\*\*
    .spam.2-somewhat-spammy/

    :0:
    .spam/
    }


    #Drop potential FN here:
    :0:
    * ^X-Spam-Level: \*\*\*\*
    ..spam.1-slightly-spammy/



    --Rich

    __________________________________________________ _______

    Rich Puhek
    ETN Systems Inc.
    2125 1st Ave East
    Hibbing MN 55746

    tel: 218.262.1130
    email: [email]rpuheketnsystems.com[/email]
    __________________________________________________ _______


    --
    To UNSUBSCRIBE, email to [email]debian-user-requestlists.debian.org[/email]
    with a subject of "unsubscribe". Trouble? Contact [email]listmasterlists.debian.org[/email]
    Rich Puhek Guest

  6. #6

    Default Re: Spamassassin and procmail

    On Mon, Aug 04, 2003 at 12:17:39AM +0100, Antony Gelberg wrote:
    | Hi all,
    |
    | I currently use fetchmail and procmail to get and sort my mail. I'd
    | like to use spamassassin as well, however when I add
    | :0fw: spamassassin.lock
    | | /usr/bin/spamassassin
    | to my .procmailrc, it works ok, but then the mail gets delivered to
    | /var/mail/<username>, rather than following the rest of my procmail
    | recipes.
    |
    | Any ideas on how to alter this behaviour?

    1) don't use an obsolete version of spamassassin

    2) tell SA that you want it to behave like it ought :-)
    (as someone else said, '-P'. the last several releases
    removed this parameter and the local delivery mis-feature)

    -D

    --
    The nice thing about windoze is - it does not just crash,
    it displays a dialog box and lets you press 'ok' first.

    [url]http://dman13.dyndns.org/~dman/[/url]

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.0.6 (GNU/Linux)
    Comment: For info see [url]http://www.gnupg.org[/url]

    iEYEARECAAYFAj8un60ACgkQiB6vp1xAVUDpmwCeL97/tfmdEWHkVQPgxfHiM1Sc
    cFgAmwe50nXOOvddrVP4TDLLxKjFQcna
    =+Vh7
    -----END PGP SIGNATURE-----

    Derrick 'dman' Hudson Guest

  7. #7

    Default Re: Spamassassin and procmail

    Antony Gelberg <antonyantgel.co.uk> writes:
    >
    > I currently use fetchmail and procmail to get and sort my mail. I'd
    > like to use spamassassin as well, however when I add
    >
    > :0fw: spamassassin.lock
    > | /usr/bin/spamassassin
    >
    > to my .procmailrc, it works ok, but then the mail gets delivered to
    > /var/mail/<username>, rather than following the rest of my procmail
    > recipes.
    Rich's answer is right. You need the "-P" option for the stable
    version of SpamAssassin, and you don't need a lock, so the complete
    rule should read:

    :0fw
    | /usr/bin/spamassassin -P

    As an extra bit of advice, you might want to consider upgrading to the
    version in "unstable" instead (which, by the way, doesn't need the
    "-P" option). A while back, I decided to give SpamAssassin a try to
    see if it did a better job than the homespun rules that I'd
    aculated over the last few years. I installed the 2.20-1woody
    version from stable, and I was very disappointed. It missed almost
    everything. For me, it was essentially useless.

    Before tossing SpamAssassin entirely in the bit bucket, I decided to
    give it a second chance by installing 2.55-3 from unstable. It was
    like night and day. The newer version does a much, much better job.

    The 2.55-3 source package builds fine on a vanilla Woody machine. (In
    fact, the unstable "spamassassin" binary package would install fine on
    a vanilla Woody system, too, except it has an apparently unnecessary
    dependency on "spamc" which depends on the unstable C library.)

    --
    Kevin <buhrtelus.net>


    --
    To UNSUBSCRIBE, email to [email]debian-user-requestlists.debian.org[/email]
    with a subject of "unsubscribe". Trouble? Contact [email]listmasterlists.debian.org[/email]
    Kevin Buhr Guest

  8. #8

    Default Re: Spamassassin and procmail

    Kevin Buhr said on Mon, Aug 04, 2003 at 12:05:43PM -0700:
    > The 2.55-3 source package builds fine on a vanilla Woody machine. (In
    > fact, the unstable "spamassassin" binary package would install fine on
    > a vanilla Woody system, too, except it has an apparently unnecessary
    > dependency on "spamc" which depends on the unstable C library.)
    I wouldn't call spamc unnecessary; spamassassin is a serious resource
    consumer, and starting a new copy for every message is a pretty easy way to
    crush your machine. Running spamd, and using spamc from procmail is much much
    lighter, and you're less likely to have 10 messages arrive at the same time and
    DoS your mail server.

    M

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.2 (FreeBSD)

    iD8DBQE/LsFzOtZWu2tc1lARApyHAJ4yLxo19MG3cSvD3NvuXfRi5PnPmw CeI17a
    slA/T2dQ5OXUf5GWirVVc9E=
    =OS/7
    -----END PGP SIGNATURE-----

    Mark Ferlatte Guest

  9. #9

    Default Re: Spamassassin and procmail

    Mark Ferlatte wrote:
    > Kevin Buhr said on Mon, Aug 04, 2003 at 12:05:43PM -0700:
    >
    >>The 2.55-3 source package builds fine on a vanilla Woody machine. (In
    >>fact, the unstable "spamassassin" binary package would install fine on
    >>a vanilla Woody system, too, except it has an apparently unnecessary
    >>dependency on "spamc" which depends on the unstable C library.)
    >
    >
    > I wouldn't call spamc unnecessary; spamassassin is a serious resource
    > consumer, and starting a new copy for every message is a pretty easy way to
    > crush your machine. Running spamd, and using spamc from procmail is much much
    > lighter, and you're less likely to have 10 messages arrive at the same time and
    > DoS your mail server.
    >
    > M
    Installing the unstable binaries on a woody system will pull in unstable
    libc etc., which is a bad thing. Therefore use Adrian Bunk's backports:
    [url]http://www.fs.tum.de/~bunk/packages/[/url]

    --
    Andrew

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.0.6 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - [url]http://enigmail.mozdev.org[/url]

    iD8DBQE/Lsq+qEms0aLHW4URAgc1AJ9oyaAvbR1I4wfXtBpslY3JfUoQiA CeIxTE
    oB5NKiWh9ALZQdICviysxig=
    =lcxc
    -----END PGP SIGNATURE-----

    Andrew McGuinness Guest

Similar Threads

  1. [procmail] [sed] [awk] cleaning up mail headers
    By Troy Piggins in forum Linux / Unix Administration
    Replies: 6
    Last Post: June 7th, 07:38 AM
  2. Procmail Problem
    By mat in forum Linux / Unix Administration
    Replies: 8
    Last Post: November 26th, 07:29 AM
  3. ProcMail with Perl and MailAudit
    By Pablo Fischer in forum PERL Beginners
    Replies: 0
    Last Post: August 31st, 01:21 AM
  4. Procmail partially working
    By J. Zidar in forum Debian
    Replies: 5
    Last Post: August 7th, 02:50 PM
  5. procmail and vacation
    By Per Hedeland in forum Sun Solaris
    Replies: 1
    Last Post: July 1st, 10:03 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139