<<< Date Index >>>     <<< Thread Index >>>

Re: save-hooks and mailinglists



# mark.weinem@xxxxxxxxxxxxxxx / 2003-10-31 13:27:37 +0100:
> On Fri, 31 Oct 2003, David T-G wrote:
> 
> [maildrop]
> > Do you mean "it's even more simple than simple" or "it's not THAT
> > simple"?
> 
> yes, "not THAT simple"

    well, you still have to be able to read manual pages, but other than
    that... it depends on the way you use it. people use maildrop to
    deliver email to virtual users (maildirs/mailboxes without shell
    accounts), and have it (maildrop) read the configuration from RDBMS
    or LDAP servers and whatnot. that's not simple, but still quite easy
    to set up. (I have no idea whether procmail has such features.)

    main advantage maildrop has over procmail (claims about quality of
    the procmail code, which I can't comment on, aside) is its
    (superficially) C-like syntax, meaning much of your prior knowledge
    is transferrable. these snippets are from my setup:

    if (/^Sender: owner-freebsd-questions@freebsd\.org$/)
    {
        if (/^X-MimeOLE: Produced By Microsoft MimeOLE/)
        {
            to /dev/null
        }
        to "$LISTDIR/fbsd-q+n/"
    }

    that is quite simple, isn't it? BTW, what would be the equivalent in
    procmail? then next example is a wee bit more complicated (and as
    far as I needed to go with maildrop to satisfy my mailsorting
    needs):

    if (/^List-Post: <mailto:courier-maildrop@lists\.sourceforge\.net>$/)
    {
        COOKIE="maildropl"
        include "$RCDIR/subject"
        to "$LISTDIR/maildrop/"
    }

    --- begin $RCDIR/subject ---
    /^subject: .*$/
    while ($MATCH =~ /^.*!\[$COOKIE\] *!.*$/)
    {
        MATCH="${MATCH}${MATCH3}"
    }
    xfilter "reformail -i'$MATCH'"
    ---  end $RCDIR/subject  ---

    this fixes posts from broken mailing lists that munge Subject:
    headers.


    conclusion: you still need working knowledge of regular
    expressions, but who doesn't know them these days? :P

-- 
If you cc me or remove the list(s) completely I'll most likely ignore
your message.    see http://www.eyrie.org./~eagle/faqs/questions.html