Re: [Dovecot] imap dumps core when connecting with mutt

2012-12-19 Thread Arthur Titeica
Hello,

Thanks for the reply.

On Tuesday 18 December 2012 21:39:57 Timo Sirainen wrote:
> On Sun, 2012-12-09 at 19:03 +0200, Arthur Titeica wrote:
> > Hello,
> > 
> > I'm trying to investigate a problem with dovecot/imap dumping core when
> > connecting connecting mith mutt (everything else works).
> > 
> >   imap(user@domain): Fatal: master: service(imap): child 31752 killed with
> >   signal 11 (core dumped)
> > 
> > I managed to create a core file and passed that to gdb. The log is here
> > [1].
> > 
> > I hope this helps - please tell me what else would be needed if not.
> 
> First of all doveconf -n output would be helpful. 

Here is the config: http://paste.kde.org/628478/83892135/raw/

> The gdb backtrace would have been also a bit more useful with debug symbols.

I see no debug option in ./configure --help. Would it be enough not to strip 
the binaries after the build?

-- 
Arthur Titeica


[Dovecot] Director and forwarding LDAP user as Master user

2012-12-19 Thread Alexandr Sabitov
Hello guys,

Would you be able to help me with this little issue. I bet someone has the same 
config so if you can copy-paste it I will very appreciate it.
So main idea is to enable Dovecot director to authenticate a LDAP user with 
plain or encrypted password and  send the user  to back-end Dovecot server 
after the authentication.
According to Wiki it is only possible if we use the master user to communicate 
to the back-end server.

On the back-end Dovecot server it is working fine, I can log in as normal 
user/user_password or as user*masteruser/master_password. The back-end config 
is:

auth_master_user_separator = *
passdb {
  driver = passwd-file
  args = /usr/local/dovecot/etc/dovecot/passwd.masterusers
  master = yes
  pass = yes
}

passdb {
  driver = ldap
  args = /usr/local/dovecot/etc/dovecot/dovecot-ldap.conf.ext
}

userdb {
  driver = ldap
  args = /usr/local/dovecot/etc/dovecot/dovecot-ldap.conf.ext
}

Now  front-end:  how to get director forward the user to the back-end after 
authentication on the director? With my director config the user stays on the 
director all the time:

passdb {
  driver = static
  args = proxy=y master=masteruser pass=master_password destuser=%u*masteruser
}

passdb {
  driver = ldap
  args = /usr/local/dovecot/etc/dovecot/dovecot-ldap.conf.ext
}

userdb {
  driver = ldap
  args = /usr/local/dovecot/etc/dovecot/dovecot-ldap.conf.ext
}

The only way to forward the user is to setup nopassword=y in args of static 
passdb but in that case the user will be authenticated on the backend but not 
on the director...
What do I missing ? Please help me

Best Regards,
Alexandr Sabitov


Re: [Dovecot] dovecot-lda (2.1.12) segfaults

2012-12-19 Thread Joseph Tam


Timo Sirainen writes:

Date: Wed, 19 Dec 2012 12:59:54 +0200

Could you send me those files? Would be the easiest and quickest way to
get it fixed :)


Date: Wed, 19 Dec 2012 15:02:25 +0200

Okay, fixed: http://hg.dovecot.org/dovecot-2.1/rev/32ce915e046a


Yes it is does, and it stops crashing for the other 5 sets of indices.
A 2-hour turnaround, of which an hour was spent packing up the index
files.  Amazing.  Thanks.

Joseph Tam 


Re: [Dovecot] migration to dovecot pop3

2012-12-19 Thread Joseph Tam

Rajesh M writes:


i am planning to migrate from qmail pop3 to dovecot pop3

the number of users on the server is large over 5000
...
also data volume is large - over 3.5 tb -- ie many users several 1000s of
emails in their inbox


If you stay on the list, you might find some people here whose
mail metrics are several orders of magnitude larger than this.


1) will the migration cause all the emails on the server to re-download
...
4) has anybody migrated from qmail pop3 to dovecot pop3 successfully
without emails being downloaded again


A proper migration will avoid this.  Google is your friend

http://lmgtfy.com/q=POP+qmail+to+dovecot+migration

The top hits provide exactly what you're looking for.


2) can dovecot be configured to allow only one download at a time - pop3
locking with time out setting that can be customized

3) can dovecot pop3 be configured so that it will allow download of emails
only of the last say 15 days ie even if the same pop3 user is configure on
another machine it will download only messages of the last 15 days


I can't answer this, but if this is an attempt to prevent mass download,
the answer to 1+4 makes these questions irrelevant.

Joseph Tam 


Re: [Dovecot] setting mail_home and vacation

2012-12-19 Thread Daniel Parthey
Andreas Meyer wrote:
> Ben Morrow  wrote:
> 
> > > > mail_home = /var/spool/vhosts/%d/%n
> > >  
> > > ok, done that. I get this in 
> > > Error: chdir(/var/spool/vhosts/xyz.de/archiv) failed: Not a directory
> > > Error: sieve: failed to stat sieve script:
> > > stat(/var/spool/vhosts/xyz.de/archiv/.dovecot.sieve) failed: Not a
> > > directory
> > > Error: sieve: failed to access user's sieve script ~/.dovecot.sieve
> > > (using default script location instead)
> > > 
> > > I guess, this is just normal for mboxes? arc...@xyz.de is a mbox, per bcc
> > > serviced by postfix.
> > 
> > Where is that user's home directory, then? (Where is its
> > .dovecot.sieve?) That is the path that mail_home should be set to.
> 
> It's /var/spool/vhosts/xyz.de/archiv . It's one file, a mbox. There is no
> .dovecot.sieve. This mbox is flushed various times a day by a MUA.
> This user archiv is a virtual user and has no home directory, just a mbox.

Your mail_home needs to be a directory, not a file.
mbox files should be located inside a subdirectory of your mail_home.

