Re: [Dovecot] Dovecot 2.0.7 (8793036f6de8) seems to miss some defaults for vsz_limit

2010-11-17 Thread Thomas Leuxner
On Wed, Nov 17, 2010 at 05:01:27AM +, Timo Sirainen wrote:
 LMTP shouldn't have had that problem.. Unless you've explicitly changed those 
 in the config file? See doveconf -n|grep vsz_limit

Did some investigation now and could bring up the latest and greatest
by adding missing defaults after comparing an old 'doveconf -a' dump:

[ 20-managesieve.conf ]
+   vsz_limit = 64M

Manually uncommented the entry in the file.

It then gave me:

$ invoke-rc.d dovecot start
Starting IMAP/POP3 mail server: dovecotdoveconf: Fatal: Error in
configuration file /etc/dovecot/dovecot.conf: service(lmtp): vsz_limit
is too low
 failed!

Previous settings would indicate default of:

service lmtp {
  [...]
  vsz_limit = 0
}

That does not work anymore though. Manually set a size in
'master.conf' therefore:

[ 10-master.conf ]

service lmtp {
  [...]
  vsz_limit = 64M
}

Now Dovecot comes up. Not sure what value would be reasonable for the
LMTP Service. Point is: It should pull reasonable defaults which it
obviously does not.

Regards
Thomas


Re: [Dovecot] Dovecot 2.0.7 (8793036f6de8) seems to miss some defaults for vsz_limit

2010-11-17 Thread Robert Schetterer
Am 17.11.2010 09:28, schrieb Thomas Leuxner:
 On Wed, Nov 17, 2010 at 05:01:27AM +, Timo Sirainen wrote:
 LMTP shouldn't have had that problem.. Unless you've explicitly changed 
 those in the config file? See doveconf -n|grep vsz_limit
 
 Did some investigation now and could bring up the latest and greatest
 by adding missing defaults after comparing an old 'doveconf -a' dump:
 
 [ 20-managesieve.conf ]
 +   vsz_limit = 64M
 
 Manually uncommented the entry in the file.
 
 It then gave me:
 
 $ invoke-rc.d dovecot start
 Starting IMAP/POP3 mail server: dovecotdoveconf: Fatal: Error in
 configuration file /etc/dovecot/dovecot.conf: service(lmtp): vsz_limit
 is too low
  failed!
 
 Previous settings would indicate default of:
 
 service lmtp {
   [...]
   vsz_limit = 0
 }
 
 That does not work anymore though. Manually set a size in
 'master.conf' therefore:
 
 [ 10-master.conf ]
 
 service lmtp {
   [...]
   vsz_limit = 64M
 }
 
 Now Dovecot comes up. Not sure what value would be reasonable for the
 LMTP Service. Point is: It should pull reasonable defaults which it
 obviously does not.
 
 Regards
 Thomas

i think there can only be defaults if all parameters are default
( at a new clean install from scratch )

cause there are depencies, so if you change one parameter ,others might
be changed too, at last ,using distro packs, may also change default
setups to what the distro releaser means that is best, so Timo might not
the right man ,to talk to in such case...

perhaps others might mean the better way is to let dovecot start with
warning and let it crash later

i think in this case ,there is no make all people happy chance

so the only problem might have been not reading changelogs or/and better
anouncement to new stuff,

lucky Timo is patching fast and quick, on the other Hand people
arent that quick as Timo *g, so everything has its pros and contras
perhaps it might be better to have a devel tree, but as far i see
Timo is the main coder so its definite up to him how to handle
releasing, unless there are no other prime coders to which he has
to sync, and i think Timo would be happy if there would be more heavy
coders at dovecot for better testing,releasing,coding etc

but after all its not a heavy problem,
there might be always trouble with latest code so be prepared at
upgrade, make sure that you can get back at productional
servers

why no use something like i.e default_vsz_limit = 256M ?
instead of using seperate entries


-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


Re: [Dovecot] Dovecot 2.0.7 (8793036f6de8) seems to miss some defaults for vsz_limit

2010-11-17 Thread Thomas Leuxner
On Wed, Nov 17, 2010 at 09:57:59AM +0100, Robert Schetterer wrote:
 i think there can only be defaults if all parameters are default
 ( at a new clean install from scratch )

These are unset defaults as far as I can tell. As with all defaults they
should work out of the box. They are *not* overriden by specific custom
values. Well, actually they are now, because of not being set in the first
instance.

 why no use something like i.e default_vsz_limit = 256M ?
 instead of using seperate entries

