Is it possible to override the POP3 delete on download command and make sure that messages stay on the server for at least X hours or X days?
It is important that the messages be around long enough to hit a snapshot cycle (using rsnapshot to backup ever hour).
-- Greedo didn't shoot first, motherfucker!
On 14 Dec 2018, at 16:30, @lbutlr <kremels@kreme.com> wrote:
Is it possible to override the POP3 delete on download command and make sure that messages stay on the server for at least X hours or X days?
It is important that the messages be around long enough to hit a snapshot cycle (using rsnapshot to backup ever hour).
Now that I think about it, even better would be a way to move the messages into an archive box when they are downloaded, this way they will be entirely invisible from the POP3 access, and I can use normal expiry functions to clean out that archive after backup.
-- I laugh in the face of danger. Then I hide until it goes away.
On 12/14/18 3:34 PM, @lbutlr wrote:
Now that I think about it, even better would be a way to move the messages into an archive box when they are downloaded, this way they will be entirely invisible from the POP3 access, and I can use normal expiry functions to clean out that archive after backup.
We do exactly this using the "Lazy Expunge" plugin:
https://wiki.dovecot.org/Plugins/Lazyexpunge
Despite the IMAP-sounding "expunge" in the name, it works for all deletions, including POP3.
-- Robert L Mathews, Tiger Technologies, http://www.tigertech.net/
On 14 Dec 2018, at 17:09, Robert L Mathews <lists@tigertech.com> wrote:
On 12/14/18 3:34 PM, @lbutlr wrote:
Now that I think about it, even better would be a way to move the messages into an archive box when they are downloaded, this way they will be entirely invisible from the POP3 access, and I can use normal expiry functions to clean out that archive after backup.
We do exactly this using the "Lazy Expunge" plugin:
https://wiki.dovecot.org/Plugins/Lazyexpunge
Despite the IMAP-sounding "expunge" in the name, it works for all deletions, including POP3.
Thank you!
-- Let the Wookiee win.
On 14 Dec 2018, at 17:09, Robert L Mathews <lists@tigertech.com> wrote:
I have a question about the namespace section.
You create only a single namespace. When a message is expunged from mailbox <name>, it's moved to a mailbox <name> in the expunge namespace. When an entire mailbox <name> is deleted, it's also moved to this namespace as <name>. If it already exists, their contents are merged.
Example configuration:
# the default namespace
namespace { prefix = separator = / inbox = yes }
# namespace for lazy_expunge plugin: namespace { prefix = .EXPUNGED/ hidden = yes list = no separator = / location = maildir:~/Maildir/expunged }
mail_plugins = $mail_plugins lazy_expunge plugin { lazy_expunge = .EXPUNGED/
}
First all, that shows two namespace sections. Second, my namespace looks quite different (maybe it’s from older config version, I am not on 2.3 yet). I have a few users with shell access and mail in ~/Maildir but most users are in mysql.
user_query = select 89 as uid, 89 as gid, concat('/usr/local/virtual/', maildir) as home FROM mailbox where username = '%u'
namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { auto = subscribe special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox Trash { special_use = \Trash } mailbox Archive { auto = subscribe special_use = \Archive } prefix = }
Am I just adding the new namespace for lazy_expunge inside that? And since the readme also says to put lazy_expunge and all in the mailplugins line, why is this repeated here? Won’t this override the previous setting?
And, finally, is there any way to limit this to only POP3 delete instead of all IMAP?
-- "Give a man a fire and he's warm for a day, but set fire to him an he's warm for the rest of his life.”
On 12/15/18 8:09 AM, @lbutlr wrote:
I have a question about the namespace section.
You create only a single namespace. [...] First all, that shows two namespace sections.
When it says "You create only a single namespace", it means you would create a single extra namespace for the lazy expunge plugin (instead of creating *three* new namespaces just for the plugin, as in the later example on that page).
This extra single lazy expunge namespace would be in addition to any normal namespaces you already have.
Am I just adding the new namespace for lazy_expunge inside that?
No. Do not touch your existing namespaces at all. You add a new one for lazy expunge.
And, finally, is there any way to limit this to only POP3 delete instead of all IMAP?
Haven't tried that, but perhaps you could experiment with adding it to mail_plugins in only the "protocol pop3" section, like:
protocol pop3 { mail_plugins = $mail_plugins lazy_expunge }
-- Robert L Mathews, Tiger Technologies, http://www.tigertech.net/
On 12/15/2018 12:34 AM, @lbutlr wrote:
On 14 Dec 2018, at 16:30, @lbutlr <kremels@kreme.com> wrote:
Is it possible to override the POP3 delete on download command and make sure that messages stay on the server for at least X hours or X days? It is important that the messages be around long enough to hit a snapshot cycle (using rsnapshot to backup ever hour).
Now that I think about it, even better would be a way to move the messages into an archive box when they are downloaded, this way they will be entirely invisible from the POP3 access, and I can use normal expiry functions to clean out that archive after backup.
From a data flow (and privacy protection) POV, that wouldn't be much different anymore from having *the MTA* feed a copy of (all incoming) e-mails directly into an archiving mechanism, would it?
http://www.postfix.org/postconf.5.html#always_bcc
Regards,
Jochen Bern Systemingenieur
www.binect.de www.facebook.de/binect
On 15 Dec 2018, at 03:11, Jochen Bern <Jochen.Bern@binect.de> wrote:
On 12/15/2018 12:34 AM, @lbutlr wrote:
On 14 Dec 2018, at 16:30, @lbutlr <kremels@kreme.com> wrote:
Is it possible to override the POP3 delete on download command and make sure that messages stay on the server for at least X hours or X days? It is important that the messages be around long enough to hit a snapshot cycle (using rsnapshot to backup ever hour).
Now that I think about it, even better would be a way to move the messages into an archive box when they are downloaded, this way they will be entirely invisible from the POP3 access, and I can use normal expiry functions to clean out that archive after backup.
From a data flow (and privacy protection) POV, that wouldn't be much different anymore from having *the MTA* feed a copy of (all incoming) e-mails directly into an archiving mechanism, would it?
No, but it is only needed for the times someone access the account via POP3 without “leave on server".
-- Oh look, good intentions!
participants (3)
-
@lbutlr
-
Jochen Bern
-
Robert L Mathews