[Nottingham] chrooted procmail

Simon Amor simon at leaky.org
Fri Sep 2 23:22:57 BST 2005


Do you need more than just procmail in /bin/ ? What if it needs to  
send email and run commands - does it need access to the sendmail  
binary and client mailqueue directory and so on? I would have thought  
it'd be pretty difficult to chroot procmail to be honest.

How is the procmailrc going to be edited? will it be done as a  
textfile edit by the user or is it all via some kind of cgi that  
could do sanity checking and so on? If the latter, do you really need  
it to be chrooted or could you just check the actual contents of the  
procmailrc file strictly enough that it won't ever edit something it  
shouldn't?

    Simon

On 2 Sep 2005, at 22:29, Mike Cardwell wrote:

> Hi,
>
> I'm building a mail system using exim4 in a slightly unusual way.  
> There are no system users involved for the mailboxes. They are all  
> saved as the same user "Debian-exim" at the moment. What I want to  
> be able to do is allow use of procmail for each of these users.  
> However that poses a security risk as all the mailboxes have the  
> same ownership. My idea was to chroot procmail. I am having huge  
> difficulties doing this though. here's the format of some of the  
> paths involved:
>
> Mail goes into:
>    /home/system/data/mail/testdomain.com/mike/Maildir/
>
> I wanted to chroot to:
>    /home/system/data/mail/testdomain.com/mike/
>
> I copied the procmail binary and all its linked libraries into  
> appropriate directories within /home/system/data/mail/ 
> testdomain.com/mike/
>
> I then created a transport with the following command part:
>
> command = "/usr/sbin/chroot '/home/system/data/mail/testdomain.com/ 
> mike' '/bin/procmail /etc/procmailrc'"
>
> /bin and /etc there are within the chroot jail and procmailrc just  
> has a single basic rule that is definitely ok.
>
> I don't get any useful error messages in the logs or the bounce  
> messages.
>
> Am I doing something stupid? Has anyone here done anything like  
> this before?
>
> Thanks,
> Mike
>
> _______________________________________________
> Nottingham mailing list
> Nottingham at mailman.lug.org.uk
> http://mailman.lug.org.uk/mailman/listinfo/nottingham
>

-- 
Simon Amor
simon at leaky.org
http://www.leaky.org/





More information about the Nottingham mailing list