Personally I think this is a form of wasting resources. Why would one
allocate 256M to something that was previously set to 0B? Would it do
any good at all? It may be convient to do so, but it may not be very
effective...

Thomas


Re: [Dovecot] Dovecot 2.0.7 (8793036f6de8) seems to miss some defaults for vsz_limit

2010-11-17 Thread Robert Schetterer
Am 17.11.2010 10:14, schrieb Thomas Leuxner:
 On Wed, Nov 17, 2010 at 09:57:59AM +0100, Robert Schetterer wrote:
 i think there can only be defaults if all parameters are default
 ( at a new clean install from scratch )
 
 These are unset defaults as far as I can tell. As with all defaults they
 should work out of the box. They are *not* overriden by specific custom
 values. Well, actually they are now, because of not being set in the first
 instance.

hm i have i.e

# If you set service_count=0, you probably need to grow this.
  #vsz_limit = 64M


in 10-master.conf

so whatever there is/was a warning in some default conf having your eyes
on this parameter

so i stay
there can only be starting defaults at clean new setups
and they might fail too, i.e if you have very small resources
so give warning is the only chance i see

but no flame , i changed so much that i havent any idea whats now is
default exactly

 
 why no use something like i.e default_vsz_limit = 256M ?
 instead of using seperate entries
 
 Personally I think this is a form of wasting resources. Why would one
 allocate 256M to something that was previously set to 0B? Would it do
 any good at all? It may be convient to do so, but it may not be very
 effective...

sorry i have enough resources so i dont care
unless i see a warning, basicly i trust in Timos code giving the right
warnings

but good that Timo mostly answers if you ask detailed
describe your resources and he or others might give recomands
testing your setup with different setups might also help find out for
you, whats best at your site

perhaps some basic resource examples should be in the wiki

 
 Thomas


-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


Re: [Dovecot] Dovecot 2.0.7 (8793036f6de8) seems to miss some defaults for vsz_limit

2010-11-17 Thread Robert Schetterer
Am 17.11.2010 10:40, schrieb Robert Schetterer:
 Am 17.11.2010 10:14, schrieb Thomas Leuxner:
 On Wed, Nov 17, 2010 at 09:57:59AM +0100, Robert Schetterer wrote:
 i think there can only be defaults if all parameters are default
 ( at a new clean install from scratch )

 These are unset defaults as far as I can tell. As with all defaults they
 should work out of the box. They are *not* overriden by specific custom
 values. Well, actually they are now, because of not being set in the first
 instance.
 
 hm i have i.e
 
 # If you set service_count=0, you probably need to grow this.
   #vsz_limit = 64M
 
 
 in 10-master.conf
 
 so whatever there is/was a warning in some default conf having your eyes
 on this parameter
 
 so i stay
 there can only be starting defaults at clean new setups
 and they might fail too, i.e if you have very small resources
 so give warning is the only chance i see
 
 but no flame , i changed so much that i havent any idea whats now is
 default exactly
 

 why no use something like i.e default_vsz_limit = 256M ?
 instead of using seperate entries

 Personally I think this is a form of wasting resources. Why would one
 allocate 256M to something that was previously set to 0B? Would it do
 any good at all? It may be convient to do so, but it may not be very
 effective...
 
 sorry i have enough resources so i dont care
 unless i see a warning, basicly i trust in Timos code giving the right
 warnings
 
 but good that Timo mostly answers if you ask detailed
 describe your resources and he or others might give recomands
 testing your setup with different setups might also help find out for
 you, whats best at your site
 
 perhaps some basic resource examples should be in the wiki
 

 Thomas
 
 
 looking here
http://hg.dovecot.org/dovecot-2.0/
this seems to be fixed


-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


Re: [Dovecot] qmail + dovecot-lda

2010-11-17 Thread ckubu
hi,

 Google vdelivermail + dovecot for some code snippets

thanks, i will look about later in the afternoon.

 Are you running latest vpopmail for qmailamim integration?

yes , vpopmail 5.4.32, dovecoz 2.0.7

