14 messages in net.sourceforge.lists.courier-maildrop[maildropl] Re: Line endings / DOS fo...
FromSent OnAttachments
Henk van LingenOct 5, 2005 7:05 am 
Jay LeeOct 5, 2005 7:24 am 
Tony EarnshawOct 5, 2005 8:50 am 
Tom DiehlOct 5, 2005 11:40 am 
Henk van LingenOct 5, 2005 2:58 pm 
Paul L. AllenOct 5, 2005 7:32 pm 
Henk van LingenOct 6, 2005 7:31 am 
Paul L. AllenOct 6, 2005 7:48 am 
Jay LeeOct 6, 2005 8:05 am 
Jay LeeOct 6, 2005 8:35 am 
Paul L. AllenOct 6, 2005 9:02 am 
moussOct 6, 2005 10:34 am 
Thorsten HaudeOct 6, 2005 12:33 pm 
Sam VarshavchikOct 6, 2005 3:31 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:[maildropl] Re: Line endings / DOS formatActions...
From:Paul L. Allen (pl@softflare.com)
Date:Oct 6, 2005 9:02:05 am
List:net.sourceforge.lists.courier-maildrop

Jay Lee writes:

I agree, it does not make sense to extend maildrop to understand every possible syntax end users might happen to throw at it. maildrop is a programming language and as such, it has strict requirements about what it should see.

Perl used to barf over scripts with DOS eol being run on a *nix box. That has largely been eliminated, although there are still certain cases that fail (from vague memory, "here documents"). But perl runs on many platforms (even obscure ones most people never heard of) whereas maildrop is strictly *nix.

One fix is to install sqwebmail just so people can use it to create and edit filters. It's hard enough teaching our less-gifted customers how to use that, so we'd have no chance of getting them to edit the filters directly. Then again, with a vpopmail setup there's no way we could give them direct access to the filters without compromising security since the entire domain directory structure is owned by vpopmail:vchkpwd.

However, I do agree with OP that it is somewhat annoying to the end user to discover that all their mail is bouncing simply because they forgot a ' or a ( in their .mailfilter file.

That means the next time they edit the file they'll remember about changing the EOLs. :)

Or another possible way I can think of doing this is adding something like this the end of your global maildroprc:

exception { include '$HOME/.mailfilter' } exit

This would cause the global filter to execute individual users filters but ignore a failed compile (maybe?).

Very similar to what our global filter has. I pieced it together from various suggestions on the vpopmail/qmailadmin mailing list Ours ends with:

exception { include ./.mailfilter }

to $VMAILDIR

I think that your exit at the end would cause the mail to be thrown away or bounced rather than be delivered. So yours should probably look like:

exception { include $HOME/.mailfilter }

to $HOME/Maildir

Then again, I did that so long ago I can't remember if I checked it with a broken filter. Maybe that doesn't work if the filter is broken and I'm happily deluding myself.