Re: mbox to Maildir

Robby Russell <[email protected]>
Newsgroups gmane.org.user-groups.linux.pdxlug
Organization Command Prompt, Inc.
Message-ID <[email protected]>
Dylan Reinhardt typed this on 05/04/2004 08:06 AM:
> [ will try typing something before hitting "send" this time. ]
> 
> On Mon, 2004-05-03 at 16:53, Robby Russell wrote:
> 
>>I tried to use a mbox to maildir perl script (mb2md) but it requires 
>>that the user have a shell on the machine and the users (few hundred) 
>>don't have a shell to su to do the conversion.
>>
>>Is there a script that will do this (as root) ? for any user that I want 
>>to run the script for?
> 
> 
> An outline of a Python script for this might be:
> 
> -----
> 
> #!/usr/bin/python
> 
> import os
> 
> mbox_name = 'mbox name goes here'
> 
> for user_name in os.listdir('/home/'):
>     if mbox_name in os.listdir('/home/' + user_name):
>         os.system('sudo %s mb2md -s /home/%s/%s' % (
>                                                    user_name, 
>                                                    user_name, 
>                                                    mbox_name))
> 
> -----
> 
> Hope that helps
> 

I'll try running it with sudo instead of su, however I think I tried 
that already. Stay tuned...

-Robby
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.