christoph


 Rick

 Sent from my iPhone

 On Nov 16, 2010, at 8:55 PM, ckubu ck...@so36.net wrote:
  hallo,
 
  i am changing my mailsetups to qmail+vpopmail+dovecot.
 
  is it possible to let dovecot's lda deliver mail into mailboxes but
  also
  deliver mails to forward-addresses in .qmail-files, if exists?
 
  b.t.w. i know, its not an dovecot issue, but maybe anyone knows: i
  have setup
  defaultdelivery in qmail-control directory, but vadddomain ignors
  it. is
  there a way to make that entry the default for .qmail-default files?
 
  thanks
  christoph




Re: [Dovecot] Dovecot 2.0.7 (8793036f6de8) seems to miss some defaults for vsz_limit

2010-11-17 Thread Robert Schetterer
Am 17.11.2010 11:00, schrieb Robert Schetterer:
 Am 17.11.2010 10:40, schrieb Robert Schetterer:
 Am 17.11.2010 10:14, schrieb Thomas Leuxner:
 On Wed, Nov 17, 2010 at 09:57:59AM +0100, Robert Schetterer wrote:
 i think there can only be defaults if all parameters are default
 ( at a new clean install from scratch )

 These are unset defaults as far as I can tell. As with all defaults they
 should work out of the box. They are *not* overriden by specific custom
 values. Well, actually they are now, because of not being set in the first
 instance.

 hm i have i.e

 # If you set service_count=0, you probably need to grow this.
   #vsz_limit = 64M


 in 10-master.conf

 so whatever there is/was a warning in some default conf having your eyes
 on this parameter

 so i stay
 there can only be starting defaults at clean new setups
 and they might fail too, i.e if you have very small resources
 so give warning is the only chance i see

 but no flame , i changed so much that i havent any idea whats now is
 default exactly


 why no use something like i.e default_vsz_limit = 256M ?
 instead of using seperate entries

 Personally I think this is a form of wasting resources. Why would one
 allocate 256M to something that was previously set to 0B? Would it do
 any good at all? It may be convient to do so, but it may not be very
 effective...

 sorry i have enough resources so i dont care
 unless i see a warning, basicly i trust in Timos code giving the right
 warnings

 but good that Timo mostly answers if you ask detailed
 describe your resources and he or others might give recomands
 testing your setup with different setups might also help find out for
 you, whats best at your site

 perhaps some basic resource examples should be in the wiki


 Thomas


  looking here
 http://hg.dovecot.org/dovecot-2.0/
 this seems to be fixed
 
 
ok, for info

i have
2.0.7-0~auto+6 which is latest current
on http://xi.rename-it.nl/debian/
yet

needed
 i.e
