Re: [Dovecot] Convert Plugin

2010-10-28 Thread Tobias Daucher

Am 27.10.2010 20:26, schrieb Daniel Luttermann:

Dr Matthew Williams wrote on 10/27/2010:


Hello,

I have been investigating mailbox conversions and have used the convert
plugin under Dovecot V1.x. I cannot find the plugin in the list on the
wiki for Dovcot V2.x, is it not included for a reason?

I understand that I can do a post-login script to do the conversion,
any guidance on best practices?


you can use dsync instead.

Link: http://wiki2.dovecot.org/Tools/Dsync

--
Daniel


after having some problems with dsync, we did all convertings like this 
(imap-tool/daemon)
1. make a namespace for the old format
2. make a namespace for the new format
3. use something like this:
(echo 1 select .mboxnamespace/old; echo 2 copy 1:* mdboxnamespace/new; echo 3 logout)| 
/usr/local/libexec/dovecot/imap -u user

after checking the result you can do
(echo 1 select .mboxnamespace/old; echo 2 delete .mboxnamespace/old; echo 3 logout)| 
/usr/local/libexec/dovecot/imap -u user
and thats it... works for every formats that dovecot can access... perhaps it is possible to add 
this way as an alternative for dsync to the wiki - cause dsync has some problems.. i.e. wenn old 
mailboxes have little errors or something like that...

note: you have to create the new folder in the new namespace of course before 
copying...

bye and i hope this will help all of you!
Tobi

--


Dr. Nagler  Company GmbH
Hauptstraße 9
92253 Schnaittenbach

Tel : 09622-7197-38
Fax : 09622-7197-50
Web : http://www.nagler-company.com
E-Mail : tobias.dauc...@nagler-company.com

Hauptsitz:  Schnaittenbach
Handelregister: Amberg HRB 4653
Gerichtsstand:  Amberg
Steuernummer:   201/118/51825
USt.-ID-Nummer: DE 273143997
Geschäftsführer:Dr. Martin Nagler, Dr. Dr. Karl-Kuno Kunze


Re: [Dovecot] Convert Plugin

2010-10-27 Thread Daniel Luttermann

Dr Matthew Williams wrote on 10/27/2010:


Hello,

I have been investigating mailbox conversions and have used the convert
plugin under Dovecot V1.x. I cannot find the plugin in the list on the
wiki for Dovcot V2.x, is it not included for a reason?

I understand that I can do a post-login script to do the conversion,
any guidance on best practices?


you can use dsync instead.

Link: http://wiki2.dovecot.org/Tools/Dsync

--
Daniel



Re: [Dovecot] Convert plugin

2010-10-15 Thread Timo Sirainen
On Wed, 2010-10-06 at 22:01 +0200, Egbert Jan van den Bussche wrote:
 I'm trying the example from the wiki:
 
 plugin {
convert_mail = mbox:~/mail:INBOX=/var/mail/%n
 }
 
 but have still not succeded. 

Did you figure it out already? The problem is that you have no ~/mail/
directory, convert plugin doesn't then do anything because it thinks the
mails are already converted. Either you need to create those dirs, or
maybe it's easier to just use one of the scripts and do all the users at
once some weekend.




Re: [Dovecot] Convert plugin

2010-10-15 Thread Donny Brooks

 On 10/15/2010 1:10 PM, Timo Sirainen wrote:

On Wed, 2010-10-06 at 22:01 +0200, Egbert Jan van den Bussche wrote:

I'm trying the example from the wiki:

plugin {
convert_mail = mbox:~/mail:INBOX=/var/mail/%n
}

but have still not succeded.

Did you figure it out already? The problem is that you have no ~/mail/
directory, convert plugin doesn't then do anything because it thinks the
mails are already converted. Either you need to create those dirs, or
maybe it's easier to just use one of the scripts and do all the users at
once some weekend.


Be sure your mail in /home/username is stored in mail and not Mail. 
Otherwise change the ~/mail to ~/Mail and it will work. This is what 
mine was. Also check the /var/mail/%n portion. Mine was stored in 
/var/spool/mail/%n.


Donny B.


Re: [Dovecot] Convert plugin

2010-10-15 Thread Egbert Jan van den Bussche

Op 15-10-2010 20:15, Donny Brooks schreef:

On 10/15/2010 1:10 PM, Timo Sirainen wrote:

On Wed, 2010-10-06 at 22:01 +0200, Egbert Jan van den Bussche wrote:

I'm trying the example from the wiki:

plugin {
convert_mail = mbox:~/mail:INBOX=/var/mail/%n
}

but have still not succeded.

Did you figure it out already? The problem is that you have no ~/mail/
directory, convert plugin doesn't then do anything because it thinks the
mails are already converted. Either you need to create those dirs, or
maybe it's easier to just use one of the scripts and do all the users at
once some weekend.



Be sure your mail in /home/username is stored in mail and not Mail.
Otherwise change the ~/mail to ~/Mail and it will work. This is what
mine was. Also check the /var/mail/%n portion. Mine was stored in
/var/spool/mail/%n.

Donny B.


Thanks Timo and Donny.

Still not figured out how to make this happen in a reliable way. But I'm 
learning every day...


This probably means that I have to build a temporary /home/user/mail/ 
structure for about 500+ users to satisfy the convert plugin. Maybe a 
fake mailstore file with just one message in that directory. The bulk 
mail is then still the file in /var/mail/username. Alternatively I 
could just move the big file from /var/mail/ to ~/mail. (Probably with 
the name 'ínbox'?).


On the new system home dir expands to:
/var/vmail/domain/user
and the mail dir is:
/var/vmail/domain/user/Maildir/
The old mail would them be in /var/vmail/domain/user/mail/

These remote users on the old mail system were supposed to use pop3 ONLY 
but some of them found out about imap... and we had the service running. 
So their mail just kept growing in the file /var/mail/username. Because 
they are not system users pur-sang they have no real /home/username/mail 
directory at all. All they could do was fetch their mail with pop3; no 
local store with fancy folder structure.


When convert runs, under which user is it? root? vmail (virt. users have 
all vmail:vmail) I suppose since it is after login (which is root by 
default IIRC) has run?


TNX
Egbert Jan




Re: [Dovecot] Convert plugin

2010-10-15 Thread Egbert Jan van den Bussche

Op 15-10-2010 20:15, Donny Brooks schreef:

On 10/15/2010 1:10 PM, Timo Sirainen wrote:

On Wed, 2010-10-06 at 22:01 +0200, Egbert Jan van den Bussche wrote:

I'm trying the example from the wiki:

plugin {
convert_mail = mbox:~/mail:INBOX=/var/mail/%n
}

but have still not succeded.

Did you figure it out already? The problem is that you have no ~/mail/
directory, convert plugin doesn't then do anything because it thinks the
mails are already converted. Either you need to create those dirs, or
maybe it's easier to just use one of the scripts and do all the users at
once some weekend.



Be sure your mail in /home/username is stored in mail and not Mail.
Otherwise change the ~/mail to ~/Mail and it will work. This is what
mine was. Also check the /var/mail/%n portion. Mine was stored in
/var/spool/mail/%n.

Donny B.


OK! I can confirm that the idea to move the big old mailbox files to 
~/mail works fine. The emails are flagged as new but that is not a real 
problem (not of mine at least). I do see a new problem though... As long 
as the user has not logged in to the new mailserver, his home dir  is 
not created yet (and mail dir neither) so I cannot place his old 
mailstore in that location.