Regards
Daniel
-- 
https://plus.google.com/103021802792276734820


Re: [Dovecot] setting mail_home and vacation

2012-12-19 Thread Ben Morrow
At 12AM +0100 on 20/12/12 you (Andreas Meyer) wrote:
> Ben Morrow  wrote:
> 
> > Where is that user's home directory, then? (Where is its
> > .dovecot.sieve?) That is the path that mail_home should be set to.
> 
> It's /var/spool/vhosts/xyz.de/archiv . It's one file, a mbox. There is no
> .dovecot.sieve. This mbox is flushed various times a day by a MUA.
> This user archiv is a virtual user and has no home directory, just a mbox.

All Dovecot users should have a unique home directory (which needs to be
*a directory*, obviously, and shouldn't be the same as any of the
mailbox locations). See http://wiki2.dovecot.org/VirtualUsers/Home .

Ben



Re: [Dovecot] setting mail_home and vacation

2012-12-19 Thread Andreas Meyer
Ben Morrow  wrote:

> > > mail_home = /var/spool/vhosts/%d/%n
> >  
> > ok, done that. I get this in 
> > Error: chdir(/var/spool/vhosts/xyz.de/archiv) failed: Not a directory
> > Error: sieve: failed to stat sieve script:
> > stat(/var/spool/vhosts/xyz.de/archiv/.dovecot.sieve) failed: Not a
> > directory
> > Error: sieve: failed to access user's sieve script ~/.dovecot.sieve
> > (using default script location instead)
> > 
> > I guess, this is just normal for mboxes? arc...@xyz.de is a mbox, per bcc
> > serviced by postfix.
> 
> Where is that user's home directory, then? (Where is its
> .dovecot.sieve?) That is the path that mail_home should be set to.

It's /var/spool/vhosts/xyz.de/archiv . It's one file, a mbox. There is no
.dovecot.sieve. This mbox is flushed various times a day by a MUA.
This user archiv is a virtual user and has no home directory, just a mbox.

> Ben
 
  Andreas


Re: [Dovecot] setting mail_home and vacation

2012-12-19 Thread Ben Morrow
At 11PM +0100 on 19/12/12 you (Andreas Meyer) wrote:
> Ben Morrow  wrote:
> 
> > > When I set
> > > mail_home = mbox:/var/spool/vhosts/%d/%n:INBOX=/var/spool/vhosts/%d/%n
> > > 
> > > I get this for mboxes in the log: 
> > > Error: user arc...@xyz.de: Relative home directory paths not
> > > supported:
> > > mbox:/var/spool/vhosts/xyz.de/archiv:INBOX=/var/spool/vhosts/xyz.de/archiv
> > 
> > mail_home should be set to the path to a directory, not a mailbox
> > location. You want just
> > 
> > mail_home = /var/spool/vhosts/%d/%n
>  
> ok, done that. I get this in 
> Error: chdir(/var/spool/vhosts/xyz.de/archiv) failed: Not a directory
> Error: sieve: failed to stat sieve script:
> stat(/var/spool/vhosts/xyz.de/archiv/.dovecot.sieve) failed: Not a
> directory
> Error: sieve: failed to access user's sieve script ~/.dovecot.sieve
> (using default script location instead)
> 
> I guess, this is just normal for mboxes? arc...@xyz.de is a mbox, per bcc
> serviced by postfix.

Where is that user's home directory, then? (Where is its
.dovecot.sieve?) That is the path that mail_home should be set to.

Ben



Re: [Dovecot] setting mail_home and vacation

2012-12-19 Thread Andreas Meyer
Ben Morrow  wrote:

> > When I set
> > mail_home = mbox:/var/spool/vhosts/%d/%n:INBOX=/var/spool/vhosts/%d/%n
> > 
> > I get this for mboxes in the log: 
> > Error: user arc...@xyz.de: Relative home directory paths not
> > supported:
> > mbox:/var/spool/vhosts/xyz.de/archiv:INBOX=/var/spool/vhosts/xyz.de/archiv
> 
> mail_home should be set to the path to a directory, not a mailbox
> location. You want just
> 
> mail_home = /var/spool/vhosts/%d/%n
 
ok, done that. I get this in 
Error: chdir(/var/spool/vhosts/xyz.de/archiv) failed: Not a directory
Error: sieve: failed to stat sieve script: 
stat(/var/spool/vhosts/xyz.de/archiv/.dovecot.sieve) failed: Not a directory
Error: sieve: failed to access user's sieve script ~/.dovecot.sieve (using 
default script location instead)

I guess, this is just normal for mboxes? arc...@xyz.de is a mbox, per bcc
serviced by postfix.

> Dovecot is interpreting the initial 'mbox:' part as the start of a
> relative path.

Interessting, thank you!

> 
> Ben

  Andreas


Re: [Dovecot] mail_log_events seem to be broken in HG 2.2

2012-12-19 Thread Thomas Leuxner
Am 18.12.2012 um 21:35 schrieb Timo Sirainen :

> On Sun, 2012-12-16 at 10:17 +0100, Thomas Leuxner wrote:
>> It seems along the way of 2.2alpha1 'mail_log_events' quietly stopped 
>> working. They don't log expunges etc. anymore.
>> 
>> […]
>> mail_log_events = expunge mailbox_delete
> 
> Dunno. Latest hg works with my test:
> 
> mail_plugins = " notify mail_log"
> plugin {
>  mail_log_events = expunge mailbox_delete
>  mail_log_fields = uid box msgid size
> }

Right. Have 'notify' and 'mail_log' been added recently? I wasn't aware they 
are required - nor did I see them in the notes/config skeletons.

Adding both of them seems to have fixed:

Dec 19 22:55:04 spectre dovecot: imap(t...@leuxner.net): expunge: box=Trash, 
uid=47601, 
msgid=<27339106.8748641355654225635.JavaMail.em-build@massmail-sender-eu-1b-i-705e3...,
 size=9111