service lmtp {
 vsz_limit = 256M
...

at my setup !!!

changelog of this version , so looks like current in sync with latest
patch level

dovecot (2:2.0.7-0~auto+6) unstable; urgency=low

  * New revision (1445:c2a76570d736) in pigeonhole Mercurial repository:
- Services' default vsz_limit wasn't actually using
default_vsz_limit but
  rather 4 GB.
- Running standalone? check now uses a new DOVECOT_CHILD_PROCESS
  environment rather than GENERATION.

 -- Stephan Bosch step...@rename-it.nl  Tue, 16 Nov 2010 23:10:56 +0200

dovecot (2:2.0.7-0~auto+5) unstable; urgency=low

  * New revision (12432:8793036f6de8) in dovecot Mercurial repository:
- Services' default vsz_limit wasn't actually using
default_vsz_limit but
  rather 4 GB.
- Fixed home=/home/./user style chrooting to work again.
- master: Fail if service's vsz_limit is less than 1 kB
- imap/pop3-login: Default vsz_limit=64 caused it to be unlimited,
not 64
  MB.

 -- Stephan Bosch step...@rename-it.nl  Tue, 16 Nov 2010 21:19:17 +0200

dovecot (2:2.0.7-0~auto+4) unstable; urgency=low





-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


[Dovecot] Mail history function?

2010-11-17 Thread Oliver Berse
I'm a newbie at Dovecot. For a company groupware I need a kind of a
history function for mails to see which user sent which mail to whom / got
which mail from whom. So I have to get the message ID of in- and outgoing
mails (and write related data to a mysql database). My first idea was to
monitor the log file with a daemon and search for strings like
deliver(x...@y.z): 2010-11-15 17:34:56 Info:
msgid=aanlktikorguieg2kguw2glmuld4tx-bpst4yhubuh...@a.b. I'm not sure
if this is the right approach. Does anyone know a better solution with
Dovecot?

thanks,
Oliver


Re: [Dovecot] Mail history function?

2010-11-17 Thread Alex Baule
Dovecot have a plugin, called notify

You can use as a base and develop your plugin to write the itens that you
want in the database.

in dovecot source, see in src/plugins/notify

2010/11/17 Oliver Berse m...@oliver-berse.de

 I'm a newbie at Dovecot. For a company groupware I need a kind of a
 history function for mails to see which user sent which mail to whom / got
 which mail from whom. So I have to get the message ID of in- and outgoing
 mails (and write related data to a mysql database). My first idea was to
 monitor the log file with a daemon and search for strings like
 deliver(x...@y.z): 2010-11-15 17:34:56 Info:
 msgid=aanlktikorguieg2kguw2glmuld4tx-bpst4yhubuh...@a.b. I'm not sure
 if this is the right approach. Does anyone know a better solution with
 Dovecot?

 thanks,
 Oliver



Re: [Dovecot] Mail history function?

2010-11-17 Thread Odhiambo Washington
On Wed, Nov 17, 2010 at 2:48 PM, Oliver Berse m...@oliver-berse.de wrote:

 I'm a newbie at Dovecot. For a company groupware I need a kind of a
 history function for mails to see which user sent which mail to whom / got
 which mail from whom. So I have to get the message ID of in- and outgoing
 mails (and write related data to a mysql database). My first idea was to
 monitor the log file with a daemon and search for strings like
 deliver(x...@y.z): 2010-11-15 17:34:56 Info:
 msgid=aanlktikorguieg2kguw2glmuld4tx-bpst4yhubuh...@a.b. I'm not sure
 if this is the right approach. Does anyone know a better solution with
 Dovecot?

 thanks,
 Oliver


It's really nothing to do with Dovecot, but more to do with any available
tools used to analyse your SMTP server logs.


-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Damn!!


Re: [Dovecot] Mail history function?

2010-11-17 Thread Frank Elsner
On Wed, 17 Nov 2010 12:48:16 +0100 Oliver Berse wrote:
 I'm a newbie at Dovecot. For a company groupware I need a kind of a
 history function for mails to see which user sent which mail to whom / got
 which mail from whom. So I have to get the message ID of in- and outgoing
 mails (and write related data to a mysql database). My first idea was to
 monitor the log file with a daemon and search for strings like
 deliver(x...@y.z): 2010-11-15 17:34:56 Info:
 msgid=aanlktikorguieg2kguw2glmuld4tx-bpst4yhubuh...@a.b. I'm not sure
 if this is the right approach. Does anyone know a better solution with
 Dovecot?

I guess it should be done by the MTA. 


--Frank Elsner


Re: [Dovecot] Mail history function?

2010-11-17 Thread Jakob Curdes



  My first idea was to
monitor the log file with a daemon and search for strings like
deliver(x...@y.z): 2010-11-15 17:34:56 Info:
msgid=aanlktikorguieg2kguw2glmuld4tx-bpst4yhubuh...@a.b. I'm not sure
if this is the right approach. Does anyone know a better solution with
Configure your MTA to log into an SQL database. Then you can pull 
everything you want from there
The IMAP server is the wrong place for that as you would exclude mails 
that get discarded by the MTA, e.g. due to ingress or spam detection 
rules or because of a misconfigured alias.


HTH,
Jakob Curdes



[Dovecot] mailboxes and IMAP folders mirroring ?

2010-11-17 Thread Frank Bonnet

Hello

This is a bit off Dovecot but ...

I'm searching some software to mirror mailboxes and IMAP forlders
from the mailhub to another (clone) computer.

Actually I use rsync daily but I wonder if it exists some software
that are real time mirroring capable ?

I'm using Dovecot 1.2.14 and Postfix with MBOX format.

Thanks



Re: [Dovecot] mailboxes and IMAP folders mirroring ?

2010-11-17 Thread Javier de Miguel Rodríguez
 
 

On 17 de noviembre de 2010 at 13:30 Frank Bonnet f.bon...@esiee.fr wrote:

 Hello

 This is a bit off Dovecot but ... 
Hmm...
 
You can accomplish that in several ways:
 
1º Use inotify to rsync when mbox file changes (I recommend maildir for this,
you do not have to copy the whole file)
2º Use replicated storage (maybe this is not what you are looking for)
3º Search for continous data protection (cdp) in google 
 
Regards
 
Javier
 


 I'm searching some software to mirror mailboxes and IMAP forlders
 from the mailhub to another (clone) computer.

 Actually I use rsync daily but I wonder if it exists some software
 that are real time mirroring capable ?

 I'm using Dovecot 1.2.14 and Postfix with MBOX format.

 Thanks


Re: [Dovecot] Restarting dovecot-auth stops authentication

2010-11-17 Thread Attila Nagy

On 11/16/10 18:29, Timo Sirainen wrote:

On Tue, 2010-11-16 at 14:52 +0100, Attila Nagy wrote:

Nov 16 14:32:40 be dovecot: imap: Error: net_connect_unix(auth-master)
failed: No such file or directory

Of course I forgot to tell it's 2.0.6.

2.0.7 fixed this.

Thanks, I've upgraded to it.

BTW, I have these in batches:
Nov 17 11:42:10 be dovecot: pop3-login: Internal login failure (auth 
failed, 1 attempts): user=user1, method=PLAIN, rip=172.28.16.20, 
lip=172.16.253.13
Nov 17 11:42:10 be dovecot: pop3-login: Internal login failure (auth 
failed, 1 attempts): user=user2, method=PLAIN, rip=172.28.16.20, 
lip=172.16.253.13

[...]
22 from this in the same second, then nothing for hours. This time this 
wasn't because the auth process disappeared.
I suspected LDAP errors, but Dovecot is so effective in LDAP caching 
that there are no 22 LDAP queries in the same second. How could I figure 
out what causes these errors? I don't see any more verbosity in the 
source code in the place, where this comes from, and I have pretty much 
connections, so doing a verbose log for days isn't an option...

Config:
# 2.0.7: /usr/local/etc/dovecot/dovecot.conf
# OS: FreeBSD 8.1-STABLE amd64
auth_cache_negative_ttl = 0
auth_cache_size = 100 M
auth_cache_ttl = 1 days
default_process_limit = 2000
disable_plaintext_auth = no
mail_fsync = never
mail_gid = 999
mail_location = maildir:~/Maildir
mail_plugins =  quota
mail_uid = 999
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope 
encoded-character vacation subaddress comparator-i;ascii-numeric 
relational regex imap4flags copy include variables body enotify 
environment mailbox date

passdb {
  args = /usr/local/etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
plugin {
  autocreate = INBOX.Trash
  autocreate2 = INBOX.Drafts
  autocreate3 = INBOX.Sent
  autocreate4 = INBOX.Spam
  autosubscribe = INBOX.Trash
  autosubscribe2 = INBOX.Drafts
  autosubscribe3 = INBOX.Sent
  autosubscribe4 = INBOX.Spam
  mail_log_events = delete undelete expunge copy mailbox_delete 
mailbox_rename flag_change save mailbox_create

  mail_log_fields = uid box msgid size flags vsize from subject
  quota = maildir:User quota
}
protocols = pop3 imap lmtp
service anvil {
  client_limit = 8192
}
service auth {
  client_limit = 8192
  unix_listener auth-userdb {
mode = 0600
user = qmailldap
  }
}
service imap-login {
  client_limit = 8
  process_min_avail = 16
  service_count = 0
  vsz_limit = 64 M
}
service imap {
  client_limit = 8
  process_min_avail = 16
  service_count = 0
}
service lmtp {
  inet_listener lmtp {
port = 24
  }
  user = qmailldap
}
service pop3-login {
  client_limit = 8
  process_min_avail = 16
  service_count = 0
}
service pop3 {
  client_limit = 8
  process_min_avail = 16
  service_count = 0
}
ssl = no
userdb {
  driver = prefetch
}
userdb {
  args = /usr/local/etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
protocol lmtp {
  mail_plugins =  quota mail_log notify
}
protocol imap {
  mail_max_userip_connections = 1024
  mail_plugins =  quota imap_quota autocreate
}
protocol pop3 {
  mail_max_userip_connections = 1024
  mail_plugins =  quota autocreate
}
but the process' size barely grows, regardless the large number of 
connections and users:
dovecot   21600  0.9  0.0 32304 14604  ??  S 9:24PM   6:06.91 
dovecot/auth




BTW, sending SIGUSR2 to dovecot/auth doesn't lot anything, while sending
SIGHUP logs the clearing cache message. The wiki says on USR2 it
should log cache statistics.

Works here:

Nov 16 17:26:25 auth: Info: Authentication cache hits 0/2 (0%)
Nov 16 17:26:25 auth: Info: Authentication cache inserts: positive: 2 95B, 
negative: 0 0B

So .. Since SIGHUP works, I don't really know. They should be using
exactly the same code right next to each others. I guess something could
disable SIGUSR2 somewhere somehow. What passdb/userdb do you use?


LDAP.
procstat -i says it's OK:
  PID COMM SIG FLAGS
21600 auth HUP  --C
21600 auth INT  --C
21600 auth QUIT ---
21600 auth ILL  ---
21600 auth TRAP ---
21600 auth ABRT ---
[...]
21600 auth USR1 ---
21600 auth USR2 --C




Re: [Dovecot] Mail history function?

2010-11-17 Thread Jakob Curdes

Please keep replies to the list so that others can participate.


I sugest the notify, because the admin can know if a user open a 
email, copy to another folder, delete the emailetc.


but using the MTA it can be a solution too.

At least in Germany, doing this is quite risky as this gives lots of 
information about the person.
German law limits the use of profiles like these quite strictly; in 
general an employer has no business to log all these actions generally.
This does not mean it can be helpful for diagnosing problems, but I 
would not recommend to do so as a general procedure.
On the other hands, it is a de-facto requirement today that you can 
trace every communiction that has entered the company.
The only place where you can do this without potentiall missing some 
messages is the MTA. This is why all the archival tools want to couple 
to the MTA...


JC


Re: [Dovecot] Dovecot 2.0.7 (8793036f6de8) seems to miss some defaults for vsz_limit

2010-11-17 Thread Timo Sirainen
On 17.11.2010, at 8.28, Thomas Leuxner wrote:

 $ invoke-rc.d dovecot start
 Starting IMAP/POP3 mail server: dovecotdoveconf: Fatal: Error in
 configuration file /etc/dovecot/dovecot.conf: service(lmtp): vsz_limit
 is too low
 failed!
 
 service lmtp {
  [...]
  vsz_limit = 0
 }

Oh, right, that was causing problems too. Fixed: 
http://hg.dovecot.org/dovecot-2.0/rev/2456cd0917d3



Re: [Dovecot] Multiple MYSQL hosts as passdb backend

2010-11-17 Thread Timo Sirainen
On Tue, 2010-11-16 at 15:44 -0800, moody_cz wrote:

 Everything works fine as long as 10.0.0.3 is up and running. However, when I
 shutdown mysql server on 10.0.0.3, dovecot won't even try the other host
 10.0.0.4 as it is told to do in the conf.

That was a bug, fixed:
http://hg.dovecot.org/dovecot-2.0/rev/666fd046ab7f

Also this improves the failure handling for both mysql/pgsql:
http://hg.dovecot.org/dovecot-2.0/rev/990abbb6d3dd




Re: [Dovecot] Ongoing performance issues with 2.0.x

2010-11-17 Thread Timo Sirainen
On Sat, 2010-11-13 at 13:17 +0100, Ralf Hildebrandt wrote:
 * Timo Sirainen t...@iki.fi:
 
  There's a lot more of IPC going on now. Each process at startup connects
  to config process to read configuration (vs. reading it from environment
  variables). State tracking is done in anvil process (vs. master process
  internally). Logging is via pipes to log process instead of sockets to
  master process (this should improve performance). Maybe other things I
  can't think of now.
 
 Is dstat --ipc a suitable to measure/see what's going on?

That looks like it's about sysv IPC, which Dovecot doesn't use. Maybe
some other options would show something useful, I don't know.

Anyway, getting the rusage stats for v1.2 and comparing them to v2.0
might show something useful. Could you patch your v1.2 with the attached
patch and again get one day's stats through logparse.pl? (Need to change
Debug - Info in its regexp)
diff -r cda53154e222 src/imap/main.c
--- a/src/imap/main.c	Mon Nov 08 19:43:41 2010 +
+++ b/src/imap/main.c	Wed Nov 17 17:16:49 2010 +
@@ -22,6 +22,9 @@
 #include stdlib.h
 #include unistd.h
 #include syslog.h
+#include sys/time.h
+#include sys/resource.h
+#include time-util.h
 
 #define IS_STANDALONE() \
 (getenv(IMAPLOGINTAG) == NULL)
@@ -44,6 +47,7 @@
 enum client_workarounds client_workarounds = 0;
 const char *logout_format;
 const char *imap_id_send, *imap_id_log;
+static struct timeval startup_timeval;
 
 static struct io *log_io = NULL;
 static struct module *modules = NULL;
@@ -311,6 +315,7 @@
 		return 1;
 	}
 
+	gettimeofday(startup_timeval, NULL);
 	/* NOTE: we start rooted, so keep the code minimal until
 	   restrict_access_by_env() is called */
 	lib_init();
@@ -327,6 +332,23 @@
 		io_loop_run(ioloop);
 	main_deinit();
 
+	struct rusage ru;
+	if (getrusage(RUSAGE_SELF, ru)  0)
+		i_error(getrusage() failed: %m);
+	else {
+		int diff = timeval_diff_msecs(ioloop_timeval, startup_timeval);
+
+		i_info(rusage: real=%d.%d user=%lu.%lu sys=%lu.%lu reclaims=%lu 
+			faults=%lu swaps=%lu bin=%lu bout=%lu signals=%lu 
+			volcs=%lu involcs=%lu,
+			diff/1000, diff%1000,
+			(long)ru.ru_utime.tv_sec, (long)ru.ru_utime.tv_usec,
+			(long)ru.ru_stime.tv_sec, (long)ru.ru_stime.tv_usec,
+			ru.ru_minflt, ru.ru_majflt, ru.ru_nswap,
+			ru.ru_inblock, ru.ru_oublock, ru.ru_nsignals,
+			ru.ru_nvcsw, ru.ru_nivcsw);
+	}
+
 	io_loop_destroy(ioloop);
 	lib_deinit();
 


[Dovecot] dovecot-antispam-plugin for dovecot-2.0

2010-11-17 Thread Antonio Perez-Aranda
I'm migrating a customized dovecot-antispam-plugin from
dovecot-antispam-plugn-1.3 which doesn't run in dovecot-2.0

Are any body using dovecot-antispam-plugin adapted to 2.0 from
mercurial on a production system?

This is the adapted version to dovecot 2.0
http://hg.dovecot.org/dovecot-antispam-plugin/


Re: [Dovecot] 2.0.7: emails read emails become unread

2010-11-17 Thread Timo Sirainen
On Tue, 2010-11-16 at 20:29 +0100, Kádár Tamás (KTamas) wrote:

 I'll turn on debug mode tomorrow and see if I get any errors related to 
 indexes.

You don't need to turn any debugs on to get error messages. Enabling
debugs in general doesn't help with non-reproducible problems.




Re: [Dovecot] Dovecot ldap connection reconnecting after inactivity

2010-11-17 Thread Timo Sirainen
On Tue, 2010-11-16 at 20:48 -0400, Aliet Santiesteban Sifontes wrote:
 Hi people, I have a setup configured using ldap, I have noticed that after a
 period of user inactivity if a client open connections to dovecot first
 attemps fails with this:
 
 Nov 16 19:34:43 cl05-02 dovecot: auth: Error:
 ldap(u...@xxx.xx.xx,172.29.13.26):
 Connection appears to be hanging, reconnecting
 
 After the connections to ldap has been restablished everything starts
 working ok, is this a expected behavior or I'm missing something??

You have a firewall or something that drops the connection after it has
been idling for a while. And when Dovecot continues trying to send
another LDAP request, it simply drops the packets instead of even
bothering to reject them. Not good.




Re: [Dovecot] local users and virtual users

2010-11-17 Thread Timo Sirainen
On Tue, 2010-11-16 at 12:31 +0100, Egbert Jan van den Bussche wrote:

 Is there a way to find local users in passdb when the come in with a 
 long name? Do I need another passwd like file  (i hope not...)

Currently you need to either modify sources or use passwd-file. Although
an ugly way would be to use something like:

passdb passwd-file {
  args = username_format=%n /etc/shadow
}
userdb passwd-file {
  args = username_format=%n /etc/passwd
}




Re: [Dovecot] add basic systemd support to dovecot

2010-11-17 Thread Timo Sirainen
On Sun, 2010-11-14 at 22:44 +0100, Christophe Fergeau wrote:

 Sorry for the delay in replying, I was away for a few weeks :) I have finally
 reworked the patch according to your feedback.