I will do the test again with a dummy home dir like /var/dummy/%n/ with 
the old mail store in there called inbox. All owned by vmail:vmail. This 
is something I can write a script for to do the conversion from 
/var/mail/user mailstore on the ols server to /var/dummy/%n/inbox.


CU
EJ


[Dovecot] Convert plugin

2010-10-06 Thread Egbert Jan van den Bussche

Hi,
I'm trying to get old mail from /var/mail/user, where user is the 
(sometimes) huge mailfile, not a directory, converted to the maildir 
INBOX in ~/Maildir. Users have no ~/mail directory; they were supposed 
to use pop3 only.


I'm trying the example from the wiki:

plugin {
  convert_mail = mbox:~/mail:INBOX=/var/mail/%n
}

but have still not succeded. I tried /var/mail/user where user is a 
file and /var/mail/user/user where user is first a diredtory en the 
second user a file. I also used the filename 'inbox', since the 
logging suggested that to me. Other logging seems to indicate that the 
right maildir++ info is composed.


I'm in vor any advise!
TIA
Egbert Jan (NL)

Here is dovecot -n:

# 1.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-25-server x86_64 Ubuntu 10.04.1 LTS
log_path: /var/log/dovecot/error.log
info_log_path: /var/log/dovecot/info.log
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap pop3 imaps pop3s managesieve
listen: *, [::]
ssl_cert_file: /etc/ssl/certs/ssl-mail.pem
ssl_key_file: /etc/ssl/private/ssl-mail.key
ssl_cipher_list: 
ALL:!LOW:!SSLv2:ALL:!aNULL:!ADH:!eNULL:!EXP:RC4+RSA:+HIGH:+MEDIUM

disable_plaintext_auth: no
verbose_ssl: yes
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(pop3): /usr/lib/dovecot/pop3-login
login_executable(managesieve): /usr/lib/dovecot/managesieve-login
mail_max_userip_connections(default): 10
mail_max_userip_connections(imap): 10
mail_max_userip_connections(pop3): 3
mail_max_userip_connections(managesieve): 10
first_valid_uid: 200
mail_privileged_group: mail
mail_location: maildir:~/Maildir
mail_debug: yes
mbox_write_locks: fcntl dotlock
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_executable(managesieve): /usr/lib/dovecot/managesieve
mail_plugins(default): convert autocreate
mail_plugins(imap): convert autocreate
mail_plugins(pop3):
mail_plugins(managesieve):
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve
imap_client_workarounds(default): outlook-idle delay-newmail
imap_client_workarounds(imap): outlook-idle delay-newmail
imap_client_workarounds(pop3):
imap_client_workarounds(managesieve):
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
pop3_client_workarounds(managesieve):
lda:
  postmaster_address: postmaster
  deliver_log_format: msgid=%m: %$
  rejection_reason: Your message to %t was automatically rejected:%n%r
  auth_socket_path: /var/run/dovecot/auth-master
auth default:
  mechanisms: plain login
  realms: kader.hcc.nl hobby.nl
  cache_size: 1024
  verbose: yes
  debug: yes
  passdb:
driver: pam
args: failure_show_msg=yes cache_key=%u dovecot
  passdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  userdb:
driver: passwd
args: mail=maildir:~/Maildir
  userdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  socket:
type: listen
client:
  path: /var/spool/postfix/private/dovecot-auth
  mode: 432
  user: postfix
  group: postfix
master:
  path: /var/run/dovecot/auth-master
  mode: 384
  user: vmail
  group: vmail
plugin:
  convert_mail: mbox:~/mail:INBOX=/var/mail/%n
  convert_skip_broken_mailboxes: yes
  autocreate: Trash
  autocreate2: Sent
  autocreate3: Drafts
  autocreate4: Spam
  autosubscribe: Trash
  autosubscribe2: Sent
  autosubscribe3: Drafts
  autosubscribe4: Spam



Re: [Dovecot] Convert plugin

2010-08-03 Thread Egbert

Op 30-7-2010 21:44, Timo Sirainen schreef:

Instead of using convert plugin, you could run mb2md.pl also as post-login 
script. Probably easier.. http://wiki.dovecot.org/PostLoginScripting


Indeed this seems to work. Thanks. One problem: The login is denied the 
first time (user/passw not correct). The /var/mail/user IS converted 
though. Cannot find any hint where to look in the logs... A second 
attempt logs the user in and the converted messages are displayed as unread.


