5 messages in net.sourceforge.lists.courier-maildrop[maildropl] Replace functionality in ...
FromSent OnAttachments
Robin BowesJul 20, 2004 9:41 am 
Sam VarshavchikJul 20, 2004 5:38 pm 
Robin BowesJul 21, 2004 12:28 am 
Sam VarshavchikJul 21, 2004 4:09 am 
Robin BowesJul 21, 2004 4:38 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[maildropl] Replace functionality in maildrop?Actions...
From:Robin Bowes (robi@robinbowes.com)
Date:Jul 20, 2004 9:41:38 am
List:net.sourceforge.lists.courier-maildrop

Hi,

Is there any string "replace" functionality in maildrop? I've checked the docs
and there doesn't seem to be but I thought I'd ask here to check.

Here's what I'm trying to do...

I run qpsmtpd / qmail / vpopmail and use maildrop to deliver the mail so I can
spam filter it using bogofilter and auto-filter my mailing lists. It's the
auto-filtering I need some help with.

I have a series of pattern matches in mmy maildrop filter that identifies any
traffic from mailing lists and puts it into the appropriate folder. Something
like this:

if ( /^List-Post: <mailto:![0-9A-Za-z_\-]*!@.*!>/ \ || /^Delivered-To: mailing list ![0-9A-Za-z_\-]*!@.*/ \ || /^X-Mailing-List:[:space:]![0-9A-Za-z_\-]*!@.*/ \ || /^Return-Path: <owner-![0-9A-Za-z_\-]*!@.*>/ ) { exception { if (${LOGGING_ENABLED}) { log "Matched mailing list ${MATCH2}" } to "${VMAILDIR}/${LISTS}.${MATCH2}/" } }

So for example, for this list, the "List-Post: <mailto:bi@bincimap.org>"
header would be matched and the message stored in the folder Lists.binc.

This has worked fine for many months. However, now I have got two mailing lists
with the same name at different domains. So, I've decided to use the whole of
the list address as the folder name, e.g List@bincimap.org instead of just
Lists.binc. The problem I've just run into is that the period in the domain name
is the IMAP separater character so my mail clients see a lists folder, with a
binc@bincimap inside, then another folder "org" inside the binc@bincimap folder.

Ideally, I'd solve this without munging the list names, but if that's not
possible then I'm looking for the best way to replace "." with "_" in the
address string from maildrop as the message is being delivered.

Is there an easy way to fix this without munging the list names, e.g.
binc@bincimap_org or similar?

Thanks,

R.