Committed, with some small changes:
http://hg.dovecot.org/dovecot-2.0/rev/84eb4afebc95

I hope it still works :)





Re: [Dovecot] \Noselect eliciting bug?

2010-11-17 Thread Timo Sirainen
On Fri, 2010-11-12 at 05:48 -0500, David Ford wrote:

 i can make directories willy nilly starting with a dot, but a -file-
 starting with a dot breaks my mailbox.  it doesn't affect any other
 folder, just $inbox
 
 2.0.6

I think v2.0.7 has fixed this?




Re: [Dovecot] Ongoing performance issues with 2.0.x

2010-11-17 Thread Ralf Hildebrandt
* Timo Sirainen t...@iki.fi:

  Is dstat --ipc a suitable to measure/see what's going on?
 
 That looks like it's about sysv IPC, which Dovecot doesn't use. Maybe
 some other options would show something useful, I don't know.

Well...
 
 Anyway, getting the rusage stats for v1.2 and comparing them to v2.0
 might show something useful. Could you patch your v1.2 with the attached
 patch and again get one day's stats through logparse.pl? (Need to change
 Debug - Info in its regexp)

Of course. I just recompiled the new 1.2.x version today :|


-- 
Ralf Hildebrandt
  Geschäftsbereich IT | Abteilung Netzwerk
  Charité - Universitätsmedizin Berlin
  Campus Benjamin Franklin
  Hindenburgdamm 30 | D-12203 Berlin
  Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
  ralf.hildebra...@charite.de | http://www.charite.de