In dovecot.conf:
protocol imap {
  #mail_executable = /usr/lib/dovecot/imap
  mail_executable = /home/egbert/script.sh

The script in /home/egbert:
#!/bin/sh
#
# no mbox in homedir, only in /var/mail
/home/egbert/mb2md.pl -S -W -s /var/mail/egbert -d $PWD
#
# make copied messages ownd by vmail
chown vmail:vmail $PWD/cur/*
#
# disable double conversion
mv /var/mail/egbert /var/mail/egbert-converted
#
# continue to run imap
exec /usr/lib/dovecot/imap $@


$PWD = /home/vmail/vandenbussche.nl/egbert
All is hardcoded for testing; I will use suhstrings of $USER to make 
this more general. Since the script runs as root, it is not very 
importand how /var/mail ownerships looks like.


Egbert Jan


Re: [Dovecot] Convert plugin

2010-07-31 Thread Egbert

Op 30-7-2010 21:44, Timo Sirainen schreef:

Instead of using convert plugin, you could run mb2md.pl also as post-login 
script. Probably easier.. http://wiki.dovecot.org/PostLoginScripting


Thanks for your advice, Timo. Much appreciated. Running a script sounds 
like a good solution. The script runs as root which might simplifiy 
things ;-)


Are things like %d, %u, %n also available? I have to build the argument 
list for mb2md.pl in that script.


Egbert Jan


Re: [Dovecot] Convert plugin

2010-07-31 Thread Timo Sirainen
On 31.7.2010, at 10.17, Egbert wrote:

 Are things like %d, %u, %n also available? I have to build the argument list 
 for mb2md.pl in that script.

You have $USER environment that contains u...@domain.



Re: [Dovecot] Convert plugin

2010-07-30 Thread Egbert

Op 30-7-2010 0:07, Daniel Luttermann schreef:

Egbert wrote on 29.07.2010:


Hi,
I'm trying to convert users from a sendmail server to a postfix/dovecot
server. All works fine but one of the last things is to rescue the
messages in /var/mail/user  on the old server. This seems very
straitforward using the convert plugin but with the settings from the
wiki, nothing happens when the user logs in. Do I need a private
namespace for this as suggested elsewhere in the wiki?


No hint in the logfile? Maybe a permission problem or Dovecot can't
find any emails? If nothing is logged maybe it helps when you set
mail_debug=yes in dovecot.conf?

Btw: it seems that in the upcoming Dovecot 2.0 version there's no
convert plugin available anymore - with 2.0 you can use dsync to
convert emails between different mailbox formats.


--
Daniel


Yeah, the obvious place to look. There I found out that the plugin looks 
for a direcory in /var/mail/ called user and in that directory a 
mailfile called 'inbox' is expected.
So I have now the convert in imap and pop3 chapters of dovecot.conf and 
enabled the plugin in the plugin section:


protocol imap {
  mail_plugins = convert
}
protocol pop3 {
  mail_plugins = convert
}
plugin {
  convert_mail = mbox:/var/mail/%u
}

So things finally start to work. Only the rename of the /var/mail/user 
directory doesn't work yet. Wrong owner. I made /var/mail owned by 
vmail:vmail but that is not good. Maybe it should be owned by dovecot. 
Who is the owner of the convert process?


EJ





Re: [Dovecot] Convert plugin

2010-07-30 Thread Daniel Luttermann
Egbert wrote on 30.07.2010:

 Op 30-7-2010 0:07, Daniel Luttermann schreef:
 Egbert wrote on 29.07.2010:

 Hi,
 I'm trying to convert users from a sendmail server to a postfix/dovecot
 server. All works fine but one of the last things is to rescue the
 messages in /var/mail/user  on the old server. This seems very
 straitforward using the convert plugin but with the settings from the
 wiki, nothing happens when the user logs in. Do I need a private
 namespace for this as suggested elsewhere in the wiki?

 No hint in the logfile? Maybe a permission problem or Dovecot can't
 find any emails? If nothing is logged maybe it helps when you set
 mail_debug=yes in dovecot.conf?

 Btw: it seems that in the upcoming Dovecot 2.0 version there's no
 convert plugin available anymore - with 2.0 you can use dsync to
 convert emails between different mailbox formats.


 --
 Daniel

 Yeah, the obvious place to look. There I found out that the plugin looks
 for a direcory in /var/mail/ called user and in that directory a 
 mailfile called 'inbox' is expected.
 So I have now the convert in imap and pop3 chapters of dovecot.conf and
 enabled the plugin in the plugin section:

 protocol imap {
mail_plugins = convert
 }
 protocol pop3 {
mail_plugins = convert
 }
 plugin {
convert_mail = mbox:/var/mail/%u
 }

 So things finally start to work. Only the rename of the /var/mail/user
 directory doesn't work yet. Wrong owner. I made /var/mail owned by 
 vmail:vmail but that is not good. Maybe it should be owned by dovecot.
 Who is the owner of the convert process?

 EJ

I think that vmail should be the correct user/group for this but it
could be a problem if the source and destination directories are the
same (home directory is the same as mail_location).

Have you set a different mail location? I think Dovecot can't rename
the old directory if the new mail location is in the same directory.


--
Daniel



Re: [Dovecot] Convert plugin

2010-07-30 Thread Timo Sirainen
On Fri, 2010-07-30 at 12:36 +0200, Egbert wrote:

 So things finally start to work. Only the rename of the /var/mail/user 
 directory doesn't work yet. Wrong owner. I made /var/mail owned by 
 vmail:vmail but that is not good. Maybe it should be owned by dovecot. 
 Who is the owner of the convert process?

Convert plugin wants to rename the mail root directory. It won't work
nicely unless you have something like

/var/mail/user/mail/

under which all the mailboxes are. Anyway, I'd suggest using
http://dovecot.org/tools/mb2md.pl instead of convert plugin. That'll
preserve stuff better.




Re: [Dovecot] Convert plugin

2010-07-30 Thread Egbert

Op 30-7-2010 16:27, Timo Sirainen schreef:

On Fri, 2010-07-30 at 12:36 +0200, Egbert wrote:


So things finally start to work. Only the rename of the /var/mail/user
directory doesn't work yet. Wrong owner. I made /var/mail owned by
vmail:vmail but that is not good. Maybe it should be owned by dovecot.
Who is the owner of the convert process?


Convert plugin wants to rename the mail root directory. It won't work
nicely unless you have something like

/var/mail/user/mail/

under which all the mailboxes are. Anyway, I'd suggest using
http://dovecot.org/tools/mb2md.pl instead of convert plugin. That'll
preserve stuff better.


Thanks Timo. I did play with mb2md.pl and it does the job. It is more an 
operational problem, WE do the convert for a few hundred users (they 
have no mbox in home because they dont have a homedir, just 
/var/mail/user) OR the convert happens when the user logs in on the 
new server. Both aproaches have they pro and con.


Egbert Jan


Re: [Dovecot] Convert plugin

2010-07-30 Thread Egbert

Op 30-7-2010 14:45, Daniel Luttermann schreef:

Egbert wrote on 30.07.2010:


Op 30-7-2010 0:07, Daniel Luttermann schreef:

Egbert wrote on 29.07.2010:


Hi,
I'm trying to convert users from a sendmail server to a postfix/dovecot
server. All works fine but one of the last things is to rescue the
messages in /var/mail/user   on the old server. This seems very
straitforward using the convert plugin but with the settings from the
wiki, nothing happens when the user logs in. Do I need a private
namespace for this as suggested elsewhere in the wiki?


No hint in the logfile? Maybe a permission problem or Dovecot can't
find any emails? If nothing is logged maybe it helps when you set
mail_debug=yes in dovecot.conf?

Btw: it seems that in the upcoming Dovecot 2.0 version there's no
convert plugin available anymore - with 2.0 you can use dsync to
convert emails between different mailbox formats.


--
Daniel



Yeah, the obvious place to look. There I found out that the plugin looks
for a direcory in /var/mail/ calleduser  and in that directory a
mailfile called 'inbox' is expected.
So I have now the convert in imap and pop3 chapters of dovecot.conf and
enabled the plugin in the plugin section:



protocol imap {
mail_plugins = convert
}
protocol pop3 {
mail_plugins = convert
}
plugin {
convert_mail = mbox:/var/mail/%u
}



So things finally start to work. Only the rename of the /var/mail/user
directory doesn't work yet. Wrong owner. I made /var/mail owned by
vmail:vmail but that is not good. Maybe it should be owned by dovecot.
Who is the owner of the convert process?



EJ


I think that vmail should be the correct user/group for this but it
could be a problem if the source and destination directories are the
same (home directory is the same as mail_location).

Have you set a different mail location? I think Dovecot can't rename
the old directory if the new mail location is in the same directory.


--
Daniel


The renaming of the maildir fails, wrong user. I can fiddle this out. 
Perhaps the /var/mail tree should be owned by user dovecot. Dunno, have 
to try. If all fails, I give the mailbox 777 during the conversion...


There are no /home/user mboxes on the old server since the (virtual) 
users have no home dir. On the new system all mail is owned by vmail. 
Again the users are virtual and are in MySQL databases 
(postfix/dovecot/postfixadmin/roundcube).


On the new server all users use Maildir structure in 
/home/vmail/domain/user. The old postfix mail is made available on 
the new server in /var/mail/user by copy or nfs to facilitate the 
conversion of old messages to Maildir. That structure does not work as 
we know, there must be a directory in between.
With some scripting I could make the old mail appear as 
/var/mail/user/inbox on the new server. Doing this makes this approach 
more ore less the same as a big bang conversion using mb2md.pl with the 
same (dis?)advantages (user not in control when things happen). We have 
quite a few dormant users too; would be nice to be able to trace them 
and kick them of the new server.


Egbert Jan




Re: [Dovecot] Convert plugin

2010-07-30 Thread Timo Sirainen
On Fri, 2010-07-30 at 17:01 +0200, Egbert wrote:

 The renaming of the maildir fails, wrong user. I can fiddle this out. 
 Perhaps the /var/mail tree should be owned by user dovecot.

No. It's never dovecot user. It's the mail user uid, as returned by your
userdb. http://wiki.dovecot.org/UserIds




Re: [Dovecot] Convert plugin

2010-07-30 Thread Egbert

Op 30-7-2010 17:32, Timo Sirainen schreef:

On Fri, 2010-07-30 at 17:01 +0200, Egbert wrote:


The renaming of the maildir fails, wrong user. I can fiddle this out.
Perhaps the /var/mail tree should be owned by user dovecot.


No. It's never dovecot user. It's the mail user uid, as returned by your
userdb. http://wiki.dovecot.org/UserIds


There seems to be a problem then. The UID of vmail is 5000 for all 
users. The rename failed when the whole /var/mail tree was owned by 
vmail. The rename is quite essentiial to prevent re-converting the mbox 
again and again...


Egbert Jan


Re: [Dovecot] Convert plugin

2010-07-30 Thread Timo Sirainen
Instead of using convert plugin, you could run mb2md.pl also as post-login 
script. Probably easier.. http://wiki.dovecot.org/PostLoginScripting

[Dovecot] Convert plugin

2010-07-29 Thread Egbert

Hi,
I'm trying to convert users from a sendmail server to a postfix/dovecot 
server. All works fine but one of the last things is to rescue the 
messages in /var/mail/user on the old server. This seems very 
straitforward using the convert plugin but with the settings from the 
wiki, nothing happens when the user logs in. Do I need a private 
namespace for this as suggested elsewhere in the wiki?


I experimented with mb2md.pl and that seems to do what we need but 
having the old mail converted upon login is much more attractive. In 
that way we hope that we can also find some 'dead' users.


TIA
Egbert Jan



Re: [Dovecot] Convert plugin

2010-07-29 Thread Daniel Luttermann
Egbert wrote on 29.07.2010:

 Hi,
 I'm trying to convert users from a sendmail server to a postfix/dovecot
 server. All works fine but one of the last things is to rescue the 
 messages in /var/mail/user on the old server. This seems very 
 straitforward using the convert plugin but with the settings from the 
 wiki, nothing happens when the user logs in. Do I need a private 
 namespace for this as suggested elsewhere in the wiki?

No hint in the logfile? Maybe a permission problem or Dovecot can't
find any emails? If nothing is logged maybe it helps when you set
mail_debug=yes in dovecot.conf?

Btw: it seems that in the upcoming Dovecot 2.0 version there's no
convert plugin available anymore - with 2.0 you can use dsync to
convert emails between different mailbox formats.


--
Daniel



[Dovecot] convert Plugin Error

2010-06-14 Thread Bradlee Landis
I am getting an error when using the convert plugin for dovecot.

Jun 14 13:27:20 mail dovecot: IMAP(user): Mailbox conversion:
rename(/home/user/mail, /home/user/mail-converted) failed: Directory
not empty

Dovecot creates mail-converted, but does not delete mail completely
for some reason. It continues to add a message from the mbox to
Maildir format, creating duplicates every time I check my email.

I can fix it by deleting mail-converted, but I don't want this to
happen to other users on the system. Does anyone have a clue as to why
it's doing this, and what I can do to fix it? I can send you my mbox
file and home directory structure if you'd like to take a gander at
it.

Dovecot v1.0.7
Scientific Linux 5.4 (Importing mbox files from RHEL 3.8).

-- 
Thanks,
Brad Landis


[Dovecot] Convert Plugin dovecot2.0

2010-05-25 Thread Henrique Fernandes
There is a convert plugin for dovecot2.0 ?

I did not find it in src or when i tried to load it!

Thanks

[]'sf.rique


Re: [Dovecot] Convert plugin question

2008-02-05 Thread Timo Sirainen
On Mon, 2008-02-04 at 15:00 -0500, Dmitry Filonov wrote:

 Is it possible to change convert plugin, so it would keep old 
 UIDVALIDITY and UIDNEXT after conversion from mbox to Maildir?

It would also have to preserve all messages' UIDs. This is something
that has been in my TODO for a while, but it would require pretty large
changes so it hasn't been done yet.

Maildir - dbox migration can preserve UIDs though. :)



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Convert plugin question

2008-02-05 Thread Dmitry Filonov

Timo Sirainen wrote:

On Mon, 2008-02-04 at 15:00 -0500, Dmitry Filonov wrote:

  
Is it possible to change convert plugin, so it would keep old 
UIDVALIDITY and UIDNEXT after conversion from mbox to Maildir?



It would also have to preserve all messages' UIDs. This is something
that has been in my TODO for a while, but it would require pretty large
changes so it hasn't been done yet.

Maildir - dbox migration can preserve UIDs though. :)

  
Why this require large changes? Isn't it only about creating 
dovecot-uidlist on migration?

Anyway, it's your time and I can't ask you to work on my problem first.

What about mbox-dbox migration? Does it preserve UIDs?  


Thanks,

FiL



Re: [Dovecot] Convert plugin question

2008-02-05 Thread Timo Sirainen
On Tue, 2008-02-05 at 10:50 -0500, Dmitry Filonov wrote:
 Timo Sirainen wrote:
  On Mon, 2008-02-04 at 15:00 -0500, Dmitry Filonov wrote:
 

  Is it possible to change convert plugin, so it would keep old 
  UIDVALIDITY and UIDNEXT after conversion from mbox to Maildir?
  
 
  It would also have to preserve all messages' UIDs. This is something
  that has been in my TODO for a while, but it would require pretty large
  changes so it hasn't been done yet.
 
  Maildir - dbox migration can preserve UIDs though. :)
 

 Why this require large changes? Isn't it only about creating 
 dovecot-uidlist on migration?

That would be one way to do it. But then the conversion must not create
dovecot.index* files or they'll contain different UIDs. And I'd rather
implement it in a generic way that allows migration from any mailbox
format to another, even maildir - mbox.

 What about mbox-dbox migration? Does it preserve UIDs?  

No. dbox was designed so that an existing maildir could be quickly
migrated to dbox. In that case dbox will use the existing maildir files
as they are, only new mails (or modified mails) are really migrated to
the proper dbox format.


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] convert plugin fails - drops root privileges then tries to create file in /

2008-01-17 Thread Charles Marcus

On 1/16/2008, Mikel Ward ([EMAIL PROTECTED]) wrote:

I'm running dovecot-1.0-1.2.rc15.el5 on CentOS 5.


This is old and pre-release... upgrade please...


[Dovecot] convert plugin fails - drops root privileges then tries to create file in /

2008-01-16 Thread Mikel Ward
Hi

I just tried to run the convert plugin as described at
http://wiki.dovecot.org/Plugins/Convert

(except with mail_location = maildir:~/Mail)

It fails with an error message:
Eopen(/.temp.falcon.endbracket.net.18618.8d5e0a038da6cf06) failed:
Permission denied
Error: imap dump-capability process returned 89

It looks like Dovecot execs /usr/libexec/dovecot/imap, which drops root
privileges (probably via get_imap_capability), then
loads /usr/lib/dovecot/imap/lib01_convert_plugin.so, which tries to
create a file in the root directory, which it obviously won't have write
privileges on.

I'm running dovecot-1.0-1.2.rc15.el5 on CentOS 5.

If I change the paths from ~ to /home/%u, I get this error message:
Emkdir_parents(/home/dump-capability/mail) failed: Permission denied
execve(/usr/sbin/dovecot, [/usr/sbin/dovecot], [/* 16 vars */]) = 0
brk(0)  = 0x8d46000
access(/etc/ld.so.preload, R_OK)  = -1 ENOENT (No such file or directory)
open(/etc/ld.so.cache, O_RDONLY)  = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=21917, ...}) = 0
mmap2(NULL, 21917, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f22000
close(3)= 0
open(/lib/libc.so.6, O_RDONLY)= 3
read(3, 
\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\_\227\0004\0\0\0..., 512) = 
512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1589908, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xb7f21000
mmap2(0x96, 1308068, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) 
= 0x96
mmap2(0xa9a000, 12288, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13a) = 0xa9a000
mmap2(0xa9d000, 9636, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xa9d000
close(3)= 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xb7f2
set_thread_area({entry_number:-1 - 6, base_addr:0xb7f206c0, limit:1048575, 
seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, 
useable:1}) = 0
mprotect(0xa9a000, 8192, PROT_READ) = 0
mprotect(0x95c000, 4096, PROT_READ) = 0
munmap(0xb7f22000, 21917)   = 0
time(NULL)  = 1200536192
brk(0)  = 0x8d46000
brk(0x8d6f000)  = 0x8d6f000
uname({sys=Linux, node=falcon.endbracket.net, ...}) = 0
getpid()= 13747
geteuid32() = 0
open(/etc/dovecot.conf, O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=665, ...}) = 0
pread64(3, ## Dovecot 1.0 configuration fil..., 2048, 0) = 665
pread64(3, , 1383, 665)   = 0
close(3)= 0
socket(PF_FILE, SOCK_STREAM, 0) = 3
fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
connect(3, {sa_family=AF_FILE, path=/var/run/nscd/socket}, 110) = -1 ENOENT 
(No such file or directory)
close(3)= 0
socket(PF_FILE, SOCK_STREAM, 0) = 3
fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
connect(3, {sa_family=AF_FILE, path=/var/run/nscd/socket}, 110) = -1 ENOENT 
(No such file or directory)
close(3)= 0
open(/etc/nsswitch.conf, O_RDONLY)= 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1696, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xb7f27000
read(3, #\n# /etc/nsswitch.conf\n#\n# An ex..., 4096) = 1696
read(3, , 4096)   = 0
close(3)= 0
munmap(0xb7f27000, 4096)= 0
open(/etc/ld.so.cache, O_RDONLY)  = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=21917, ...}) = 0
mmap2(NULL, 21917, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f22000
close(3)= 0
open(/lib/libnss_files.so.2, O_RDONLY) = 3
read(3, 
\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\30\0\0004\0\0\0..., 512) 
= 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=46680, ...}) = 0
mmap2(NULL, 41616, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0x8c2000
mmap2(0x8cb000, 8192, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8) = 0x8cb000
close(3)= 0
mprotect(0x8cb000, 4096, PROT_READ) = 0
munmap(0xb7f22000, 21917)   = 0
open(/etc/passwd, O_RDONLY)   = 3
fcntl64(3, F_GETFD) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=1759, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xb7f27000
read(3, root:x:0:0:root:/root:/bin/bash\n..., 4096) = 1759
close(3)= 0
munmap(0xb7f27000, 4096)= 0
access(/usr/libexec/dovecot/imap, X_OK) = 0
access(/etc/dovecot/ssl/mail.endbracket.net.crt, R_OK) = 0

[Dovecot] convert plugin

2007-11-21 Thread maximatt
hi

i have problems with convert plugin, because he delete the message maildir
inbox (i dont know this is't right)...
i set dovecot (Dovecot v1.0.7) to listen with pop and imap protocols...

for example if user1 sends to user2 a msg via pop3 or imap, i can see
the msg in user2 imap account, but when i read messages from user2 pop
account, i see the message, but the message was deleted from imap
account   ¿:(?

these are my settings about this issue:

mail_location: maildir:/export/home/vmail/prueba/%n
mail_plugins(imap): quota imap_quota convert
mail_plugins(pop3): quota convert

pop3_uidl_format(default):
pop3_uidl_format(imap):
pop3_uidl_format(pop3): %u

plugin:
  quota: maildir
  convert_mail: mbox:~/mail:INBOX=/export/home/vmail/prueba/%u


maybe i not understand yet wich if this plugin do :(

thanks!!! :)


[Dovecot] convert plugin: endless conversion and duplicate messages

2007-07-03 Thread Andrew Ziem

Hi,

When an mbox has a filename with a period, the Dovecot 1.0.1 convert 
plugin will endlessly convert the same mbox causing duplicate messages.  
To reproduce, create try converting two mboxes: one with a valid name 
and another with an invalid name.  Then, repeat the login procedure a 
few times.


Dovecot should do something more graceful such as replacing periods with 
another character.


Here's /var/log/mail/errors
Jul  2 08:29:44 aslan dovecot: IMAP(crystalp): Mailbox conversion: 
Couldn't create mailbox Print Shop Misc.: Invalid mailbox name
Jul  2 08:39:46 aslan dovecot: IMAP(crystalp): Mailbox conversion: 
Couldn't create mailbox Print Shop Misc.: Invalid mailbox name
Jul  2 08:48:54 aslan dovecot: IMAP(crystalp): Mailbox conversion: 
Couldn't create mailbox Print Shop Misc.: Invalid mailbox name
Jul  2 08:48:58 aslan dovecot: IMAP(crystalp): Mailbox conversion: 
Couldn't create mailbox Print Shop Misc.: Invalid mailbox name
Jul  2 08:49:39 aslan dovecot: IMAP(crystalp): Mailbox conversion: 
Couldn't create mailbox Print Shop Misc.: Invalid mailbox name
Jul  2 08:59:40 aslan dovecot: IMAP(crystalp): Mailbox conversion: 
Couldn't create mailbox Print Shop Misc.: Invalid mailbox name
Jul  2 09:09:40 aslan dovecot: IMAP(crystalp): Mailbox conversion: 
Couldn't create mailbox Print Shop Misc.: Invalid mailbox name
Jul  2 09:20:23 aslan dovecot: IMAP(crystalp): Mailbox conversion: 
Couldn't create mailbox Print Shop Misc.: Invalid mailbox name


I didn't test other non-{alphanumeric,whitespace} characters.

Other than this and my previous e-mails, our conversion from UW-IMAP 
mboxes went nicely.  I notice the performance difference, and our users 
will be happy to finally have proper subfolders.



Andrew


[Dovecot] convert plugin problem from UW-IMAP

2007-06-28 Thread Andrew Z

Though there are conversion scripts, I'd like to give the convert
plugin a chance.  I have Dovecot 1.0.1 on Trustix Secure Linux 2.2
(Linux 2.4.27), and we had UW IMAP 2002e.   Dovecot seems to work OK
(e.g. I can add copy messages to it), but things break when I activate
the convert plugin.

The Wiki suggests
 convert_mail = mbox:~/:INBOX=/var/mail/%u  # --- locally changed to
/var/spool/mail/%u
 convert_skip_broken_mailboxes=yes

However, when I start Dovecot, then I get:
 Starting Dovecot Imap: ILoading modules from directory: /usr/lib/dovecot/imap
 IModule loaded: /usr/lib/dovecot/imap/lib20_convert_plugin.so
 IEffective uid=65534, gid=65534, home=
 Imbox: data=~/:INBOX=/var/spool/mail/dump-capability
 Imbox: root=, index=, inbox=/var/spool/mail/dump-capability
 Eopen(/.temp.localhost.localdomain.7834.96dd6ef6b7dfc402) failed:
Permission denied
 Error: imap dump-capability process returned 89
 Fatal: Invalid configuration in /etc/dovecot.conf

So based on a tip on the mailing list, I try
 convert_mail = mbox:/home/users/%u:INBOX=/var/spool/mail/%u

But the session fails, and Thunderbird can't connect properly.

/var/log/dovecot.log
Jun 26 11:39:25 Info: IMAP(andrewz): Module loaded:
/usr/lib/dovecot/imap/lib20_convert_plugin.so
Jun 26 11:39:25 Info: IMAP(andrewz): Effective uid=501, gid=501,
home=/home/users/andrewz
Jun 26 11:39:25 Info: IMAP(andrewz): mbox:
data=/home/users/andrewz:INBOX=/var/spool/mail/andrewz
Jun 26 11:39:25 Info: IMAP(andrewz): mbox: root=/home/users/andrewz,
index=/home/users/andrewz, inbox=/var/spool/mail/andrewz
Jun 26 11:39:25 Info: IMAP(andrewz): mbox:
data=/home/users/andrewz:INBOX=/var/spool/mail/andrewz
Jun 26 11:39:25 Info: IMAP(andrewz): mbox: root=/home/users/andrewz,
index=/home/users/andrewz, inbox=/var/spool/mail/andrewz
Jun 26 11:39:25 Info: IMAP(andrewz): maildir: data=/home/users/andrewz/Maildir
Jun 26 11:39:25 Info: IMAP(andrewz): maildir:
root=/home/users/andrewz/Maildir, index=/home/users/andrewz/Maildir,
control=, inbox=
Jun 26 11:39:25 Info: imap-login: Login: user=andrewz,
method=PLAIN, rip=192.168.0.230, lip=192.168.0.60

/var/log/mail/errors
Jun 26 11:39:25 localhost dovecot: IMAP(andrewz): Mailbox conversion:
Couldn't copy mailbox
Maildir/cur/1182879232.P7263Q0M965055.localhost.localdomain:2,Sa: BUG:
Unknown internal error
Jun 26 11:39:25 localhost dovecot: IMAP(andrewz): Mailbox conversion:
Couldn't create mailbox directory Maildir..Trash
Jun 26 11:39:25 localhost dovecot: IMAP(andrewz): Sending log
messages too fast, throttling..
Jun 26 11:39:25 localhost dovecot: child 7888 (imap) returned error 89

I also tried convert_mail = mbox:%h:INBOX=/var/spool/mail/%u , but
that acts like mbox:/home/users/%u.

Then, I tried removing ~/Maildir .  That doesn't help.

When I connect via telnet, I get 1 OK Logged in., and the remote
host closes the connection.

Also, I am not clear how Dovecot knows when to stop.  With mbox in
~/mail, then dovecot can rename it, but we have mbox in ~/ which of
course cannot be renamed.  (I suggest moving mboxes to a new
subdirectory.)

I rebuild Dovecot based from a modified Fedora RPM .spec.  My configuration is:
# 1.0.1: /etc/dovecot.conf
info_log_path: /var/log/dovecot.log
protocols: imap
ssl_disable: yes
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable: /usr/libexec/dovecot/imap-login
mail_location: maildir:~/Maildir
mail_debug: yes
mail_plugins: convert
auth default:
 passdb:
   driver: pam
 userdb:
   driver: passwd
plugin:
 convert_mail: mbox:/home/users/%u:INBOX=/var/spool/mail/%u
 convert_skip_broken_mailboxes: yes


Andrew


Re: [Dovecot] CONVERT Plugin

2007-05-16 Thread Timo Sirainen
On Wed, 2007-05-16 at 19:16 -0400, Bruce Bodger wrote:
 convert_mail = mbox:~/Library/Mail/IMAP/:INBOX=/var/mail/%u and  
 mail_location = maildir:~/Maildir
 
 The IMAP directory was renamed to IMAP-converted after the process  
 but the inbox (in /var/mail) does not get renamed.  

It's not supposed to be renamed. The most important reason why the
renaming is done at all is so that convert plugin doesn't try to convert
the same mailboxes twice. It's enough to rename the mbox root directory
for that. I think renaming INBOX could just cause problems.

 The WIKI sounds like it should be renamed to something, too.

Any suggestions how to change it so it doesn't sound like that? I
thought it was pretty clear. :)



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] CONVERT Plugin

2007-05-16 Thread Bruce Bodger


On May 16, 2007, at 7:21 PM, Timo Sirainen wrote:


It's not supposed to be renamed. The most important reason why the
renaming is done at all is so that convert plugin doesn't try to  
convert
the same mailboxes twice. It's enough to rename the mbox root  
directory

for that. I think renaming INBOX could just cause problems.


The WIKI sounds like it should be renamed to something, too.


Any suggestions how to change it so it doesn't sound like that? I
thought it was pretty clear. :)