Regards
Thomas

smime.p7s
Description: S/MIME cryptographic signature


Re: [Dovecot] Maildir hardlinks with sieve

2012-12-19 Thread Timo Sirainen
On 19.12.2012, at 23.16, Benedetto Vassallo  wrote:

 As I had no response, I suppose there is no way to have maildir hardlinks 
 work if I set up sieve.
 Is that correct?
>>> 
>>> Apparently, not at this time. I think it should be fixable, but that will 
>>> require some investigation. I won't have time for this until this weekend.
>> 
>> I gave it a look. Solving this now for v2.1 would require to many changes. 
>> This will have to wait until a later release and I hope this can be solved 
>> from within Dovecot rather than Pigeonhole.
>> 
>> Regards,
>> 
>> Stephan.
> 
> OK, then I'll wait for it.
> Can I have a feedback when it's done so I can install the correct version of 
> dovecot/pigeonhole?
> Thank you all

It's a pretty invasive change. Either it's coming to v2.2.0 or the next 
possibility is v2.3.0.



Re: [Dovecot] Maildir hardlinks with sieve

2012-12-19 Thread Benedetto Vassallo


Stephan Bosch  ha scritto:


On 12/11/2012 11:42 PM, Stephan Bosch wrote:

On 12/9/2012 10:12 PM, Benedetto Vassallo wrote:


Def. Quota Benedetto Vassallo :

Hi all,
As I had no response, I suppose there is no way to have maildir  
hardlinks work if I set up sieve.

Is that correct?


Apparently, not at this time. I think it should be fixable, but  
that will require some investigation. I won't have time for this  
until this weekend.


I gave it a look. Solving this now for v2.1 would require to many  
changes. This will have to wait until a later release and I hope  
this can be solved from within Dovecot rather than Pigeonhole.


Regards,

Stephan.


OK, then I'll wait for it.
Can I have a feedback when it's done so I can install the correct  
version of dovecot/pigeonhole?

Thank you all

--
Benedetto Vassallo
Sistema Informativo di Ateneo
Settore Gestione Reti Hardware e Software
U.O.B. Sviluppo e manutenzione dei sistemi
Università degli studi di Palermo

Phone: +3909123860056
Fax: +390916529124




Re: [Dovecot] setting mail_home and vacation

2012-12-19 Thread Ben Morrow
At  8PM +0100 on 19/12/12 you (Andreas Meyer) wrote:
> 
> I set up vacation with sieve. We have mboxes and maildirs and in dovecot.conf
> mail_location =
> mbox:/var/spool/vhosts/%d/dovecotprivate/%n:INBOX=/var/spool/vhosts/%d/%n
> 
> Error: User arc...@xyz.de doesn't have home dir set, disabling
> duplicate database
> Dec 19 20:37:03 lda(arc...@xyz.de): Error: sieve: sieve script file
> path ~/.dovecot.sieve is relative to home directory, but home
> directory is not available.
> Dec 19 20:37:03 lda(arc...@xyz.de): Error: sieve: failed to access
> user's sieve script ~/.dovecot.sieve (using default script location
> instead)
> 
> When I set
> mail_home = mbox:/var/spool/vhosts/%d/%n:INBOX=/var/spool/vhosts/%d/%n
> 
> I get this for mboxes in the log: 
> Error: user arc...@xyz.de: Relative home directory paths not
> supported:
> mbox:/var/spool/vhosts/xyz.de/archiv:INBOX=/var/spool/vhosts/xyz.de/archiv

mail_home should be set to the path to a directory, not a mailbox
location. You want just

mail_home = /var/spool/vhosts/%d/%n

Dovecot is interpreting the initial 'mbox:' part as the start of a
relative path.

Ben



Re: [Dovecot] Maildir hardlinks with sieve

2012-12-19 Thread Stephan Bosch

On 12/11/2012 11:42 PM, Stephan Bosch wrote:

On 12/9/2012 10:12 PM, Benedetto Vassallo wrote:


Def. Quota Benedetto Vassallo :

Hi all,
As I had no response, I suppose there is no way to have maildir 
hardlinks work if I set up sieve.

Is that correct?


Apparently, not at this time. I think it should be fixable, but that 
will require some investigation. I won't have time for this until this 
weekend.


I gave it a look. Solving this now for v2.1 would require to many 
changes. This will have to wait until a later release and I hope this 
can be solved from within Dovecot rather than Pigeonhole.


Regards,

Stephan.


[Dovecot] setting mail_home and vacation

2012-12-19 Thread Andreas Meyer
Hello!

dovecot version 2.1.7

I set up vacation with sieve. We have mboxes and maildirs and in dovecot.conf
mail_location = 
mbox:/var/spool/vhosts/%d/dovecotprivate/%n:INBOX=/var/spool/vhosts/%d/%n

Error: User arc...@xyz.de doesn't have home dir set, disabling duplicate 
database
Dec 19 20:37:03 lda(arc...@xyz.de): Error: sieve: sieve script file path 
~/.dovecot.sieve is relative to home directory, but home directory is not 
available.
Dec 19 20:37:03 lda(arc...@xyz.de): Error: sieve: failed to access user's sieve 
script ~/.dovecot.sieve (using default script location instead)

When I set
mail_home = mbox:/var/spool/vhosts/%d/%n:INBOX=/var/spool/vhosts/%d/%n

I get this for mboxes in the log: 
Error: user arc...@xyz.de: Relative home directory paths not supported: 
mbox:/var/spool/vhosts/xyz.de/archiv:INBOX=/var/spool/vhosts/xyz.de/archiv

The .dovecot.sieve script of the user seems to be found, a vacation response is 
sent
and the email is stored mail into mailbox 'INBOX'

What is wrong?

  Andreas


Re: [Dovecot] namespace subscription problem

