List Info

Thread: Re: Avoiding '/usr/bin/maildrop: Unable to change to home directory'




Re: Avoiding '/usr/bin/maildrop: Unable to change to home directory'
user name
2007-01-21 17:07:09
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+welcomedomain,
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.




------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief surveys -
and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Courier-maildrop mailing list
Courier-maildroplists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/courie
r-maildrop

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )