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

a little comparison of procmail and maildrop



On Fri, Oct 31, 2003 at 02:54:22PM +0100, Roman Neuhauser wrote:
>     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):

I think (and I'm no procmail expert.. there may be a better way to do
this) that the following recipes would do it.  I guess it turns out to
be about the same number of lines, just looks different :)

:0
* ^Sender: owner-freebsd-questions@freebsd\.org$
{
  :0
  * ^X-MimeOLE: Produced By Microsoft MimeOLE
  /dev/null
  :0E
  $LISTDIR/fbsd-q+n/
}

Also, procmail has a nice builtin regex that's useful for lists.  As
far as I can tell it's reasonably fast, and it catches a pretty good
range of possible messages:

:0
* ^TO_freebsd-questions@freebsd\.org
$LISTDIR/fbsd-q+n/

Would redirect any message with that address in any of several header
fields, including To:, Cc:, and (I think) Sender:

I'm sure there's a procmailish way to do your other thing about
unmangling subject lines.  That's a job for somebody who knows
procmail better, and is interested.  Seems like they're about
equivalent in capability and learning-curve to me..  though you have a
point that the C-like syntax of maildrop might make the curve a little
lower for some people.

Cheers,
 Allister

-- 
Allister MacLeod <amacleod@xxxxxxxx>
 Elen síla lúmenn'omentielvo.