I would like to ask if it is an acceptable practice to manage messages in the maildir as a file (move them from one folder to another) while dovecot is in stop state thinking that it will be rebuild to the next imap user login
thanks for your patience:) mik
"mikfum" == mikfum mikfum@protonmail.com writes:
mikfum> I would like to ask if it is an acceptable practice to manage mikfum> messages in the maildir as a file (move them from one folder mikfum> to another) while dovecot is in stop state thinking that it mikfum> will be rebuild to the next imap user login
No, it's not a good idea, bad things might happen.
what are you trying to accomplish? Maybe we can give a suggestion if we know what you are trying to accomplish. Don't assume that a certain method is the only way, just talk about the problem and what you wnat to achieve, not HOW you want to achieve it.
Cheers, John
thanks John for the reply what I would like to do is implement an autoarchive function at server level that, in the night while dovecot is down, moves messages older than n days from the user inbox to a subfolder of the same user (cur to cur)
tx mik
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Il lunedì 24 gennaio 2022 2:43 AM, John Stoffel john@stoffel.org ha scritto:
"mikfum" == mikfum mikfum@protonmail.com writes:
mikfum> I would like to ask if it is an acceptable practice to manage
mikfum> messages in the maildir as a file (move them from one folder
mikfum> to another) while dovecot is in stop state thinking that it
mikfum> will be rebuild to the next imap user login
No, it's not a good idea, bad things might happen.
what are you trying to accomplish? Maybe we can give a suggestion if
we know what you are trying to accomplish. Don't assume that a
certain method is the only way, just talk about the problem and what
you wnat to achieve, not HOW you want to achieve it.
Cheers,
John
Am Montag, dem 24.01.2022 um 10:18 +0000 schrieb mikfum:
thanks John for the reply what I would like to do is implement an autoarchive function at server level that, in the night while dovecot is down, moves messages older than n days from the user inbox to a subfolder of the same user (cur to cur)
tx mik
Use something like this in cron or similar:
doveadm move -A Archive BEFORE 90d
You must make sure though that the Archive mailbox exists before.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Il lunedì 24 gennaio 2022 2:43 AM, John Stoffel john@stoffel.org ha scritto:
"mikfum" == mikfum mikfum@protonmail.com writes:
mikfum> I would like to ask if it is an acceptable practice to manage
mikfum> messages in the maildir as a file (move them from one folder
mikfum> to another) while dovecot is in stop state thinking that it
mikfum> will be rebuild to the next imap user login
No, it's not a good idea, bad things might happen.
what are you trying to accomplish? Maybe we can give a suggestion if
we know what you are trying to accomplish. Don't assume that a
certain method is the only way, just talk about the problem and what
you wnat to achieve, not HOW you want to achieve it.
Cheers,
John
very nice!, you also made me find the wiki to look for answers to any other trivial questions without boring you... tx again ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Il lunedì 24 gennaio 2022 12:15 PM, Felix Zielcke fzielcke@z-51.de ha scritto:
Am Montag, dem 24.01.2022 um 10:18 +0000 schrieb mikfum:
thanks John for the reply
what I would like to do is implement an autoarchive function at
server level that, in the night while dovecot is down, moves
messages older than n days from the user inbox to a subfolder of the
same user (cur to cur)
tx
mik
Use something like this in cron or similar:
doveadm move -A Archive BEFORE 90d
You must make sure though that the Archive mailbox exists before.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Il lunedì 24 gennaio 2022 2:43 AM, John Stoffel john@stoffel.org ha
scritto:
"mikfum" == mikfum mikfum@protonmail.com writes:
mikfum> I would like to ask if it is an acceptable practice to manage
mikfum> messages in the maildir as a file (move them from one folder
mikfum> to another) while dovecot is in stop state thinking that it
mikfum> will be rebuild to the next imap user login
No, it's not a good idea, bad things might happen.
what are you trying to accomplish? Maybe we can give a suggestion if
we know what you are trying to accomplish. Don't assume that a
certain method is the only way, just talk about the problem and what
you wnat to achieve, not HOW you want to achieve it.
Cheers,
John
mikfum> thanks John for the reply
No problem! I'm not an expert by any stretch, but I've been using dovecot for years and doing It for way too many years... LOL!
mikfum> what I would like to do is implement an autoarchive function mikfum> at server level that, in the night while dovecot is down, mikfum> moves messages older than n days from the user inbox to a mikfum> subfolder of the same user (cur to cur)
Why do you bring dovecot down? What maintenance are you running them? I'm curious because I never reboot my dovecot instance unless there's a problem. And these days, if you are running a business providing email service, it seems better to run a cluster of dovecot servers behind dovecot director to load balance things.
I also feel that using the doveadm commands to do this work is the better way, since it will properly handle locking and consistency of the folder(s).
Why do you think that doing this with dovecot is down is the best way to do this?
John
Hi John I've been using courier-imap for several years in a relatively small reality with about twenty users, in view of a migration from real box to a virtual server I'm exploring dovecot as a possible alternative. I am used to stopping the service at night simply to make backups and archiving with a consistent situation in the filesystem, not the best solution but my skills are not so strong :)
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Il lunedì 24 gennaio 2022 2:42 PM, John Stoffel john@stoffel.org ha scritto:
mikfum> thanks John for the reply
No problem! I'm not an expert by any stretch, but I've been using
dovecot for years and doing It for way too many years... LOL!
mikfum> what I would like to do is implement an autoarchive function
mikfum> at server level that, in the night while dovecot is down,
mikfum> moves messages older than n days from the user inbox to a
mikfum> subfolder of the same user (cur to cur)
Why do you bring dovecot down? What maintenance are you running them?
I'm curious because I never reboot my dovecot instance unless there's
a problem. And these days, if you are running a business providing
email service, it seems better to run a cluster of dovecot servers
behind dovecot director to load balance things.
I also feel that using the doveadm commands to do this work is the
better way, since it will properly handle locking and consistency of
the folder(s).
Why do you think that doing this with dovecot is down is the best way
to do this?
John
I would like to ask if it is an acceptable practice to manage messages in the maildir as a file (move them from one folder to another) while dovecot is in stop state thinking that it will be rebuild to the next imap user login
Acceptable? That is subjective. It is your system. Big difference in what you can get away with on a small personal server vs being gmail. Only you know what is acceptable or not on your server.
Mechanically possible, i believe so. Dovecot documentation in multiple places mentions how indexes are always rebuilt as needed. You can even have a setup where your MTA places new messages in folders without going through dovecot. When dovecot "finds" the file it just indexes it. So sure, i dont see why not, just keep in mind the overhead (if any) added by re-indexing.
ok thanks ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Il lunedì 24 gennaio 2022 3:56 AM, dovecot@ptld.com ha scritto:
I would like to ask if it is an acceptable practice to manage messages in the maildir as a file (move them from one folder to another) while dovecot is in stop state thinking that it will be rebuild to the next imap user login
Acceptable? That is subjective. It is your system. Big difference in what you can get away with on a small personal server vs being gmail. Only you know what is acceptable or not on your server.
Mechanically possible, i believe so. Dovecot documentation in multiple places mentions how indexes are always rebuilt as needed. You can even have a setup where your MTA places new messages in folders without going through dovecot. When dovecot "finds" the file it just indexes it. So sure, i dont see why not, just keep in mind the overhead (if any) added by re-indexing.
Hi Mik
I would like to ask if it is an acceptable practice to manage messages in the maildir as a file (move them from one folder to another) while dovecot is in stop state thinking that it will be rebuild to the next imap user login
Maildir is actually designed to do so, as the storage can also lie on NFS and external programms bring mail in.
Speak, you can move and edit files just like normal on the filesystem (even when doevecot is running) and dovecot will rebuild it’s index accordingly.
However for "mass actions", like moving a lot of mail files, specific IMAP tools (dovecot provides a bunch of them) might be the better choise.
Steven
ok, not a 'mass action' but I search about imap tools, thanks! ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Il lunedì 24 gennaio 2022 10:15 AM, Steven Varco dovecot.org@bbs.varco.ch ha scritto:
Hi Mik
I would like to ask if it is an acceptable practice to manage messages in the maildir as a file (move them from one folder to another) while dovecot is in stop state thinking that it will be rebuild to the next imap user login
Maildir is actually designed to do so, as the storage can also lie on NFS and external programms bring mail in.
Speak, you can move and edit files just like normal on the filesystem (even when doevecot is running) and dovecot will rebuild it’s index accordingly.
However for "mass actions", like moving a lot of mail files, specific IMAP tools (dovecot provides a bunch of them) might be the better choise.
Steven
participants (5)
-
dovecot@ptld.com
-
Felix Zielcke
-
John Stoffel
-
mikfum
-
Steven Varco