Procmail

Discussion in 'NZ Computing' started by Shane, Jan 13, 2006.

  1. Shane

    Shane Guest

    Ive been putting off using procmail for some time (I see procrastination
    as an art form) Ive read a few hundred "how to's" and they all seem
    complicated. Up till now Ive been using a home rolled perl script that
    loads each mail, reads the headers, and then onsends the mail to the
    appropriate mailbox however this is becoming unfeasible as I have just
    subscribed to half a dozen mailing lists

    So...
    How the hell do I integrate procmail into my server Postfix + Courier Imap
    + Spamassassin + Clamav


    <cue stunned look>

    --
    Saliva causes cancer, but only if swallowed in small amounts over a long
    period of time.
    -- George Carlin
    Shane, Jan 13, 2006
    #1
    1. Advertising

  2. Shane

    Steve Guest

    On Sat, 14 Jan 2006 07:34:09 +1300, Shane wrote:

    > Ive been putting off using procmail for some time (I see procrastination
    > as an art form) Ive read a few hundred "how to's" and they all seem
    > complicated. Up till now Ive been using a home rolled perl script that
    > loads each mail, reads the headers, and then onsends the mail to the
    > appropriate mailbox however this is becoming unfeasible as I have just
    > subscribed to half a dozen mailing lists
    >
    > So...
    > How the hell do I integrate procmail into my server Postfix + Courier Imap
    > + Spamassassin + Clamav
    >
    >
    > <cue stunned look>

    You need to tell postfix to use procmail as your local delivery agent
    Then add rules to ~/.procmailrc like

    MAILDIR=$HOME/Maildir
    LOGFILE=$MAILDIR/procmail.log

    :0
    * ^Reply-To:.*@somegroup
    $MAILDIR/.somegroup/

    etc. The really important bit is the trailing /, which tells procmail to
    deliver to maildir, rather than mailfile which is what courier uses.

    Unfortunately, I can only tell you how to integrate with sendmail, not
    procmail. Your courier imap server doesn't need to be touched. Google
    points me to http://www.postfix.org/faq.html#procmail, which tells me you
    need to add the line
    mailbox_command = /path/to/procmail
    to /etc/postfix/main.cf and that's it.

    hth,

    Steve
    Steve, Jan 13, 2006
    #2
    1. Advertising

  3. Shane

    Shane Guest

    On Sat, 14 Jan 2006 10:25:05 +1300, Steve wrote:


    Thanks for that Steve,
    After spending a good part of the day banging my head on my desk I asked
    #postfix on freenode (authors of the tutorial I used for setting up my
    mailserver) and one very kindly told me the following

    "IINM the workaround.org HOWTO is for setting up virtual_mailbox_domains,
    and procmail only works for local(8) accounts, i.e., real shell accounts.
    Check out Courier maildrop"


    IOW (very unlike me of course) I was barking up the wrong frikkin tree!!!!
    I am now consoling myself to the fact that a light has appeared in the
    tunnel, and the neighbours are pleased the language has toned down for a
    bit :)


    --
    "Who is General Failure and why is he reading my hard disk ?"
    (By -berlin.de, Felix von Leitner)
    Shane, Jan 14, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Indo Geek

    Procmail Regex

    Indo Geek, May 11, 2007, in forum: Computer Support
    Replies:
    2
    Views:
    679
Loading...

Share This Page