2012-12-19 Thread Holger Hegmanns
> On Fri, 2012-12-07 at 04:17 +0100, Holger Hegmanns wrote:
>> Hi all,
>>
>> my problem seems to be a cosmetic one (again).
>>
>> According to the docs:
>>
>> subscriptions: "yes" (default) if this namespace should handle its own
>> subscriptions. If "no", then the first parent namespace with
>> subscriptions=yes will handle it.
>>
>> Therefore is no way to create the following scenario:
>>
>> three namespaces (private, shared, public)
>> the private namespace has to handle its own subscriptions
>> the private namespace setup with "prefix = INBOX."
>> the both shared and public namespace setup with "subscriptions = no"
>>
>> cause there is no so called "parent" namespace. Private namespace setup
>> with "prefix = " works fine, but that's not what I want.
> 
> First create all the namespaces you want and set subscriptions=no for
> all of them. Then create a new prefix="" namespace, and set it
> subscriptions=yes list=no hidden=yes.
Great! It works like a charm!

H.e


[Dovecot] migration to dovecot pop3

2012-12-19 Thread Rajesh M
hi

i am planning to migrate from qmail pop3 to dovecot pop3

the number of users on the server is large over 5000

also data volume is large - over 3.5 tb -- ie many users several 1000s of
emails in their inbox

email clients used are outlook / outlook express / windows mail, etc

my questions

1) will the migration cause all the emails on the server to re-download

2) can dovecot be configured to allow only one download at a time - pop3
locking with time out setting that can be customized

3) can dovecot pop3 be configured so that it will allow download of emails
only of the last say 15 days ie even if the same pop3 user is configure on
another machine it will download only messages of the last 15 days

4) has anybody migrated from qmail pop3 to dovecot pop3 successfully
without emails being downloaded again

thankyou very much in advance

rajesh






Re: [Dovecot] environment variables not set

2012-12-19 Thread Nikolai Tsvetkov
Thank you! I tried, but only with first line and it didn't work. Now
everything is fine.

Here is a snippet if anyone gets in trouble like me:

.
service imap {
executable = imap relayctl
}
service relayctl {
  executable = script-login /usr/local/bin/envdir /etc/relay-ctrl
/usr/local/bin/relay-ctrl-chdir /usr/local/bin/dovecot-settcpremoteip
/usr/local/bin/relay-ctrl-allow
  user = $default_internal_user
  unix_listener relayctl {
  }
}
...

Thanks again!


On 19.12.2012 г. 17:46 ч., Timo Sirainen wrote:
> On 19.12.2012, at 17.37, Nikolai Tsvetkov  wrote:
>
>> I try to use relay-ctrl with dovecot's imap, but with no luck. I think
>> that the problem is with environment variables. Here are some information:
>>
>> dovecot --version
>> 2.1.12
>>
>> service imap {
>>  executable = /usr/local/bin/envdir /etc/relay-ctrl
>> /usr/local/bin/relay-ctrl-chdir /usr/local/bin/dovecot-settcpremoteip
>> /usr/local/bin/relay-ctrl-allow /usr/local/libexec/dovecot/imap
>> }
> Use the v2.x way of running post-login scripts: 
> http://wiki2.dovecot.org/PostLoginScripting
>
>
>
>



Re: [Dovecot] environment variables not set

2012-12-19 Thread Timo Sirainen
On 19.12.2012, at 17.37, Nikolai Tsvetkov  wrote:

> I try to use relay-ctrl with dovecot's imap, but with no luck. I think
> that the problem is with environment variables. Here are some information:
> 
> dovecot --version
> 2.1.12
> 
> service imap {
>  executable = /usr/local/bin/envdir /etc/relay-ctrl
> /usr/local/bin/relay-ctrl-chdir /usr/local/bin/dovecot-settcpremoteip
> /usr/local/bin/relay-ctrl-allow /usr/local/libexec/dovecot/imap
> }

Use the v2.x way of running post-login scripts: 
http://wiki2.dovecot.org/PostLoginScripting




Re: [Dovecot] environment variables not set

