33 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] Avoiding '/usr/bin/ma...
FromSent OnAttachments
Turbo FredrikssonJan 15, 2007 5:24 am 
Sam VarshavchikJan 15, 2007 7:12 am 
Turbo FredrikssonJan 15, 2007 7:41 am 
Devin RubiaJan 15, 2007 7:56 am 
Tony EarnshawJan 15, 2007 8:37 am 
Turbo FredrikssonJan 15, 2007 9:03 am 
Devin RubiaJan 15, 2007 10:01 am 
moussJan 15, 2007 2:45 pm 
Turbo FredrikssonJan 15, 2007 10:54 pm 
Turbo FredrikssonJan 15, 2007 10:57 pm 
Devin RubiaJan 16, 2007 6:54 am 
moussJan 16, 2007 4:20 pm 
Turbo FredrikssonJan 17, 2007 1:34 am 
Devin RubiaJan 17, 2007 7:09 am 
Devin RubiaJan 17, 2007 7:35 am 
Jay LeeJan 17, 2007 7:50 am 
Turbo FredrikssonJan 18, 2007 12:22 am 
Turbo FredrikssonJan 18, 2007 12:47 am 
Devin RubiaJan 18, 2007 7:24 am 
Devin RubiaJan 18, 2007 7:46 am 
Turbo FredrikssonJan 20, 2007 1:29 am 
Turbo FredrikssonJan 20, 2007 1:32 am 
moussJan 21, 2007 3:06 pm 
moussJan 21, 2007 3:14 pm 
Devin RubiaJan 22, 2007 6:40 am 
Devin RubiaJan 22, 2007 6:51 am 
Turbo FredrikssonJan 22, 2007 10:38 am 
moussJan 22, 2007 2:22 pm 
Turbo FredrikssonJan 23, 2007 3:59 am 
Turbo FredrikssonJan 23, 2007 4:01 am 
Turbo FredrikssonJan 23, 2007 4:03 am 
Devin RubiaJan 23, 2007 10:04 am 
moussJan 27, 2007 11:58 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:Re: [maildropl] Avoiding '/usr/bin/maildrop: Unable to change to home directory'Actions...
From:mouss (mlis@free.fr)
Date:Jan 21, 2007 3:06:46 pm
List:net.sourceforge.lists.courier-maildrop

Devin Rubia wrote:

On Wed, Jan 17, 2007 at 01:20:32AM +0100, mouss wrote:

Unless I missed it, I guess you're talking about the performance issue of doing the tests for all messages. If it's this, then it's nitpicking. we can also speak about fork/exec-ing an MDA for each message... (I am not advocating the creation of maildirs from maildroprc, just pointing out the relativity of the "debate").

anyway, if it's just to avoid the `test` command, you can do it this way:

... exception { to $folder } maildirmake -f $folder $maildir to $folder ...

Which would be better but doesn't maildrop create a mbox file if the maildir doesn't exist?

This is up to your configuration. the example I posted require that you define $maildir and $folder correctly. Clearly, if you define folder=/proc/acpi, things won't go right :)

Also, what happens when the customer is over quota or some other error interfere with delivery?

if the maildir|folder was not present, it will be created. Then the second attempt will probably fail again, and you have the same result as without automatic creation. If errors don't happen often, then it's ok. Otherwise,

exception { to $folder } `test ...` ...

the difference here is that if the first attempt works, then you won't go through the `test ...` and second attempt.

now, there is also a second approach: assuming you support '+' addresses, you can put the maildir creation part in a block that is only exectued if mail is sent to user+welcome@domain, and make sure to send a welcome message to the new user (This may contain few recommendations and whatever you want). you can even have the command to replace the .mailfilter once the welcome message was delivered...

That said, it's not just the performance issues I'm concerned with. It's just one more thing to go wrong and I believe it should be done on the front end with account creation where I can deal with it right away and not on the back end when the user starts receiving e-mail.

I didn't mean to discourage creation ahead of time (It is by far the best option), but there is nothing bad in having a second opportunity to perform this creation.

There are situations where this is desirable: - when one doesn't want to run remote privileged tasks, it is safer to let the MDA create the maildir for a virtual account. - one "quarantine" method uses a Junk folder if the recipient wants it...

Note that one still has to create the subdirectoy that will host the maildirs. If using a "deep" maildir layout, this would require an mkdir -p before the maildirmake. but one must be careful not to create random directories/files "imagined" by an attacker.