13 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] Filters dont work
FromSent OnAttachments
Karsten IwenJan 26, 2003 11:26 am 
Paul ChambersJan 26, 2003 1:30 pm 
Karsten IwenJan 27, 2003 11:57 am 
Mark WeinemJan 27, 2003 6:04 pm 
Paul ChambersJan 28, 2003 9:07 am 
Karsten IwenJan 28, 2003 10:15 am 
Paul ChambersJan 28, 2003 1:01 pm 
Mark MayoJan 28, 2003 1:51 pm 
Mark WeinemJan 29, 2003 3:57 pm 
Mark WeinemJan 29, 2003 3:57 pm 
Karsten IwenJan 30, 2003 1:43 am 
Karsten IwenFeb 1, 2003 9:45 am 
Karsten IwenFeb 1, 2003 2:35 pm 
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:Re: [maildropl] Filters dont workActions...
From:Mark Mayo (ma@vmunix.com)
Date:Jan 28, 2003 1:51:56 pm
List:net.sourceforge.lists.courier-maildrop

FWIW, maildrop appears to be smart enough to Do The Right Thing if you leave off the trailing slash and the directory in question is an actual Maildir. For example:

Date: Tue Jan 28 06:25:49 2003 From: ma@vmunix.com (Mark Mayo) Subj: foo File: /home/mark/Maildir (346)

rule1: Subject: test Date: Tue Jan 28 06:25:54 2003 From: ma@vmunix.com (Mark Mayo) Subj: test File: /home/mark/Maildir/.Test (351)

Date: Tue Jan 28 21:46:55 2003 From: ma@vmunix.com (Mark Mayo) Subj: bar File: /home/mark/Maildir/ (349)

rule1: Subject: test Date: Tue Jan 28 21:47:01 2003 From: ma@vmunix.com (Mark Mayo) Subj: testt File: /home/mark/Maildir//.Test/ (352)

Basically with DEFAULT defined without, and then with the trailing slash. Mail ends up in the Maildir in both cases.

-Mark

On Tue, Jan 28, 2003 at 12:59:23PM -0800, Paul Chambers wrote:

Karsten, are you using maildirs or mailboxes? Could you change the lines at the top of your file like:

I use Maildirs (Courier-IMAP) and you were right, my /etc/maildroprc contained the line DEFAULT="$HOME/Maildir" After changing that to DEFAULT="$HOME/Maildir/" the filter for my testuser started working.

But on my own account it does not work, and that seems strange.

My .mailfilter:

logfile "$HOME/Maildir/maildrop.log" log "default=$DEFAULT" if (/^From:.*be@domeus.de/:h) { log "rule1: $MATCH" to "Maildir/.MyServer.ColdMedia" } if (/^From:.*@amazon.de/:h) { log "rule2: $MATCH" to "Maildir/.Amazon" }

and my logfile: default=/home/k_iwen/Maildir/ rule1: Date: Tue Jan 28 19:01:49 2003 From: "Test User" <te@user.de> Subj: Testnachricht fuer KI File: Maildir/.MyServer.ColdMedia (2572)

If you're using maildirs, the destination in your 'to' statements should end with a trailing slash:

logfile "$HOME/Maildir/maildrop.log" if (/^From:.*be@domeus.de/:h) { log "rule1: $MATCH" to "Maildir/.MyServer.ColdMedia/" } if (/^From:.*@amazon.de/:h) { log "rule2: $MATCH" to "Maildir/.Amazon/" }

Otherwise it will attempt to deliver to an mbox file called '.MyServer.ColdMedia', not to the maildir '.MyServer.ColdMedia/'. Since the directory exists, I expect maildrop wouldn't be able to create an mobox file with the same name.