Perhaps change this:

Once everything is finished, ~/mail is renamed to ~/mail-converted  
and at next login the conversion isn't done, because the ~/mail  
directory no longer exists.


to this:

Once everything is finished effected directories are renamed: ~/mail  
is renamed to ~/mail-converted, etc. and at next login the conversion  
isn't performed because the ~/mail directory no longer exists. Mail  
files, such as the INBOX (~/var/mail/$USERNAME) are not renamed.


??





Re: [Dovecot] Convert plugin mbox to maildir has no effect

2007-04-12 Thread Frank Elsner
On Wed, 11 Apr 2007 23:10:53 +0200 guenther wrote:
 On Wed, 2007-04-11 at 08:57 +0200, Frank Elsner wrote:
  On Tue, 10 Apr 2007 17:58:03 +0200 guenther wrote:
   On Tue, 2007-04-10 at 17:06 +0300, Timo Sirainen wrote:
On Sun, 2007-04-08 at 23:26 +0200, Frank Elsner wrote:
 
 Apr  8 23:13:36 seymour dovecot: IMAP(migrant): Mailbox conversion: 
 Couldn't create mailbox directory .gnome2_private

Maildir uses . as hierarchy separator, so this filename is invalid.
I'm not sure if convert_skip_broken_mailboxes=yes should just cause
these to be ignored, but for now it doesn't..
   
   Just spotted the above error message (deleted previous posts already),
   and it strikes me as seriously odd.
   
   Dots in mbox file names are usually embedded (as in dovecot.org),
   where it makes sense, as opposed to beginning with a dot. Even worse,
   this particular name is kind of weird for a mail folder...
   
   However, this name is well known to me:
   
 [EMAIL PROTECTED] ~]$ ls -ld .gnome2_private
 drwx--  2 guenther users 4096 Jul 21  2005 .gnome2_private/
  
  Me Too :-)
 
 Hmm, so one of your users really got a mail folder named gnome2_private?
 Odd...

