On Thursday 08 April 2004 04:48 am, john gennard wrote:
I am not getting all my mail from lists filtered correctly (nothing is
lost, some merely goes into the default maildir). This appears to be
because I use '^' in my .mailfiler, and I cannot find anything which allows
me to say "if the list name appears anywhere in the 'To' header".
if (^To | Cc:.*hopalongcassidy\.com$/)
to Mail/hopalong/
would put mail "To:hopalogcassidy.com" into /Mail/hopalong'. Fine.
yep.
but "To: <hopalongcassidy.com>" goes into the default maildir (inbox).
right.
and "To: trigger rider <hopalongcassidy.com>" does the same.
right.
How do I deal with this hypothetical mail list and a number of other
genuine ones where the same problem obtains, please?
write a better regex that catches that. Say your mailing list is
fo...@bar.example.com, have it like this:
if (^To|CC:.*fo...@bar.example.com/)
to Mail/foobar/
or, if you're using qmail, a better way to do this would be to subscribe an
extension address to the mailing list and have a .qmail file to handle it.
For instance, my subscribe address for this list is
kitc...@scriptkitchen.com (I actually have two, but y'know)
in ~kitchen/.qmail-md I have:
./Maildir/.lists.maildrop/
and now I don't have to do any funny parsing, and I know that all messages in
that mailbox were sent to me by the mailing list, and not someone forging a
header into the box.
OR! instead of using maildrop for this (I know I'm preaching to the wrong
crowd, but I like using minimalistic tools where they are needed) use
condtomaildir from the qtools package and iftocc from the mess822 package,
and have something like:
|condtomaildir ./Mail/foobar/ iftocc fo...@bar.example.com
qtools: http://www.superscript.com/qtools/intro.html
mess822: http://cr.yp.to/mess822.html
-Jeremy