[Dovecot] Dsync ignores INBOX when converting from mbox to maildir
Hi,
I am trying to convert email box in mbox format to maildir++. It converts all folders except INBOX. For example:
dsync -D -v -f -u 'info@example.org' mirror 'maildir:~/Maildir'
prints:
dsync(info@example.org): Info: Sport: only in source
So it converts Sport folder, but INBOX folder is ignored.
dovecot.conf contains:
mail_location = mbox:~/mail:INBOX=/var/mail/%u
File /var/mail/info@example.org contains email messages.
Dovecot is in version v2.0.rc3.
Do you have any advice what am I doing wrong?
-- Kind Regards Jan Vítek
ČESKÝ WEBHOSTING s.r.o. Tel: +420 605 25 25 25 E-mail: info@cweb.cz http://www.cweb.cz
On Thu, 2010-07-22 at 16:09 +0200, Jan Vítek wrote:
I am trying to convert email box in mbox format to maildir++. It converts all folders except INBOX. For example: .. mail_location = mbox:~/mail:INBOX=/var/mail/%u
Hello,
I built my mailserver around the Ispmail server for Lenny tutorial on www.workaround.com No signicant load as it's just my home network. I originally used the guide for etch and then upgraded. Almost two years later I have experienced no problems.
Lately though I considered filtering spam with a global sieve filter. I created the /var/vmail/globalsieverc file which contains: require ["fileinto"]; # Move spam to spam folder if header :contains "X-Spam-Flag" ["YES"] { fileinto "spam"; stop; }
Made certain it was owned by vmail.
Changed the last stanza of /etc/dovecot/dovecot.conf which in labeled plugin: sieve_global_path = /var/vmail/globalsieverc
Restarted dovecot
Sent a known spam email (GTUBE)
The resulting email is always delivered to INBOX: 2010-07-19 03:35:19 deliver(xxx@xxx.xxx): Info: msgid=: saved mail to INBOX
What am I doing wrong?
Larry Crouch wrote on 22.07.2010:
Lately though I considered filtering spam with a global sieve filter. I created the /var/vmail/globalsieverc file which contains: require ["fileinto"]; # Move spam to spam folder if header :contains "X-Spam-Flag" ["YES"] { fileinto "spam"; stop; }
Made certain it was owned by vmail.
Changed the last stanza of /etc/dovecot/dovecot.conf which in labeled plugin: sieve_global_path = /var/vmail/globalsieverc
Restarted dovecot
Sent a known spam email (GTUBE)
The resulting email is always delivered to INBOX: 2010-07-19 03:35:19 deliver(xxx@xxx.xxx): Info: msgid=: saved mail to INBOX
Have you enabled sieve for the LDA? Example:
protocol lda { mail_plugins = sieve ... ... }
-- Daniel
I have a question,
before ( beta4 ) dsync had the convert command. Now it does not have anymore right ?
All my emails are in mbox format. And i want to convert them to maildir.
Before on the testes, i had to configure userspaces ( i did that using mysql per user configuration ) so the user now have maildir for mail_location, so i used: dsync -u usuer@dom.com -m /path/mbox-formats/ I had the same probles with the inbox, after it i had to run the comando again where the inbox was.
So, let me see if i got it.
Now, with the code from mercurial i have to.
do not change any configuration. and run
dsync -u -f 'user@dom.com' mirror 'maildir:/path/maildir-format'
and after i run this comand i have to change the config on my sql to the user have the new maildir settings right ?
But now, i might have problems with emails sent when i am converting. After change the setting on mysql, how can i convert the msg that arrived at same time that convertion? Thoses emals will be in mbox format and the dsyn will see only maildir settings. Maybe using the parameter "-m" after i change the setting on mysql ?
Thanks!
[]'sf.rique
On Thu, Jul 22, 2010 at 12:39 PM, Timo Sirainen tss@iki.fi wrote:
On Thu, 2010-07-22 at 16:09 +0200, Jan Vítek wrote:
I am trying to convert email box in mbox format to maildir++. It converts all folders except INBOX. For example: .. mail_location = mbox:~/mail:INBOX=/var/mail/%u
On Thu, 2010-07-22 at 15:53 -0300, Henrique Fernandes wrote:
dsync -u -f 'user@dom.com' mirror 'maildir:/path/maildir-format'
-f -u user@dom.com. Although -f isn't necessary at all.
and after i run this comand i have to change the config on my sql to the user have the new maildir settings right ?
Yes.
But now, i might have problems with emails sent when i am converting. After change the setting on mysql, how can i convert the msg that arrived at same time that convertion? Thoses emals will be in mbox format and the dsyn will see only maildir settings. Maybe using the parameter "-m" after i change the setting on mysql ?
Just run dsync mirror again. See the "Converting" example in http://wiki2.dovecot.org/Tools/Dsync
Is it right ?
Converting ☜ http://wiki2.dovecot.org/Tools/Dsync#example_converting
Assuming that the *mail_location* setting in * /etc/dovecot/conf.d/10-mail.conf* is set to: *mail_location = mdbox:~/mdbox*, a logged in system user may convert her/his mails from its Maildir in her/his home directory to the mdbox mailbox format. The user has to execute the command:
*dsync mirror maildir:~/Maildir*
The comand above does not convert mdbox to maildir ?
location1 is mdbox:~/mdbox and location2 is maildir:~/Maildir Right ? or is backwards ? It takes location2 and convert to location1 ?
The first guys explain location1 to location2
Wich one is right ? Sorry i do not have any dovecot configured right now!
Any way, in step 5 how would the comando know wich way it should convert cause i change the conf.
[]'sf.rique
On Thu, Jul 22, 2010 at 4:28 PM, Timo Sirainen tss@iki.fi wrote:
On Thu, 2010-07-22 at 15:53 -0300, Henrique Fernandes wrote:
dsync -u -f 'user@dom.com' mirror 'maildir:/path/maildir-format'
-f -u user@dom.com. Although -f isn't necessary at all.
and after i run this comand i have to change the config on my sql to the user have the new maildir settings right ?
Yes.
But now, i might have problems with emails sent when i am converting. After change the setting on mysql, how can i convert the msg that arrived at same time that convertion? Thoses emals will be in mbox format and the dsyn will see only maildir settings. Maybe using the parameter "-m" after i change the setting on mysql ?
Just run dsync mirror again. See the "Converting" example in http://wiki2.dovecot.org/Tools/Dsync
On 22.7.2010, at 21.11, Henrique Fernandes wrote:
location1 is mdbox:~/mdbox and location2 is maildir:~/Maildir Right ? or is backwards ? It takes location2 and convert to location1 ?
The first guys explain location1 to location2
Wich one is right ? Sorry i do not have any dovecot configured right now!
dsync does two way mirroring. It doesn't matter which one is location1 and which one location2.
Oh, ok.
I thought it did mirroring by the one location, even if the other location is newer!
[]'sf.rique
On Thu, Jul 22, 2010 at 5:54 PM, Timo Sirainen tss@iki.fi wrote:
On 22.7.2010, at 21.11, Henrique Fernandes wrote:
location1 is mdbox:~/mdbox and location2 is maildir:~/Maildir Right ? or is backwards ? It takes location2 and convert to location1 ?
The first guys explain location1 to location2
Wich one is right ? Sorry i do not have any dovecot configured right now!
dsync does two way mirroring. It doesn't matter which one is location1 and which one location2.
Timo, if it does mirroring, i does matter the way!
it has to choose one location to mirror.
Like location1 is production.
location1 has 1000 emails.
I mirror it to location2
Now the owner of location1 deletes some emails! and have now 989
If i do mirroging again, it has to choose if it will copy back from location2 to location1 or erase mails in location2
How does it decide with one its going to do ?
[]'sf.rique
On Fri, Jul 23, 2010 at 12:38 PM, Henrique Fernandes sf.rique@gmail.comwrote:
Oh, ok.
I thought it did mirroring by the one location, even if the other location is newer!
[]'sf.rique
On Thu, Jul 22, 2010 at 5:54 PM, Timo Sirainen tss@iki.fi wrote:
On 22.7.2010, at 21.11, Henrique Fernandes wrote:
location1 is mdbox:~/mdbox and location2 is maildir:~/Maildir Right ? or is backwards ? It takes location2 and convert to location1 ?
The first guys explain location1 to location2
Wich one is right ? Sorry i do not have any dovecot configured right now!
dsync does two way mirroring. It doesn't matter which one is location1 and which one location2.
Timo, if it does mirroring, i does matter the way!
it has to choose one location to mirror.
Like location1 is production.
location1 has 1000 emails.
I mirror it to location2
Now the owner of location1 deletes some emails! and have now 989
If i do mirroging again, it has to choose if it will copy back from location2 to location1 or erase mails in location2
How does it decide with one its going to do ?
[]'sf.rique
On Fri, Jul 23, 2010 at 12:38 PM, Henrique Fernandes sf.rique@gmail.comwrote:
Oh, ok.
I thought it did mirroring by the one location, even if the other location is newer!
[]'sf.rique
On Thu, Jul 22, 2010 at 5:54 PM, Timo Sirainen tss@iki.fi wrote:
On 22.7.2010, at 21.11, Henrique Fernandes wrote:
location1 is mdbox:~/mdbox and location2 is maildir:~/Maildir Right ? or is backwards ? It takes location2 and convert to location1 ?
The first guys explain location1 to location2
Wich one is right ? Sorry i do not have any dovecot configured right now!
dsync does two way mirroring. It doesn't matter which one is location1 and which one location2.
On Tue, 2010-08-03 at 11:20 -0300, Henrique Fernandes wrote:
Like location1 is production.
location1 has 1000 emails.
I mirror it to location2
Now the owner of location1 deletes some emails! and have now 989
If i do mirroging again, it has to choose if it will copy back from location2 to location1 or erase mails in location2
How does it decide with one its going to do ?
If mails are deleted in location1, mirroring causes the mails to be deleted from location2 as well. If new mails are added to location2, they are copied to location1. This is pretty easy to handle because in IMAP the UID numbers always grow, so if you see UIDs 1,5,10 in location1 and UIDs 1,10 in location2, you'll know that in location1 UID 5 was deleted. UIDs at the end of the mailbox are then handled specially by looking up from index files if they were actually deleted. And there is some conflict checking also by looking message GUIDs.
http://wiki2.dovecot.org/Design/Dsync has also some text about how the syncing works internally. I should update it though..
Thanks for the explanation.
[]'sf.rique
On Tue, Aug 3, 2010 at 11:57 AM, Timo Sirainen tss@iki.fi wrote:
On Tue, 2010-08-03 at 11:20 -0300, Henrique Fernandes wrote:
Like location1 is production.
location1 has 1000 emails.
I mirror it to location2
Now the owner of location1 deletes some emails! and have now 989
If i do mirroging again, it has to choose if it will copy back from location2 to location1 or erase mails in location2
How does it decide with one its going to do ?
If mails are deleted in location1, mirroring causes the mails to be deleted from location2 as well. If new mails are added to location2, they are copied to location1. This is pretty easy to handle because in IMAP the UID numbers always grow, so if you see UIDs 1,5,10 in location1 and UIDs 1,10 in location2, you'll know that in location1 UID 5 was deleted. UIDs at the end of the mailbox are then handled specially by looking up from index files if they were actually deleted. And there is some conflict checking also by looking message GUIDs.
http://wiki2.dovecot.org/Design/Dsync has also some text about how the syncing works internally. I should update it though..
Tested, works now. Thanks.
JV
----- Original Message ----- From: "Timo Sirainen" tss@iki.fi To: "Jan Vítek" vitek@cesky-webhosting.cz Cc: dovecot@dovecot.org Sent: Thursday, July 22, 2010 5:39 PM Subject: Re: [Dovecot] Dsync ignores INBOX when converting from mbox to maildir
On Thu, 2010-07-22 at 16:09 +0200, Jan Vítek wrote:
I am trying to convert email box in mbox format to maildir++. It converts all folders except INBOX. For example: .. mail_location = mbox:~/mail:INBOX=/var/mail/%u
participants (5)
-
Daniel Luttermann
-
Henrique Fernandes
-
Jan Vítek
-
Larry Crouch
-
Timo Sirainen