Re: Deleting messages "marked for deletion" older than X days
On Mon, Aug 18, 2008 at 05:09:53PM -0500, Kenneth Marshall wrote: > In the manual page, the definition of the '-X' option seems to > do what you want: > > -X expunge-days > Expunge previously deleted messages older than expunge-days > (when using the "delayed" expunge mode). The default is > 0 (zero) days, which will expunge all previously deleted > messages. Messages go through the following life cycle in "traditional IMAP", example: Created (\Recent)- LMTP DELIVER (UID = 9) No flags () - A001 SELECT INBOX (clears the \Recent) Viewed (\Seen) - A002 UID FETCH 9 RFC822 Deleted (\Deleted \Seen) - A003 UID STORE 9 +FLAGS (\Deleted) Purged (no message) - A004 EXPUNGE Now, what the -X option actually does is turns this into: Created (\Recent)- LMTP DELIVER (UID = 9) No flags () - A001 SELECT INBOX (clears the \Recent) Viewed (\Seen) - A002 UID FETCH 9 RFC822 Deleted (\Deleted \Seen) - A003 UID STORE 9 +FLAGS (\Deleted) Purged (no index record)- A004 EXPUNGE but the file is still on disk, just the index record has been moved from the file cyrus.index to a new file cyrus.expunge. A week later: Cleaned up (no file) - cyr_expire -X 7 The cyrus.expunge record and the actual spool file itself get deleted at this point. Until then you can un-delete the record using the "unexpunge" command in cyrus 2.3.X. --- I think what the original requestor was actually looking for is a tool that can run the "EXPUNGE" phase on a regular basis. As far as I'm aware there's nothing that ships with Cyrus that can do it. If I was writing something for the job I would make an admin IMAP connection to Cyrus and just cycle through the folders calling 'EXPUNGE' on them. Cheap and nasty, but it would do the trick. You can do this in any language with a TCP library, though something with an IMAP interface library would be nicer. I'd use Perl and Mail::IMAPTalk, but that's just because that's what I already use! Bron. Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Deleting messages "marked for deletion" older than X days
cyr_expire -D and -X deal with delayed delete & expunge, respectively. Neither will address message that the MUA hasn't already deleted (in the case of folders) or expunged (in the case of messages). The tool that is closest to the desired functionality is ipurge. In order for ipurge to do what you're asking, Gerard, it would have to examine whatever the "deleted" flag is for Outlook -- it varies by MUA, some set a flag, some move messages to a trash folder, etc. :wes On 18 Aug 2008, at 18:09, Kenneth Marshall wrote: > In the manual page, the definition of the '-X' option seems to > do what you want: > > -X expunge-days > Expunge previously deleted messages older than > expunge-days > (when using the "delayed" expunge mode). The default is > 0 (zero) days, which will expunge all previously > deleted messages. > >>> On Mon, Aug 18, 2008 at 03:35:20PM -0600, Gerard Beekmans wrote: I am looking for a way to run a daily script on the Cyrus IMAP server that processes every user's mail folders and deletes every message marked for deletion older than X days. I realize the proper way to do this is client-side and have the client program purge/expunge the mailboxes periodically in some fashion. Unfortunately in the corporate world there are many clients who still use old versions of Outlook that only marks a message for deletion and will not automatically purge the folder. To force users to manually purge every single folder they have, one folder at a time as some versions of Outlook can't do this recursively, is not a feasible option. Users just stopped doing this because it becomes too time consuming a task. So I'm looking for a server-side solution that analyzes every mail folder on the system, finds marked messages older than X days and purges/deletes them on the client's behalf. Some pointers are appreciated. I can write the scripts (shell, perl, whatever) myself if need be, just need to know how to start going about obtaining such a specific list of messages. Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Deleting messages "marked for deletion" older than X days
It must be a 2.3 option, we are running 2.3.10+ here. Ken On Mon, Aug 18, 2008 at 04:21:29PM -0600, Gerard Beekmans wrote: > I'll do some more checking then. My cyr_expire version doesn't even have > the -X option (I'm testing this on a system that has cyrus imap 2.2.13 as > its recent version). > > > > Gerard Beekmans > IT Manager > Achilles Media > Tel: 403-678-1216 ext. 102 > Email: [EMAIL PROTECTED] > > > > > Kenneth Marshall wrote: >> In the manual page, the definition of the '-X' option seems to >> do what you want: >> >> -X expunge-days >> Expunge previously deleted messages older than expunge-days >> (when using the "delayed" expunge mode). The default is >> 0 (zero) days, which will expunge all previously deleted >> messages. >> >> Ken >> >> >> On Mon, Aug 18, 2008 at 03:53:31PM -0600, Gerard Beekmans wrote: >> >>> Hi Ken, >>> >>> From the description it seems like cyr_expire will apply to every email >>> in a mailbox. I don't want to delete any regular emails other than the >>> ones already marked for deletion by an email client who is lacking a >>> decent purge feature. >>> >>> >>> Gerard Beekmans >>> IT Manager >>> Achilles Media >>> Tel: 403-678-1216 ext. 102 >>> Email: [EMAIL PROTECTED] >>> >>> >>> >>> >>> Kenneth Marshall wrote: >>> I think that the cyr_expire command may be what you are searching for. Ken On Mon, Aug 18, 2008 at 03:35:20PM -0600, Gerard Beekmans wrote: > Hi, > > I am looking for a way to run a daily script on the Cyrus IMAP server > that processes every user's mail folders and deletes every message > marked for deletion older than X days. > > I realize the proper way to do this is client-side and have the client > program purge/expunge the mailboxes periodically in some fashion. > > Unfortunately in the corporate world there are many clients who still > use old versions of Outlook that only marks a message for deletion and > will not automatically purge the folder. > > To force users to manually purge every single folder they have, one > folder at a time as some versions of Outlook can't do this recursively, > is not a feasible option. Users just stopped doing this because it > becomes too time consuming a task. > > So I'm looking for a server-side solution that analyzes every mail > folder on the system, finds marked messages older than X days and > purges/deletes them on the client's behalf. > > Some pointers are appreciated. I can write the scripts (shell, perl, > whatever) myself if need be, just need to know how to start going about > obtaining such a specific list of messages. > > Thanks, > > -- > Gerard Beekmans > IT Manager > Achilles Media > Tel: 403-678-1216 ext. 102 > Email: [EMAIL PROTECTED] > > > > Cyrus Home Page: http://cyrusimap.web.cmu.edu/ > Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki > List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html > > >>> >>> Cyrus Home Page: http://cyrusimap.web.cmu.edu/ >>> Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki >>> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html >>> >>> > Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Deleting messages "marked for deletion" older than X days
I'll do some more checking then. My cyr_expire version doesn't even have the -X option (I'm testing this on a system that has cyrus imap 2.2.13 as its recent version). Gerard Beekmans IT Manager Achilles Media Tel: 403-678-1216 ext. 102 Email: [EMAIL PROTECTED] Kenneth Marshall wrote: > In the manual page, the definition of the '-X' option seems to > do what you want: > > -X expunge-days > Expunge previously deleted messages older than expunge-days > (when using the "delayed" expunge mode). The default is > 0 (zero) days, which will expunge all previously deleted > messages. > > Ken > > > On Mon, Aug 18, 2008 at 03:53:31PM -0600, Gerard Beekmans wrote: > >> Hi Ken, >> >> From the description it seems like cyr_expire will apply to every email >> in a mailbox. I don't want to delete any regular emails other than the >> ones already marked for deletion by an email client who is lacking a >> decent purge feature. >> >> >> Gerard Beekmans >> IT Manager >> Achilles Media >> Tel: 403-678-1216 ext. 102 >> Email: [EMAIL PROTECTED] >> >> >> >> >> Kenneth Marshall wrote: >> >>> I think that the cyr_expire command may be what you are searching >>> for. >>> >>> Ken >>> >>> On Mon, Aug 18, 2008 at 03:35:20PM -0600, Gerard Beekmans wrote: >>> >>> Hi, I am looking for a way to run a daily script on the Cyrus IMAP server that processes every user's mail folders and deletes every message marked for deletion older than X days. I realize the proper way to do this is client-side and have the client program purge/expunge the mailboxes periodically in some fashion. Unfortunately in the corporate world there are many clients who still use old versions of Outlook that only marks a message for deletion and will not automatically purge the folder. To force users to manually purge every single folder they have, one folder at a time as some versions of Outlook can't do this recursively, is not a feasible option. Users just stopped doing this because it becomes too time consuming a task. So I'm looking for a server-side solution that analyzes every mail folder on the system, finds marked messages older than X days and purges/deletes them on the client's behalf. Some pointers are appreciated. I can write the scripts (shell, perl, whatever) myself if need be, just need to know how to start going about obtaining such a specific list of messages. Thanks, -- Gerard Beekmans IT Manager Achilles Media Tel: 403-678-1216 ext. 102 Email: [EMAIL PROTECTED] Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html >> >> Cyrus Home Page: http://cyrusimap.web.cmu.edu/ >> Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki >> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html >> >> Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Deleting messages "marked for deletion" older than X days
In the manual page, the definition of the '-X' option seems to do what you want: -X expunge-days Expunge previously deleted messages older than expunge-days (when using the "delayed" expunge mode). The default is 0 (zero) days, which will expunge all previously deleted messages. Ken On Mon, Aug 18, 2008 at 03:53:31PM -0600, Gerard Beekmans wrote: > Hi Ken, > > From the description it seems like cyr_expire will apply to every email > in a mailbox. I don't want to delete any regular emails other than the > ones already marked for deletion by an email client who is lacking a > decent purge feature. > > > Gerard Beekmans > IT Manager > Achilles Media > Tel: 403-678-1216 ext. 102 > Email: [EMAIL PROTECTED] > > > > > Kenneth Marshall wrote: > > I think that the cyr_expire command may be what you are searching > > for. > > > > Ken > > > > On Mon, Aug 18, 2008 at 03:35:20PM -0600, Gerard Beekmans wrote: > > > >> Hi, > >> > >> I am looking for a way to run a daily script on the Cyrus IMAP server > >> that processes every user's mail folders and deletes every message > >> marked for deletion older than X days. > >> > >> I realize the proper way to do this is client-side and have the client > >> program purge/expunge the mailboxes periodically in some fashion. > >> > >> Unfortunately in the corporate world there are many clients who still > >> use old versions of Outlook that only marks a message for deletion and > >> will not automatically purge the folder. > >> > >> To force users to manually purge every single folder they have, one > >> folder at a time as some versions of Outlook can't do this recursively, > >> is not a feasible option. Users just stopped doing this because it > >> becomes too time consuming a task. > >> > >> So I'm looking for a server-side solution that analyzes every mail > >> folder on the system, finds marked messages older than X days and > >> purges/deletes them on the client's behalf. > >> > >> Some pointers are appreciated. I can write the scripts (shell, perl, > >> whatever) myself if need be, just need to know how to start going about > >> obtaining such a specific list of messages. > >> > >> Thanks, > >> > >> -- > >> Gerard Beekmans > >> IT Manager > >> Achilles Media > >> Tel: 403-678-1216 ext. 102 > >> Email: [EMAIL PROTECTED] > >> > >> > >> > >> Cyrus Home Page: http://cyrusimap.web.cmu.edu/ > >> Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki > >> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html > >> > >> > > Cyrus Home Page: http://cyrusimap.web.cmu.edu/ > Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki > List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html > Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Deleting messages "marked for deletion" older than X days
Hi Ken, From the description it seems like cyr_expire will apply to every email in a mailbox. I don't want to delete any regular emails other than the ones already marked for deletion by an email client who is lacking a decent purge feature. Gerard Beekmans IT Manager Achilles Media Tel: 403-678-1216 ext. 102 Email: [EMAIL PROTECTED] Kenneth Marshall wrote: > I think that the cyr_expire command may be what you are searching > for. > > Ken > > On Mon, Aug 18, 2008 at 03:35:20PM -0600, Gerard Beekmans wrote: > >> Hi, >> >> I am looking for a way to run a daily script on the Cyrus IMAP server >> that processes every user's mail folders and deletes every message >> marked for deletion older than X days. >> >> I realize the proper way to do this is client-side and have the client >> program purge/expunge the mailboxes periodically in some fashion. >> >> Unfortunately in the corporate world there are many clients who still >> use old versions of Outlook that only marks a message for deletion and >> will not automatically purge the folder. >> >> To force users to manually purge every single folder they have, one >> folder at a time as some versions of Outlook can't do this recursively, >> is not a feasible option. Users just stopped doing this because it >> becomes too time consuming a task. >> >> So I'm looking for a server-side solution that analyzes every mail >> folder on the system, finds marked messages older than X days and >> purges/deletes them on the client's behalf. >> >> Some pointers are appreciated. I can write the scripts (shell, perl, >> whatever) myself if need be, just need to know how to start going about >> obtaining such a specific list of messages. >> >> Thanks, >> >> -- >> Gerard Beekmans >> IT Manager >> Achilles Media >> Tel: 403-678-1216 ext. 102 >> Email: [EMAIL PROTECTED] >> >> >> >> Cyrus Home Page: http://cyrusimap.web.cmu.edu/ >> Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki >> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html >> >> Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Deleting messages "marked for deletion" older than X days
I think that the cyr_expire command may be what you are searching for. Ken On Mon, Aug 18, 2008 at 03:35:20PM -0600, Gerard Beekmans wrote: > Hi, > > I am looking for a way to run a daily script on the Cyrus IMAP server > that processes every user's mail folders and deletes every message > marked for deletion older than X days. > > I realize the proper way to do this is client-side and have the client > program purge/expunge the mailboxes periodically in some fashion. > > Unfortunately in the corporate world there are many clients who still > use old versions of Outlook that only marks a message for deletion and > will not automatically purge the folder. > > To force users to manually purge every single folder they have, one > folder at a time as some versions of Outlook can't do this recursively, > is not a feasible option. Users just stopped doing this because it > becomes too time consuming a task. > > So I'm looking for a server-side solution that analyzes every mail > folder on the system, finds marked messages older than X days and > purges/deletes them on the client's behalf. > > Some pointers are appreciated. I can write the scripts (shell, perl, > whatever) myself if need be, just need to know how to start going about > obtaining such a specific list of messages. > > Thanks, > > -- > Gerard Beekmans > IT Manager > Achilles Media > Tel: 403-678-1216 ext. 102 > Email: [EMAIL PROTECTED] > > > > Cyrus Home Page: http://cyrusimap.web.cmu.edu/ > Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki > List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html > Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Deleting messages "marked for deletion" older than X days
Hi, I am looking for a way to run a daily script on the Cyrus IMAP server that processes every user's mail folders and deletes every message marked for deletion older than X days. I realize the proper way to do this is client-side and have the client program purge/expunge the mailboxes periodically in some fashion. Unfortunately in the corporate world there are many clients who still use old versions of Outlook that only marks a message for deletion and will not automatically purge the folder. To force users to manually purge every single folder they have, one folder at a time as some versions of Outlook can't do this recursively, is not a feasible option. Users just stopped doing this because it becomes too time consuming a task. So I'm looking for a server-side solution that analyzes every mail folder on the system, finds marked messages older than X days and purges/deletes them on the client's behalf. Some pointers are appreciated. I can write the scripts (shell, perl, whatever) myself if need be, just need to know how to start going about obtaining such a specific list of messages. Thanks, -- Gerard Beekmans IT Manager Achilles Media Tel: 403-678-1216 ext. 102 Email: [EMAIL PROTECTED] Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: limit user access to certain IP addresses?
Hi, I tried this some thime ago with pam, but without a success. SASL does not pass the ip-addres to PAM so you can't use pam_access, nor can you change/configure the PAM service name to run an other instance of cyrus using an other pam configuration. You may have success by running too instances of cyrus, one listening on 127.0.0.1 and one on your normal IP und using different sasl_options in your imapd.conf configurations Quoting Tomasz Chmielewski <[EMAIL PROTECTED]>: It it possible to limit POP3/IMAP access for chosen users only to certain IP addresses? For example, I'd like to allow some users only access from 127.0.0.1 (or, Squirrelmail running on the same address as Cyrus); those users shouldn't have public access to POP3/IMAP from the whole Internet. At the same time, though, I would like to allow access for some other users via POP3/IMAP as well. Is it somehow possible with Cyrus? If it is, it would be great if it could be used to limit access to SMTP as well. As SMTP is different than what Cyrus does, this would perhaps suggest some additional PAM library? Any ideas? -- Tomasz Chmielewski http://wpkg.org Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html M.Menge Tel.: (49) 7071/29-70316 Universitaet Tuebingen Fax.: (49) 7071/29-5912 Zentrum fuer Datenverarbeitung mail: [EMAIL PROTECTED] Waechterstrasse 76 72074 Tuebingen smime.p7s Description: S/MIME krytographische Unterschrift Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
limit user access to certain IP addresses?
It it possible to limit POP3/IMAP access for chosen users only to certain IP addresses? For example, I'd like to allow some users only access from 127.0.0.1 (or, Squirrelmail running on the same address as Cyrus); those users shouldn't have public access to POP3/IMAP from the whole Internet. At the same time, though, I would like to allow access for some other users via POP3/IMAP as well. Is it somehow possible with Cyrus? If it is, it would be great if it could be used to limit access to SMTP as well. As SMTP is different than what Cyrus does, this would perhaps suggest some additional PAM library? Any ideas? -- Tomasz Chmielewski http://wpkg.org Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: migrate to virtual domains
On Mon, Aug 18, 2008 at 11:21 AM, Peter Lokus <[EMAIL PROTECTED]> wrote: > Hi list, > > I using cyrus imap for two domains without virtual domains. > Say, my folder structure look like > > /var/spool/cyrus/mail/user/user1domain: example.net > /var/spool/cyrus/mail/user/user2domain: example.com > > Every user has its own folders under the INBOX. > > In order to enhance the administration and migrate new domains easier I want > to switch to virtual domains. It should look like > > /var/spool/cyrus/mail/domain/example.net/user/user1 > /var/spool/cyrus/mail/domain/example.com/user/user2 > > How do I move the user folders' to the new folder structure? > My approach was to copy these folder's to the new folder structure and run > reconstruct. However, I can see only mails in the INBOX. If I had to do it myself : (it could be uncomplete, sorry) - first in imapd.conf set 'virtdomains' to what you want, - create new [EMAIL PROTECTED] and [EMAIL PROTECTED] - try to login as user1, user2, [EMAIL PROTECTED] and [EMAIL PROTECTED], check that the first have a not empty mailbox and the last have an empty one. - Use "imapsync" to copy all the emails from user1 to [EMAIL PROTECTED], continue with all your other user. - update your SMTP configuration to deliver to [EMAIL PROTECTED] instead of user1 Be carefiull to have enough spece to do all you user at once, or do it one by one, removing old user Hope this help > > Any recommendations? > > Peter > > Cyrus Home Page: http://cyrusimap.web.cmu.edu/ > Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki > List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html > -- Alain Spineux aspineux gmail com May the sources be with you Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
migrate to virtual domains
Hi list, I using cyrus imap for two domains without virtual domains. Say, my folder structure look like /var/spool/cyrus/mail/user/user1domain: example.net /var/spool/cyrus/mail/user/user2domain: example.com Every user has its own folders under the INBOX. In order to enhance the administration and migrate new domains easier I want to switch to virtual domains. It should look like /var/spool/cyrus/mail/domain/example.net/user/user1 /var/spool/cyrus/mail/domain/example.com/user/user2 How do I move the user folders' to the new folder structure? My approach was to copy these folder's to the new folder structure and run reconstruct. However, I can see only mails in the INBOX. Any recommendations? Peter Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html