Bowie Bailey wrote on 30.04.2015 16:46:
> On 4/30/2015 8:49 AM, Alexei Yu. Batyr' wrote:
>> Managed Pvt nets wrote on 30.04.2015 13:50:
>>> All,
>>> Just a question that I hope you can help me with. I am trying to save
>>> some disk space, so what I need is to go through all mailboxes and
>>> finding out those that haven't been accessed in months and perhaps
>>> deleting some mails or mailboxes. Is there a way perhaps to do this in
>>> courier?
>>>
>> I'm using this script:
>>
>> #!/bin/sh -
>> echo "Mailboxes not checked for 6 months:"
>> find /home/*/Maildir -group mailusers -name cur -maxdepth 1 -prune
>> -mtime +180 -print | \
>>            sed -E "s/(\/home\/)|(\/Maildir\/cur)//g" |
>> while read usr
>> do
>>            [ ! -f /home/$usr/Maildir/sqwebmail-timestamp ] && echo $usr &&
>> continue
>>            find /home/$usr/Maildir -name sqwebmail-timestamp -maxdepth 0
>> -mtime +180 -exec echo $usr \;
>> done
>>
> That assumes everyone is using sqwebmail.  What I generally do is look
> for old messages in the "new" folder.  If there are old messages there,
> it indicates that the user has not even looked at the mailbox since the
> date of the oldest message.
>
No, main check is the mtime of Maildir/cur folder. It's exactly the time 
when user last checked mail by IMAP or POP. Check for 
sqwebmail-timestamp - only for those who use Sqwebmail and not use IMAP 
or POP.


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to