on root
crontab -l
23 14 5 1 * /bin/sh /idcdata/rathina/rathina.sh &> /idcdata/rathina/log.lo
/idcdata/rathina
su zimbra:zimbra -R /idcdata
-rw-r–r– 1 zimbra zimbra 33 Jan 5 13:49 email.txt
-rw-r–r– 1 zimbra zimbra 0 Jan 5 14:23 log.log
-rwx—— 1 root root 161 Jan 5 14:01 rathina.sh
-rw-r–r– 1 root root 1759350144 Jan 5 14:27 [email protected]
[[email protected] rathina]# cat rathina.sh
#!/bin/bash
for i in `cat /idcdata/rathina/email.txt`; do /opt/zimbra/bin/zmmailbox -z -m $i getRestURL ‘/?fmt=tgz’ > /idcdata/rathina/$i.tgz ; echo $i ; done
[[email protected] rathina]#