Re: [Dovecot] Ongoing performance issues with 2.0.x

2010-11-17 Thread Ralf Hildebrandt
* Timo Sirainen t...@iki.fi:

 might show something useful. Could you patch your v1.2 with the attached
 patch 

Done. It seems to work:
Nov 17 20:50:08 postamt dovecot: IMAP(stxxxke): rusage: real=38.583 user=0.4000 
sys=0.80005 reclaims=485 faults=0 swaps=0 bin=0 bout=0 signals=0 volcs=23 
involcs=10
Nov 17 20:50:08 postamt dovecot: IMAP(stxxxke): rusage: real=38.507 user=0.4000 
sys=0.72004 reclaims=483 faults=0 swaps=0 bin=0 bout=0 signals=0 volcs=18 
involcs=4

 and again get one day's stats through logparse.pl? (Need to change
 Debug - Info in its regexp)


  next if (!/^.* ([\w-]+)(\([^\)]*\))?: (Debug: )?rusage: (.*)$/);

I see no Info in my log output, thus I changed 
Debug:  to
(Debug: )?

and 
  my ($type, $data) = ($1, $3);
to
  my ($type, $data) = ($1, $4);
since I added another pair of ()

The output looks plausible!

-- 
Ralf Hildebrandt
  Geschäftsbereich IT | Abteilung Netzwerk
  Charité - Universitätsmedizin Berlin
  Campus Benjamin Franklin
  Hindenburgdamm 30 | D-12203 Berlin
  Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
  ralf.hildebra...@charite.de | http://www.charite.de