2012-12-19 Thread Nikolai Tsvetkov
Sorry for double posting. :(

So, when I export environment variables, received in
dovecot-settcpremoteip, there are no USER, IP etc., but only standard
SLACKWARE variables.

I don't know whether it is related, but dovecot.log is full of such
errors (in fact on every login):

Dec 19 17:36:51 imap: Error: relay-ctrl-allow[29611]: Warning: Could not
rename '.1355931411.409875:29611' to '': No such file or directory.
Dec 19 17:37:51 imap: Error: relay-ctrl-allow[29615]: Warning: Could not
rename '.1355931471.411497:29615' to '': No such file or directory.
Dec 19 17:38:51 imap: Error: relay-ctrl-allow[29619]: Warning: Could not
rename '.1355931531.415611:29619' to '': No such file or directory.

What is wrong?

Best regards,
Nikolai Tsvetkov


[Dovecot] environment variables not set

2012-12-19 Thread Nikolai Tsvetkov
hi, all!

I try to use relay-ctrl with dovecot's imap, but with no luck. I think
that the problem is with environment variables. Here are some information:

dovecot --version
2.1.12

dovecot -n
# 2.1.12: /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 3.2.29-smp i686 Slackware 14.0
auth_mechanisms = plain login
debug_log_path = /var/log/dovecot-debug.log
disable_plaintext_auth = no
first_valid_uid = 89
info_log_path = /var/log/dovecot-info.log
listen = *
log_path = /var/log/dovecot.log
mail_location = maildir:~/Maildir
passdb {
  driver = shadow
}
protocols = imap
service imap {
  executable = /usr/local/bin/envdir /etc/relay-ctrl
/usr/local/bin/relay-ctrl-chdir /usr/local/bin/dovecot-settcpremoteip
/usr/local/bin/relay-ctrl-allow /usr/local/libexec/dovecot/imap
}
ssl = no
userdb {
  driver = passwd
}

/usr/local/bin/dovecot-settcpremoteip:

#!/bin/sh
#
# Wrapper for relay-ctrl-allow that sets TCPREMOTEIP.
TCPREMOTEIP="${IP}"; export TCPREMOTEIP
exec "$@"



Re: [Dovecot] dovecot index errors since 2.1.12

2012-12-19 Thread Morten Stevens


On 19.12.2012 16:15, Timo Sirainen wrote:

On 19.12.2012, at 15.35, Morten Stevens  wrote:


I see the error again. (this is a newly created folder)

Dec 19 14:20:45 mail dovecot: imap-login: Login: user=, 
method=PLAIN, rip=109.90.118.156, lip=81.30.145.131, mpid=16599, TLS, 
session=<0jJoezTRewBtWnac>
Dec 19 14:20:57 mail dovecot: imap(us...@example.org): Error: Cached message size 
larger than expected (4318 > 4244)
Dec 19 14:20:57 mail dovecot: imap(us...@example.org): Error: Corrupted index 
cache file 
/var/vmail/example.org/user2//mdbox/mailboxes/Wiki/dbox-Mails/dovecot.index.cache:
 Broken physical size for mail UID 15
Dec 19 14:20:57 mail dovecot: imap(us...@example.org): Error: 
read(/var/vmail/example.org/user2//mdbox/storage/m.15626) failed: Input/output 
error (FETCH for mailbox Wiki UID 15)
Dec 19 14:20:57 mail dovecot: imap(us...@example.org): Disconnected: Internal 
error occurred. Refer to server log for more information. [2012-12-19 14:20:57] 
in=2153 out=1200970

Do you need the index cache files?


Hmh. I can't figure out how that could happen. Also the index files alone 
probably aren't enough.. Can you send the index files, 
storage/dovecot.map.index* files and storage/m.* files put through 
http://dovecot.org/tools/mdbox-obfuscate.pl to remove the actual message 
contents. Then only the dovecot.index.cache file has anything sensitive (some 
message headers).


Hi Timo,

I'll send you the requested files in a separate mail.

Best regards,

Morten


Re: [Dovecot] dovecot index errors since 2.1.12

2012-12-19 Thread Timo Sirainen
On 19.12.2012, at 15.35, Morten Stevens  wrote:

> I see the error again. (this is a newly created folder)
> 
> Dec 19 14:20:45 mail dovecot: imap-login: Login: user=, 
> method=PLAIN, rip=109.90.118.156, lip=81.30.145.131, mpid=16599, TLS, 
> session=<0jJoezTRewBtWnac>
> Dec 19 14:20:57 mail dovecot: imap(us...@example.org): Error: Cached message 
> size larger than expected (4318 > 4244)
> Dec 19 14:20:57 mail dovecot: imap(us...@example.org): Error: Corrupted index 
> cache file 
> /var/vmail/example.org/user2//mdbox/mailboxes/Wiki/dbox-Mails/dovecot.index.cache:
>  Broken physical size for mail UID 15
> Dec 19 14:20:57 mail dovecot: imap(us...@example.org): Error: 
> read(/var/vmail/example.org/user2//mdbox/storage/m.15626) failed: 
> Input/output error (FETCH for mailbox Wiki UID 15)
> Dec 19 14:20:57 mail dovecot: imap(us...@example.org): Disconnected: Internal 
> error occurred. Refer to server log for more information. [2012-12-19 
> 14:20:57] in=2153 out=1200970
> 
> Do you need the index cache files?

Hmh. I can't figure out how that could happen. Also the index files alone 
probably aren't enough.. Can you send the index files, 
storage/dovecot.map.index* files and storage/m.* files put through 
http://dovecot.org/tools/mdbox-obfuscate.pl to remove the actual message 
contents. Then only the dovecot.index.cache file has anything sensitive (some 
message headers).



Re: [Dovecot] Upload / migrate old mails: iPhone shows oldest mails first

2012-12-19 Thread Timo Sirainen
On Wed, 2012-12-19 at 09:49 +0100, Denny Schierz wrote:
> hi,
> 
> I've got a very strange behavior: I uploaded old mails from a local
> folder (thunderbird / osx) to my Dovecot (Debian Squeeze) and now, the
> iphone (ios6) show the oldest mails first. The only thing I can
> imagine is, that Dovecot got from Thunderbird the newest mails first
> and last the old mails, so that in the last mdbox are the old one. 

Probably.

> So, if it is correct, how can I fix it?

If iPhone can't sort mails by received date, then I don't know if
there's any really easy way to fix it. Basically figure out some way to
import the mails again in the correct order..




Re: [Dovecot] Path for fixing sequence lookup of newly created mails in transaction view

2012-12-19 Thread Timo Sirainen
On Wed, 2012-12-19 at 09:02 +, Potapov Sergey wrote:

> It seem that tview_lookup_seq_range works incorret, if I request uids
> from 3 to 3, and I have new uids 1,2,4,5 it will return seq for uid=4.
> Fixing patch is included as attach.

Thanks. I committed it in two parts:
http://hg.dovecot.org/dovecot-2.1/rev/7f4835cff04a
http://hg.dovecot.org/dovecot-2.1/rev/c9e6ad8a42db

BTW. Did you notice this cause some Dovecot bug or were you using it in
your own code?




Re: [Dovecot] dovecot index errors since 2.1.12

2012-12-19 Thread Morten Stevens

On 19.12.2012 00:22, Morten Stevens wrote:


On 18.12.2012 23:44, Timo Sirainen wrote:

On 19.12.2012, at 0.40, Morten Stevens  wrote:


Dec 10 15:21:04 mail dovecot: imap(u...@example.org): Error: Cached
message size smaller than expected (5010 < 8192)
Dec 10 15:21:04 mail dovecot: imap(u...@example.org): Error:
Corrupted index cache file
/var/vmail/example.org/user//mdbox/mailboxes/INBOX/Ubuntu/dbox-Mails/dovecot.index.cache:
Broken physical size for mail UID 27517


Could you try if this fix helps?
http://hg.dovecot.org/dovecot-2.1/rev/bded819417d9


Thanks for the quick reply, but it doesn't help.


Can you easily reproduce this with a new empty user, using some simple
IMAP commands? Or alternatively running imaptest tool?
http://imapwiki.org/ImapTest


I'm not able to reproduce this with a new empty user and I am also not
able to reproduce this error after I deleted the affected folders and
recreated them.


Hi Timo,

I see the error again. (this is a newly created folder)

Dec 19 14:20:45 mail dovecot: imap-login: Login: 
user=, method=PLAIN, rip=109.90.118.156, 
lip=81.30.145.131, mpid=16599, TLS, session=<0jJoezTRewBtWnac>
Dec 19 14:20:57 mail dovecot: imap(us...@example.org): Error: Cached 
message size larger than expected (4318 > 4244)
Dec 19 14:20:57 mail dovecot: imap(us...@example.org): Error: Corrupted 
index cache file 
/var/vmail/example.org/user2//mdbox/mailboxes/Wiki/dbox-Mails/dovecot.index.cache: 
Broken physical size for mail UID 15
Dec 19 14:20:57 mail dovecot: imap(us...@example.org): Error: 
read(/var/vmail/example.org/user2//mdbox/storage/m.15626) failed: 
Input/output error (FETCH for mailbox Wiki UID 15)
Dec 19 14:20:57 mail dovecot: imap(us...@example.org): Disconnected: 
Internal error occurred. Refer to server log for more information. 
[2012-12-19 14:20:57] in=2153 out=1200970


Do you need the index cache files?

Best regards,

Morten



Re: [Dovecot] dovecot-lda (2.1.12) segfaults

2012-12-19 Thread Timo Sirainen
On 19.12.2012, at 12.59, Timo Sirainen  wrote:

> On 19.12.2012, at 12.47, Joseph Tam  wrote:
> 
>>> Can you still reproduce this in any way?
>> 
>> Yes, I have 6 sets of user INBOX index caches that will crash dovecot-lda.
>> The actual content of the INBOX is irrelevant (crash probably happens
>> before INBOX is opened).
> 
> Could you send me those files? Would be the easiest and quickest way to get 
> it fixed :)

Okay, fixed: http://hg.dovecot.org/dovecot-2.1/rev/32ce915e046a



Re: [Dovecot] dovecot-lda (2.1.12) segfaults

2012-12-19 Thread Timo Sirainen
On 19.12.2012, at 12.47, Joseph Tam  wrote:

>> Can you still reproduce this in any way?
> 
> Yes, I have 6 sets of user INBOX index caches that will crash dovecot-lda.
> The actual content of the INBOX is irrelevant (crash probably happens
> before INBOX is opened).

Could you send me those files? Would be the easiest and quickest way to get it 
fixed :)



Re: [Dovecot] dovecot-lda (2.1.12) segfaults

2012-12-19 Thread Joseph Tam


Timo Sirainen writes:


Can you still reproduce this in any way?


Yes, I have 6 sets of user INBOX index caches that will crash dovecot-lda.
The actual content of the INBOX is irrelevant (crash probably happens
before INBOX is opened).


I found two bugs, would be nice to know if they solve it:

http://hg.dovecot.org/dovecot-2.1/rev/2f848393f78e
http://hg.dovecot.org/dovecot-2.1/rev/bded819417d9


No, these patch don't help.  It crashes in the same place with the
same value of field_hdr.  Here's the full backtrace:

#0  0xff2a0474 in mail_cache_header_fields_read (cache=0x5c250) at 
mail-cache-fields.c:325
field_hdr = (const struct mail_cache_header_fields *) 0x20
field = {name = 0x402 , idx = 4282351288,
  type = MAIL_CACHE_FIELD_VARIABLE_SIZE, field_size = 4282335628,
  decision = MAIL_CACHE_DECISION_TEMP, last_used = -14558816}
last_used = (const uint32_t *) 0x64584
sizes = (const uint32_t *) 0xc
types = (const uint8_t *) 0x64888 ""
decisions = (const uint8_t *) 0x64900 ""
p = 0x24a38 "?\035\212@"
names = 0x0
end = 0x64a50 ""
orig_key = (void *) 0xffbfee38
orig_value = (void *) 0x64550
fidx = 411784
new_fields_count = 4280126016
dec = MAIL_CACHE_DECISION_NO
max_drop_time = 376804
offset = 32
i = 4282348464
#1  0xff29e8cc in mail_cache_compress_locked (cache=0x5c250, trans=0x645e0, 
unlock=0xffbfeeef)
at mail-cache-compress.c:361
dotlock = (struct dotlock *) 0x2ea00
st = {st_dev = 235718347, st_pad1 = {874, 0, 0}, st_ino = 0, st_mode = 
0, st_nlink = 0,
  st_uid = 0, st_gid = 0, st_rdev = 3720, st_pad2 = {0, 0}, st_size = 3720, 
st_atim = {
tv_sec = 410816, tv_nsec = -12631336}, st_mtim = {tv_sec = 514, tv_nsec = 
-12631336},
  st_ctim = {tv_sec = 65536, tv_nsec = 0}, st_blksize = 0, st_blocks = 
1621028016851520,
  st_fstype = "\000\000\000\004\000\000\000\003\212\000\000\000\000\005?P", 
st_pad4 = {-4198784,
-14028952, 39394339, 377424, 0, 16777216, 3, 4}}
old_mask = 4282348464
file_seq = 4
old_offset = 4290768372
ext_offsets = {arr = {buffer = 0xffbfee10, element_size = 4280930288}, 
v = 0xffbfee10,
  v_modifiable = 0xffbfee10}
offsets = (const uint32_t *) 0x0
data = (const void *) 0xff3f4380
i = 0
count = 1
fd = 0
ret = 377424
#2  0xff29efe0 in mail_cache_compress (cache=0x5c250, trans=0x645e0) at 
mail-cache-compress.c:489
unlock = false
ret = 411764
__FUNCTION__ = "mail_cache_compress"
#3  0xff2a3e28 in mail_cache_transaction_compress (ctx=0x5e3b8) at 
mail-cache-transaction.c:180
cache = (struct mail_cache *) 0x5c250
view = (struct mail_index_view *) 0x644c0
trans = (struct mail_index_transaction *) 0x645e0
ret = 2424
#4  0xff2a40b8 in mail_cache_transaction_open_if_needed (ctx=0x5e3b8)
at mail-cache-transaction.c:241
cache = (struct mail_cache *) 0x5c250
ext = (const struct mail_index_ext *) 0x1e
idx = 154968
i = 1
__FUNCTION__ = "mail_cache_transaction_open_if_needed"
#5  0xff2a6e94 in mail_cache_field_want_add (ctx=0x5e3b8, seq=1, field_idx=12)
at mail-cache-transaction.c:1048
decision = 153968
#6  0xff27e8e8 in index_mail_parse_header_register_all_wanted (mail=0x5efa8)
at index-mail-headers.c:175
_mail = (struct mail *) 0x5efa8
all_cache_fields = (const struct mail_cache_field *) 0x25970
i = 12
count = 26
#7  0xff27ec90 in index_mail_parse_header_init (mail=0x5efa8, headers=0x0)
at index-mail-headers.c:230
_data_stack_cur_id = 2
data = (struct index_mail_data *) 0x5f058
match = (const uint8_t *) 0x641a0 ""
i = 0
field_idx = 4290769328
match_count = 2155905152
__FUNCTION__ = "index_mail_parse_header_init"
#8  0xff27f5c8 in index_mail_cache_parse_init (_mail=0x5efa8, input=0x64058)
at index-mail-headers.c:376
mail = (struct index_mail *) 0x5efa8
input2 = (struct istream *) 0x641a0
__FUNCTION__ = "index_mail_cache_parse_init"
#9  0xff2299cc in mbox_save_get_input_stream (ctx=0x5e6e0, input=0x637c8) at 
mbox-save.c:411
filter = (struct istream *) 0x0
ret = (struct istream *) 0x5edd0
cache_input = (struct istream *) 0x25990
streams = {0x20202020, 0x2e938, 0xa202020}
#10 0xff22a084 in mbox_save_begin (_ctx=0x5e6e0, input=0x637c8) at 
mbox-save.c:520
ctx = (struct mbox_save_context *) 0x5e6e0
t = (struct mbox_transaction_context *) 0x5de88
save_flags = MAIL_RECENT
offset = 0
__FUNCTION__ = "mbox_save_begin"
#11 0xff24e9c0 in mailbox_save_begin (ctx=0xffbff514, input=0x637c8) at 
mail-storage.c:1652
box = (struct mailbox *) 0x594e8
ret = 0
#12 0xff23f138 in mail_storage_try_copy (_ctx=0xffbff514, mail=0x54cd8) at 
mail-copy.c:68

Re: [Dovecot] Too many imap connections in state "idling"

2012-12-19 Thread Urban Loesch

Can you see other strange symptoms on that machine?
For example very high system load but not high I/O?

We had similar issues with imap processes that are hanging in "D" state some 
months ago.
The problem was, or is a bug in the inotify mechanism in the linux kernel. Not 
shure if the bug has just been
fixed.

For details see here:
http://www.dovecot.org/list/dovecot/2012-May/065884.html

and solution here:
http://www.dovecot.org/list/dovecot/2012-June/066314.html

Regards
Urban



On 18.12.2012 17:48, 3.lis...@adminlinux.com.br wrote:

Thanks Steffen Kaiser ! I think not. The server is currently always 60% of imap processes 
in state "idling".

IDLE processes are like this:
root@server:/root# ps aux |grep imap
dovemail617  0.0  0.0  23136  2260 ?SDec15   0:01 dovecot/imap 
[Username1 IP1  IDLE]
dovemail677  0.0  0.0  23104  2172 ?SDec15   0:01 dovecot/imap 
[Username2 IP2 IDLE]
...

My "idling" processes are seen as follows:
root@server:~#  ps aux |grep imap |grep idling
dovemail   1141  0.0  0.0  16836  2148 ?DDec15   0:01 dovecot/imap 
[idling]
dovemail   3375  0.0  0.0  16828  2120 ?D15:48   0:00 dovecot/imap 
[idling]
dovemail   4833  0.0  0.0  16828  2212 ?D15:49   0:00 dovecot/imap 
[idling]
...

Thanks!
--
Thiago Henrique
www.adminlinux.com.br

On 14-12-2012 06:40, Steffen Kaiser wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, 13 Dec 2012, 3.lis...@adminlinux.com.br wrote:


Is it normal this large amount of connections in state 'idling' ?


If they actually using the "IDLE" command to wait for PUSH mails on much more 
folders than on the other server?

Regards,

- -- Steffen Kaiser
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBUMrmFmoxLS8a3A9mAQKmjgf/RbVzZet2+PUDQpMkrquB8zURR+WaBpxa
OCnNahjCV3kkuyLSciU8cq54vQhfPEXoyeqoQric/QmMOIZwhaVclLGpnSGa6lGR
fjk6x1PgcUDpqncktTJ+aUuJYTiigQbZ1wLWUfCHNZMXx5smReUMV+IdYV/0UH2a
NCnQMX7+FfUWOfZdU6QbomgTXAEgjUD+YRo0JqQ6ja/ELWfbUrYAXwhGXAXyskJT
0eygy3FSEBJQMaIO+o5Dco7AbaCGs19xRagZWGZV5/1j17dHqOHwLdp8MnO4wCI8
4IPzuTUbAY0gnCEJLcSYmQG1FzNi5SjPfMV/dypB7wcPdIx4rIzsww==
=OQSw
-END PGP SIGNATURE-





[Dovecot] Dsync help, new attempt

2012-12-19 Thread Torbjorn Astlind
I observe that dsync fills Maildir correctly incl. cur, if I delete 
Maildir just before dsync runs.
Can the failed mbox to Maildir conversion be caused by dovecot creating 
Maildir automatically if a client connects to dovecot?

Should dovecot be shutdown when running dsync?
All the best,
Torbjörn



   9. dsync help? (Torbjorn Astlind)




--

Message: 9
Date: Mon, 10 Dec 2012 16:33:08 +0100
From: Torbjorn Astlind 
To: dovecot@dovecot.org
Subject: [Dovecot] dsync help?
Message-ID: <50c600b4.4040...@dbb.su.se>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi all,
I have dovecot serving aprox 200 users through mbox, but the time has 
come to migrate to a new server, and to use Maildir.
Using rsync from the old server I get all user data, i.e  /home/*, and 
inboxes i.e /var/mail/* to a new server. This has worked well for some 
time as backup.
The dsync should convert everything to Maildir, and it does... to an 
extent.  (linebrakes for easy viewing)
What I see, is that often, the /home/mail/xxx is NOT resulting in 
/home/xxx/Maildir/cur
All mailboxes from /home/xxx, are properly converted to 
/home/xxx/Maildir/.name_of_ box

Am I misunderstanding something?
I get it to work sometimes if I delete the ~/Maildir completely before 
doing the dsync.

All, and any help most welcome,
Torbj?rn





for i in `cat /home2/torbjorn/SCRIPTS/userlist.txt`;
do dsync  -D -v -f  -u $i  -c /etc/dovecot/alt_config/10-mail.MBOX.conf 
 backup maildir:~/Maildir;

done > /home2/torbjorn/SCRIPTS/mb2mdRES.txt 2>&1

the  -c 10.mail.MBOX.conf contains, the parts I think are relevant for 
the dsync operation:

mail_location = mbox:~/home:INBOX=/home/mail/%u
namespace {
type = private
   separator = '/'
  inbox = yes
}
dsync(root): Debug: Effective uid=501, gid=501, home=/home/torbjorn
dsync(root): Debug: Namespace : type=private, prefix=, sep=/, inbox=yes, 
hidden=no, list=yes, subscriptions=yes 
location=mbox:~/home:INBOX=/home/mail/torbjorn
dsync(root): Debug: fs: root=/home/torbjorn/home, index=, control=, 
inbox=/home/mail/torbjorn, alt=

dsync(root): Debug: Effective uid=501, gid=501, home=/home/torbjorn
dsync(root): Debug: Namespace : type=private, prefix=, sep=/, inbox=yes, 
hidden=no, list=yes, subscriptions=yes location=maildir:~/Maildir
dsync(root): Debug: maildir++: root=/home/torbjorn/Maildir, index=, 
control=, inbox=/home/torbjorn/Maildir, alt=
dsync(root): Debug: Namespace : /home/torbjorn/Maildir doesn't exist 
yet, using default permissions
dsync(root): Debug: Namespace : Using permissions from 
/home/torbjorn/Maildir: mode=0700 gid=-1
dsync(torbjorn): Debug: Namespace : Using permissions from 
/home/torbjorn/home: mode=0700 gid=-1





--

___
dovecot mailing list
dovecot@dovecot.org
http://dovecot.org/cgi-bin/mailman/listinfo/dovecot

End of dovecot Digest, Vol 116, Issue 16



[Dovecot] Path for fixing sequence lookup of newly created mails in transaction view

2012-12-19 Thread Potapov Sergey
Hi!

It seem that tview_lookup_seq_range works incorret, if I request uids from 3 to 
3, and I have new uids 1,2,4,5 it will return seq for uid=4. Fixing patch is 
included as attach.

--
Sergey Potapov
# HG changeset patch
# User lion@ubuntu.ubuntu-domain
# Date 1354855835 -14400
# Node ID bb3559ad714294918b56c6f4a45ad9c14ce5c3cb
# Parent  d4aab9a4b15989d3be1d734efda8d53c6d96b185
lib-index: Fixed sequence lookup of newly created mails in transaction view.

diff -r d4aab9a4b159 -r bb3559ad7142 src/lib-index/mail-index-transaction-view.c
--- a/src/lib-index/mail-index-transaction-view.c	Ср. дек. 05 18:52:08 2012 +0400
+++ b/src/lib-index/mail-index-transaction-view.c	Пт. дек. 07 08:50:35 2012 +0400
@@ -203,11 +203,17 @@
 			if (first_uid <= rec->uid)
 break;
 		}
-		if (seq > tview->t->last_new_seq) {
+		if (seq > tview->t->last_new_seq || rec->uid > last_uid) {
 			/* no messages in range */
 			return;
 		}
 		*first_seq_r = seq;
+
+		if (rec->uid == last_uid) {
+			/* one seq in range */
+			*last_seq_r = seq;
+			return;
+		}
 	}
 
 	seq = tview->t->last_new_seq;


[Dovecot] Upload / migrate old mails: iPhone shows oldest mails first

2012-12-19 Thread Denny Schierz
hi,

I've got a very strange behavior: I uploaded old mails from a local folder 
(thunderbird / osx) to my Dovecot (Debian Squeeze) and now, the iphone (ios6) 
show the oldest mails first. The only thing I can imagine is, that Dovecot got 
from Thunderbird the newest mails first and last the old mails, so that in the 
last mdbox are the old one. So, if it is correct, how can I fix it?

cu denny