No, of course. It's one of the dot files, which nearly each application creates.

 Anyway, another idea hit me -- is this really an invalid name, as Timo
 said? I don't know the convert plugin and what it logs, and I don't know
 the exact details of Maildir either. However, creating a mail folder
 named gnome2_private in your MUA will result in a dir by that name
 with a leading dot. Just like the name in the error message, no?

Valid name or not, that's not the primary question.

What abot the idea to ignore directories and check the contents of files
for beeing am mail folder? If yes, then comes the question about the name.
 
   I'd check where the Maildir data actually is being created and what
   files are being attempted to convert. Almost looks like the Maildir dirs
   are being created in the users $HOME...
  
  No, dovecot.conf contains
 
 I did not want you to paste the settings again, but to check if the
 Maildir files are being created where you expect them. Grepping or
 changing conf files doesn't mean anything, if the running process
 doesn't use this particular version. ;)

The Maildir directory was created, but no folder converted.
BTW: Thanks for explaining trivia. :-)


--Frank Elsner
 
   guenther
 
 
 -- 
 char *t=[EMAIL PROTECTED];
 main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;il;i++){ i%8? c=1:
 (c=*++x); c128  (s+=h); if (!(h=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}
 
 



[Dovecot] convert plugin created maildirfolder file in root maildir directory

2007-04-12 Thread Justin McAleer
I've noticed that if a user's maildir gets created by deliver or 
pop/imap without the convert plugin running, the maildir structure is 
fine (no maildirfolder file). But, if a user gets converted, there is a 
maildirfolder file in the user's base maildir directory. As far as I can 
tell, that doesn't cause any problems, but I just wanted to mention it. 
I've looked at the code for a while but didn't find why it behaves 
differently.


Re: [Dovecot] convert plugin created maildirfolder file in root maildir directory

2007-04-12 Thread Timo Sirainen
On Thu, 2007-04-12 at 12:33 -0400, Justin McAleer wrote:
 I've noticed that if a user's maildir gets created by deliver or 
 pop/imap without the convert plugin running, the maildir structure is 
 fine (no maildirfolder file). But, if a user gets converted, there is a 
 maildirfolder file in the user's base maildir directory. As far as I can 
 tell, that doesn't cause any problems, but I just wanted to mention it. 
 I've looked at the code for a while but didn't find why it behaves 
 differently.

Dovecot doesn't care about maildirfolder file, but if you use a MDA that
updates Maildir++ quota you could have problems.

Fixed: http://dovecot.org/list/dovecot-cvs/2007-April/008659.html


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Convert plugin mbox to maildir has no effect

2007-04-11 Thread guenther
On Wed, 2007-04-11 at 08:57 +0200, Frank Elsner wrote:
 On Tue, 10 Apr 2007 17:58:03 +0200 guenther wrote:
  On Tue, 2007-04-10 at 17:06 +0300, Timo Sirainen wrote:
   On Sun, 2007-04-08 at 23:26 +0200, Frank Elsner wrote:

Apr  8 23:13:36 seymour dovecot: IMAP(migrant): Mailbox conversion: 
Couldn't create mailbox directory .gnome2_private
   
   Maildir uses . as hierarchy separator, so this filename is invalid.
   I'm not sure if convert_skip_broken_mailboxes=yes should just cause
   these to be ignored, but for now it doesn't..
  
  Just spotted the above error message (deleted previous posts already),
  and it strikes me as seriously odd.
  
  Dots in mbox file names are usually embedded (as in dovecot.org),
  where it makes sense, as opposed to beginning with a dot. Even worse,
  this particular name is kind of weird for a mail folder...
  
  However, this name is well known to me:
  
[EMAIL PROTECTED] ~]$ ls -ld .gnome2_private
drwx--  2 guenther users 4096 Jul 21  2005 .gnome2_private/
 
 Me Too :-)

