doveadm move and create folders for the archive
Hello guys, I'm on a few mailinglists, which I want to archive at the end of the year. I know the command to do this, but must I create the folders for the archive by myself or is there a switch for doveadm? I tested this, but it exits with an error about the missing mailbox. doveadm -D copy -u michael Archiv/debian-user/2018 mailbox debian-user since 365d error message: doveadm(michael): Debug: Effective uid=1000, gid=1000, home=/home/michael doveadm(michael): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:~/Maildir:LAYOUT=fs doveadm(michael): Debug: fs: root=/home/michael/Maildir, index=, indexpvt=, control=, inbox=/home/michael/Maildir, alt= doveadm(michael): Error: Can't open mailbox 'Archiv/debian-user/2018': Mailbox doesn't exist: Archiv/debian-user/2018 Sorry for the long lines. Tia Michael -- Psychoceramics: The study of crackpots.
Re: question about using procmail
On Jul 30, 2018 um 16:48:13, Joe Wong wrote: > Hello, I am new to Dovecot, testing the setup with Solr FTS plugin. Currently > I > am using procmail to delivery email into user's mailbox. I am using maildir on > file system. I found that if email is delivered via procmail, the > indexer-worker is not being called. But when I move the email between folders > via IMAP, indexer is involved. Is this expected? Hello Joe, I ran in the problem a few weeks ago. You must use dovecot for delivery in your procmailrc. I have -- DELIVER=/usr/lib/dovecot/deliver :0 * ^Subject:.*apt-listchanges | $DELIVER -m apt-listchanges -- -m mailbox Destination mailbox (default is INBOX). If the mailbox doesn't exist, it will not be created (unless the lda_mailbox_autocreate setting is set to yes). If a message couldn't be saved to the mailbox for any reason, it's delivered to INBOX instead. Hth Michael -- Never test for an error you don't know how to handle. signature.asc Description: PGP signature
Re: doveadm expunge didn't clear Trash mailbox
Hello Joseph, On Jul 24, 2018 um 13:12:05, Joseph Tam wrote: > On Mon, 23 Jul 2018, Michael Wagner wrote: > > > here works a dovecot 2.2.27 on a raspberrypi and the behaviour is as > > expected. > > > > doveadm -f tab fetch -u "uid date.saved" mailbox Trash > > uid date.saved > > 314 2018-06-23 00:35:59 > > 315 2018-06-23 12:39:10 > > 316 2018-06-24 10:32:43 > > ... > > > > And I have a cron script that expunges the mails older than 30 days. > > /usr/bin/doveadm expunge -u mailbox Trash savedbefore 30d > > Thanks for your observation. I think you probably use maildir format, > yes? > > I think my problem stems from the fact I use mbox, so one file contains > many messages, whereas maildir uses one file for each message. Dovecot, > from my understanding, will use the message file's mtime for date.saved > if it doesn't have it in the cached. This is probably why I am seeing > multiple messages with the same value. yes, I use here the maildir format and I think you are right that dovecot uses the mtime and this is set every time when you write to the mbox file. If you use linux, you can use mb2md for the converting to maildir. apt show mb2md Description: Convert Mbox mailboxes to Maildir format mb2md (mbox to maildir) takes one or more Mbox format mailbox files in a directory and convert them to Maildir format mailboxes. As the Mbox format has some drawbacks, D. J. Bernstein created the Maildir format when he wrote Qmail. With the Mbox format all mail of a specific folder is stored as one large text file. The Maildir format stores each mail as a separate file. It is a faster and more efficient way to store mail. It works particularly well over NFS, which has a long history of locking-related woes. The Mbox format is used by many POP3/IMAP servers, most mail servers (MTAs) and mail readers (MUAs). The Maildir format is used by Qmail, Courier-MTA and can be also used as a alternative mail storage format by Postfix and Exim or any MTA which can use procmail as MDA. POP3/IMAP servers which support Maildirs are e.g. Courier IMAP and Dovecot. mb2md does not only convert Mbox mailbox files into a Maildir but can also convert the /var/spool/mail/$USER mailspool file. It is smart enough to not transfer a dummy message such as the UW IMAPD puts at the start of Mbox mailboxes - and you could add your own search terms into the script to make it ignore other forms of dummy first message. I never repented the converting to maildir. Michael PS: Sorry for the mail I sent private to you, it was a misconfiguration of mutt. -- BOFH excuse #446: Mailer-daemon is busy burning your message in hell. signature.asc Description: PGP signature
Re: doveadm expunge didn't clear Trash mailbox
On Jul 18, 2018 um 15:05:46, Joseph Tam wrote: > On Wed, 18 Jul 2018, Sophie Loewenthal wrote: > > > Why did my 'doveadm expunge' command not clear the Trash out of a mailbox? > > > > The oldest messages was put into the Trash on the 26th June 2018 as shown > > in the file timestamp. > > > > -rw--- 1 vmail mail 33056 Jun 26 16:46 > > 1530031582.M768773P18242.mx10,S=33056,W=33510:2,RS > > > > # doveadm -D expunge -u testu...@example.org mailbox Trash savedbefore 2d > > I was going to suggest that you dump the savedbefore dates on all your > messages to see what Dovecot thinks your message's timestamps are. > I tried it out myself and was surprised to find *all* messages in *any* > mailbox I looked at gave the same timestamp -- probably that of the > latest message. > > For example, > > # doveadm -f tab fetch -u {user} "uid date.saved" mailbox Trash > uid date.saved > 23624 2018-07-18 14:50:03 > 23625 2018-07-18 14:50:03 > [... 3657 lines removed ...] > 27295 2018-07-18 14:50:03 > 27296 2018-07-18 14:50:03 > 27297 2018-07-18 14:50:03 > > # doveadm -f tab fetch -u {user} "uid date.saved" mailbox INBOX > uid date.saved > 94878 2018-07-18 14:53:46 > 100366 2018-07-18 14:53:46 > [... 140 lines removed ...] > 102313 2018-07-18 14:53:46 > 102314 2018-07-18 14:53:46 > 102315 2018-07-18 14:53:46 > > This would explain why the cron script I use to blow away old deleted mail > has not fired in ages. > > Is this a bug, or am I not understanding what "savedbefore" means now? It > certainly has changed behaviour since <2.2, since my script used to > work before. Hello Joseph, here works a dovecot 2.2.27 on a raspberrypi and the behaviour is as expected. doveadm -f tab fetch -u "uid date.saved" mailbox Trash uid date.saved 314 2018-06-23 00:35:59 315 2018-06-23 12:39:10 316 2018-06-24 10:32:43 317 2018-06-24 10:32:43 318 2018-06-24 10:32:47 319 2018-06-24 14:26:24 320 2018-06-24 14:26:24 321 2018-06-24 14:28:45 322 2018-06-24 14:28:45 -- lines skipped 574 2018-07-20 20:58:21 575 2018-07-21 17:22:17 576 2018-07-22 15:15:18 577 2018-07-22 15:28:28 578 2018-07-22 15:28:28 579 2018-07-22 15:28:28 580 2018-07-22 16:12:47 581 2018-07-23 13:27:12 582 2018-07-23 12:55:26 583 2018-07-23 13:19:01 584 2018-07-23 13:19:01 585 2018-07-23 13:49:01 586 2018-07-23 13:52:46 And I have a cron script that expunges the mails older than 30 days. /usr/bin/doveadm expunge -u mailbox Trash savedbefore 30d Michael signature.asc Description: PGP signature