Page 1 of 1

sxmboxexp

Posted: Mon Jul 02, 2007 11:52 am
by Gerardf
Can anyone help me on how to export all mailbox's in one go and each to different files at the same time !

Posted: Mon Jul 02, 2007 12:20 pm
by gren
You could try a script something like :

Code: Select all

omshowu -m all |
while read name
do
    AUTHID=`omshowu -n "$name"|awk '/^Authentication ID:/ {print $3}'`
    sxmboxexp -u "$name" -a "$AUTHID.mboxexp"
done


That would create a set of files in your current directories, one for each user with the filenames taken from the users authentication IDs.
This doesn't have any error handling and you might want to use the sxmboxexp -F option to allow archiving whilst people are logged on etc.

Regards,
Gren.

Posted: Tue Jul 03, 2007 3:27 am
by Gerardf
gren wrote:You could try a script something like :

Code: Select all

omshowu -m all |
while read name
do
    AUTHID=`omshowu -n "$name"|awk '/^Authentication ID:/ {print $3}'`
    sxmboxexp -u "$name" -a "$AUTHID.mboxexp"
done


That would create a set of files in your current directories, one for each user with the filenames taken from the users authentication IDs.
This doesn't have any error handling and you might want to use the sxmboxexp -F option to allow archiving whilst people are logged on etc.

Regards,
Gren.


Thanks. I thought it would be something like that but I wasn't sure of the syntax. I will give it a go.
regards.