Hmm, so one of your users really got a mail folder named gnome2_private?
Odd...

Anyway, another idea hit me -- is this really an invalid name, as Timo
said? I don't know the convert plugin and what it logs, and I don't know
the exact details of Maildir either. However, creating a mail folder
named gnome2_private in your MUA will result in a dir by that name
with a leading dot. Just like the name in the error message, no?


  I'd check where the Maildir data actually is being created and what
  files are being attempted to convert. Almost looks like the Maildir dirs
  are being created in the users $HOME...
 
 No, dovecot.conf contains

I did not want you to paste the settings again, but to check if the
Maildir files are being created where you expect them. Grepping or
changing conf files doesn't mean anything, if the running process
doesn't use this particular version. ;)

  guenther


-- 
char *t=[EMAIL PROTECTED];
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;il;i++){ i%8? c=1:
(c=*++x); c128  (s+=h); if (!(h=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}



Re: [Dovecot] Convert plugin mbox to maildir has no effect

2007-04-10 Thread Timo Sirainen
On Sun, 2007-04-08 at 23:26 +0200, Frank Elsner wrote:
 Apr  8 23:13:36 seymour dovecot: IMAP(migrant): Mailbox conversion: Couldn't 
 create mailbox directory .gnome2_private

Maildir uses . as hierarchy separator, so this filename is invalid.
I'm not sure if convert_skip_broken_mailboxes=yes should just cause
these to be ignored, but for now it doesn't..


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Convert plugin mbox to maildir has no effect

2007-04-10 Thread Frank Elsner
On Tue, 10 Apr 2007 17:06:02 +0300 Timo Sirainen wrote:
 On Sun, 2007-04-08 at 23:26 +0200, Frank Elsner wrote:
  Apr  8 23:13:36 seymour dovecot: IMAP(migrant): Mailbox conversion: 
  Couldn't create mailbox directory .gnome2_private
 
 Maildir uses . as hierarchy separator, so this filename is invalid.
 I'm not sure if convert_skip_broken_mailboxes=yes should just cause
 these to be ignored, but for now it doesn't..

Could this behaviour be changed?

I guess it's not a rare case for installations with UW-IMAP and
would make the switch to dovecot much more attractive :-)


Regards, Frank Elsner 



Re: [Dovecot] Convert plugin mbox to maildir has no effect

2007-04-10 Thread Frank Elsner
On Tue, 10 Apr 2007 17:39:14 +0300 Timo Sirainen wrote:
 On Tue, 2007-04-10 at 16:15 +0200, Frank Elsner wrote:
  On Tue, 10 Apr 2007 17:06:02 +0300 Timo Sirainen wrote:
   On Sun, 2007-04-08 at 23:26 +0200, Frank Elsner wrote:
Apr  8 23:13:36 seymour dovecot: IMAP(migrant): Mailbox conversion: 
Couldn't create mailbox directory .gnome2_private
   
   Maildir uses . as hierarchy separator, so this filename is invalid.
   I'm not sure if convert_skip_broken_mailboxes=yes should just cause
   these to be ignored, but for now it doesn't..
  
  Could this behaviour be changed?
 
 Won't do anything to v1.0. Maybe for v1.0.1. Anyway already implemented
 to CVS HEAD (which will become v1.1):

Thanks. I'll give it a try.

  [ ... ]

  | plugin {
  |   convert_mail = mbox:~/:INBOX=/var/mail/%u
  |   convert_skip_broken_mailboxes=yes
  
  
  Currently this doesn't work :-(
 
 You mean it doesn't work because you have these dot-directories? It
 would work if you didn't have them..

Tell this to the .gnome* and similiar people :-)


--Frank



Re: [Dovecot] Convert plugin mbox to maildir has no effect

2007-04-10 Thread guenther
On Tue, 2007-04-10 at 17:06 +0300, Timo Sirainen wrote:
 On Sun, 2007-04-08 at 23:26 +0200, Frank Elsner wrote:
  Apr  8 23:13:36 seymour dovecot: IMAP(migrant): Mailbox conversion: 
  Couldn't create mailbox directory .gnome2_private
 
 Maildir uses . as hierarchy separator, so this filename is invalid.
 I'm not sure if convert_skip_broken_mailboxes=yes should just cause
 these to be ignored, but for now it doesn't..

Just spotted the above error message (deleted previous posts already),
and it strikes me as seriously odd.

Dots in mbox file names are usually embedded (as in dovecot.org),
where it makes sense, as opposed to beginning with a dot. Even worse,
this particular name is kind of weird for a mail folder...

However, this name is well known to me:

  [EMAIL PROTECTED] ~]$ ls -ld .gnome2_private
  drwx--  2 guenther users 4096 Jul 21  2005 .gnome2_private/