[Dovecot] Debian package init scripts

2010-11-17 Thread Jan Behrend
Dearest list,

I am using dovecot with heartbeat-2 and I noticed that the init scripts
in the Debian packages from http://xi.rename-it.nl/debian/ do not
conform to the LSB standard:
http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
E.g. the return code for program is not running is not 3.

Is there is special reason for this?

Cheers Jan

-- 
MAX-PLANCK-INSTITUT fuer Radioastronomie
Jan Behrend - Rechenzentrum

Auf dem Huegel 69, D-53121 Bonn
Tel: +49 (228) 525 359, Fax: +49 (228) 525 229
jbehr...@mpifr-bonn.mpg.de http://www.mpifr-bonn.mpg.de


Re: [Dovecot] Ongoing performance issues with 2.0.x

2010-11-17 Thread Karsten Bräckelmann
On Wed, 2010-11-17 at 20:55 +0100, Ralf Hildebrandt wrote:
   my ($type, $data) = ($1, $3);
 to
   my ($type, $data) = ($1, $4);
 since I added another pair of ()

Just use non-capturing grouping instead. (?:foo)


-- 
char *t=\10pse\0r\0dtu...@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4;
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] add basic systemd support to dovecot

2010-11-17 Thread Christophe Fergeau
2010/11/17 Timo Sirainen t...@iki.fi:

 Committed, with some small changes:
 http://hg.dovecot.org/dovecot-2.0/rev/84eb4afebc95

Great, thanks a lot!


 I hope it still works :)

I'll let you know if it breaks ;)

Christophe