I'd check where the Maildir data actually is being created and what
files are being attempted to convert. Almost looks like the Maildir dirs
are being created in the users $HOME...

  guenther


-- 
char *t=[EMAIL PROTECTED];
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;il;i++){ i%8? c=1:
(c=*++x); c128  (s+=h); if (!(h=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}



Re: [Dovecot] Convert plugin mbox to maildir has no effect

2007-04-08 Thread Frank Elsner
On Fri, 09 Mar 2007 15:58:59 +0200 Timo Sirainen wrote:
 On Fri, 2007-03-09 at 14:54 +0100, Sylvain Nemtua wrote:
  convert_mail: mbox:/var/mail:INBOX=/var/mail/%u
 
 This is most likely wrong. You're telling Dovecot that the user's
 non-INBOX mailboxes are in /var/mail. If you have only inboxes, set
 rather something like mbox:/some/empty/dir:INBOX=/var/mail/%
 u:INDEX=MEMORY
 
 Hmm. Since this seems to be so common problem, maybe I should make
 mbox::INBOX=/var/mail/%u work too..
 
  Any thoughts ? Is there a particular settings to use ? Anything wrong
  with my setup ?
 
 The real problem is that you didn't tell Dovecot to load the convert
 plugin:
 
 mail_plugins = convert

I have a similiar problem with dovecot 1.0.rc31.
Please note that /usr/dovecot is a link to /usr/local/dovecot on my system.


 /usr/dovecot/sbin/dovecot -n
# /usr/local/dovecot/etc/dovecot.conf
base_dir: /var/run/dovecot/
protocols: imap
listen: *:10143
ssl_disable: yes
disable_plaintext_auth: no
login_dir: /var/run/dovecot//login
login_executable: /usr/dovecot/libexec/dovecot/imap-login
login_log_format_elements: USER=%u IP=%r
verbose_proctitle: yes
first_valid_uid: 100
last_valid_gid: 65534
mail_location: maildir:/home/%u/MailDir
maildir_copy_with_hardlinks: yes
maildir_copy_preserve_filename: yes
mail_executable: /usr/dovecot/libexec/dovecot/imap
mail_plugins: convert
mail_plugin_dir: /usr/dovecot/lib/dovecot/imap
imap_client_workarounds: netscape-eoh tb-extra-mailbox-sep
auth default:
  verbose: yes
  passdb:
driver: pam
args: dovecot
  userdb:
driver: passwd
plugin:
  convert_mail: mbox:~/:INBOX=/var/spool/mail/%u
  convert_skip_broken_mailboxes: no

But this setup gives 

 service dovecot start
Starting IMAP-Service (dovecot 1.0.rc31)Eopen(/.temp.seymour.elsner.lan.5894.59e
ab08fc33e142b) failed: Permission denied
Error: imap dump-capability process returned 89
   [FAILED]

Any pointer to overcome this problem welcome.


Regards__ 
Frank Elsner  /c/o  Technische Universitaet Berlin   |
 /  tubIT [BD], Sekr. E-N 50 |
|   Einsteinufer 17  |
| Phone: +49 30 314 23897   D-10587 Berlin   |
| eMail: [EMAIL PROTECTED]  Germany__|
|_| in dubio pro exim   



Re: [Dovecot] Convert plugin mbox to maildir has no effect

2007-04-08 Thread Frank Elsner

Sorry to answer my own question.

On Sun, 8 Apr 2007 22:36:05 +0200 Frank Elsner wrote:

  [ ... ]

 plugin:
   convert_mail: mbox:~/:INBOX=/var/spool/mail/%u
   convert_skip_broken_mailboxes: no

After changing this to

convert_mail = mbox:/home/%u:INBOX=/var/spool/mail/%u

 Because currently UW-IMAP is in use

convert_skip_broken_mailboxes = yes
 
  ...

  service dovecot start
 Starting IMAP-Service (dovecot 
 1.0.rc31)Eopen(/.temp.seymour.elsner.lan.5894.59e
 ab08fc33e142b) failed: Permission denied
 Error: imap dump-capability process returned 89
[FAILED]#

The above error disappeared and now the log shows:

Apr  8 23:13:36 seymour dovecot: imap-login: Login: USER=migrant, 
[192.168.28.53]
Apr  8 23:13:36 seymour dovecot: IMAP(migrant): Loading modules from directory: 
/usr/dovecot/lib/dovecot/imap
Apr  8 23:13:36 seymour dovecot: IMAP(migrant): Module loaded: 
/usr/dovecot/lib/dovecot/imap/lib20_convert_plugin.so
Apr  8 23:13:36 seymour dovecot: IMAP(migrant): Effective uid=1988, gid=100, 
home=/home/migrant
Apr  8 23:13:36 seymour dovecot: IMAP(migrant): mbox: 
data=/home/migrant:INBOX=/var/spool/mail/migrant
Apr  8 23:13:36 seymour dovecot: IMAP(migrant): mbox: root=/home/migrant, 
index=/home/migrant, inbox=/var/spool/mail/migrant
Apr  8 23:13:36 seymour dovecot: IMAP(migrant): mbox: 
data=/home/migrant:INBOX=/var/spool/mail/migrant
Apr  8 23:13:36 seymour dovecot: IMAP(migrant): mbox: root=/home/migrant, 
index=/home/migrant, inbox=/var/spool/mail/migrant
Apr  8 23:13:36 seymour dovecot: IMAP(migrant): maildir: 
data=/home/migrant/MailDir
Apr  8 23:13:36 seymour dovecot: IMAP(migrant): maildir: 
root=/home/migrant/MailDir, index=/home/migrant/MailDir, control=, inbox=
Apr  8 23:13:36 seymour dovecot: IMAP(migrant): Mailbox conversion: Couldn't 
create mailbox directory .gnome2_private
Apr  8 23:13:36 seymour dovecot: child 9905 (imap) returned error 89


--Frank Elsner



[Dovecot] convert plugin failing

2007-03-31 Thread Adrian Bridgett
I'm struggling to get the convert plugin working using the Debian etch
packages.  When starting dovecot it was trying to create files in
/.temp.hostname...  convert-plugin.c looks like it has a couple of
typos in it - it checks mail three times for NULL rather than mail,
user, home.

I changed this but it's getting called when these three items are set
to:
maildir:/HOME_DIRECTORY_USED_BUT_NOT_GIVEN_BY_USERDB/Maildir
dump-capability


I must be missing something - shouldn't the mailboxes only be
converted when a user logs in?

Should the conversion be skipped for the dump-capability user
(whatever that is!)

Thanks,

Adrian 
-- 
Adrian Bridgett - [EMAIL PROTECTED]
GPG key available on public key servers


Re: [Dovecot] convert plugin failing

2007-03-31 Thread Timo Sirainen
On Sat, 2007-03-31 at 13:27 +0100, Adrian Bridgett wrote:

 I'm struggling to get the convert plugin working using the Debian etch
 packages.

Does that mean v1.0.rc15? Convert plugin was pretty broken before rc28.



signature.asc
Description: This is a digitally signed message part