Re: [Dovecot] Source patches from Apple

2008-12-12 Thread Dave McGuire

On Dec 13, 2008, at 2:44 AM, Ralf Hildebrandt wrote:
  Thank you for the suggestion, but no, that doesn't work for me.   
I'm not

running a Linux box, I'm running Solaris...


It runs on Solaris.


and I'm not interested in running a firewall on my mail server.


You don't have to, you could simply nullroute the source IPs :)


  By having fail2ban manipulate the routing table a-la "route add  
"?


  -Dave

--
Dave McGuire
Port Charlotte, FL




Re: [Dovecot] Source patches from Apple

2008-12-12 Thread Ralf Hildebrandt
* Dave McGuire :

>   Thank you for the suggestion, but no, that doesn't work for me.  I'm not 
> running a Linux box, I'm running Solaris...

It runs on Solaris.

> and I'm not interested in running a firewall on my mail server.

You don't have to, you could simply nullroute the source IPs :)

-- 
Ralf Hildebrandt (ralf.hildebra...@charite.de)  snick...@charite.de
Postfix - Einrichtung, Betrieb und Wartung   Tel. +49 (0)30-450 570-155
http://www.arschkrebs.de  I'm looking for a job
Having an email problem is painful, but character-building.


Re: [Dovecot] Problem with imap running at 100%

2008-12-12 Thread nuitari-dovecot
I was doing some checks on a server and found an imap process running at 
100%, kill -9 was unable to kill it.


What OS/distribution and kernel version are you using?


Gentoo with 2.6.27-gentoo-r5
amd64, 2 dual core opterons

I think the user uses Outlook though, but I can check


Re: [Dovecot] Source patches from Apple

2008-12-12 Thread Dave McGuire

On Dec 13, 2008, at 12:43 AM, Luigi Rosa wrote:

  Timo, if I may make a request...Unless 1.2 will be released soon,
would you please also look into the possibility of integrating the  
"back
off after failed auth attempts" feature into the 1.1 code base?  I  
need

that badly here, to the point that I was considering writing such a
patch myself.  Hoards of little prepubescent miscreants won't stop
hammering on my pop3 port and it's driving me bananas.


In the meantime you can use fail2ban.


  Thank you for the suggestion, but no, that doesn't work for me.   
I'm not running a Linux box, I'm running Solaris...and I'm not  
interested in running a firewall on my mail server.


  I do appreciate the suggestion, though.

   -Dave

--
Dave McGuire
Port Charlotte, FL




Re: [Dovecot] Source patches from Apple

2008-12-12 Thread Luigi Rosa
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dave McGuire said the following on 13/12/08 06:41:

>   Timo, if I may make a request...Unless 1.2 will be released soon,
> would you please also look into the possibility of integrating the "back
> off after failed auth attempts" feature into the 1.1 code base?  I need
> that badly here, to the point that I was considering writing such a
> patch myself.  Hoards of little prepubescent miscreants won't stop
> hammering on my pop3 port and it's driving me bananas.

In the meantime you can use fail2ban.


Ciao,
luigi

- --
/
+--[Luigi Rosa]--
\

It is not the strongest of the species that survives, nor the most
intelligent, but the one most responsive to change.
--Charles Darwin
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklDS4IACgkQ3kWu7Tfl6ZSfjQCfai+yiXdvl0N9sOOYsNP3lnqh
CPQAniqly2wWSxhIx2d11Zt0t+hczVzq
=rWok
-END PGP SIGNATURE-


Re: [Dovecot] Source patches from Apple

2008-12-12 Thread Dave McGuire

On Dec 13, 2008, at 12:34 AM, Timo Sirainen wrote:

Hello Dovecot developers,

Apple has made and tested significant changes to Dovecot v1.1 and now
is ready to contribute them back to your open source project.  The
changes include:


Sounds great!


  Yes it does.  Thanks, Apple!


I could contribute these as one giant patch or as a sequence of
discrete patches.  How would you prefer to receive them?


Separate patches would be easiest. I'll most likely put only the bug
fixes to v1.1 and the rest to v1.2.


  Timo, if I may make a request...Unless 1.2 will be released soon,  
would you please also look into the possibility of integrating the  
"back off after failed auth attempts" feature into the 1.1 code  
base?  I need that badly here, to the point that I was considering  
writing such a patch myself.  Hoards of little prepubescent  
miscreants won't stop hammering on my pop3 port and it's driving me  
bananas.


 -Dave

--
Dave McGuire
Port Charlotte, FL



Re: [Dovecot] Problem with sieve: Keep: Generic Error

2008-12-12 Thread Timo Sirainen
Doesn't it log anything else? I think that "Generic error" is usually
logged only after the real error message.

On Fri, 2008-12-12 at 16:39 +0100, Thomas Siebert wrote:
> OK, now i compiled the latest debian version (1.1.7 from
> ftp://ftp.debian.org/debian/pool/main/d/dovecot/) myself and I still get the
> same error.
> 
> Any ideas, Timo? ;-)
> 
> 
>  
> > > -Original Message-
> > > From: dovecot-bounces+siebert+lists=et.rub...@dovecot.org
> > > [mailto:dovecot-bounces+siebert+lists=et.rub...@dovecot.org] On
> > Behalf
> > > Of Thomas Siebert
> > > Sent: Wednesday, December 03, 2008 3:15 AM
> > > To: dovecot@dovecot.org
> > > Subject: [Dovecot] Problem with sieve: Keep: Generic Error
> > >
> > > Hi,
> > >
> > > i came across a strange error message in Ubuntu 8.10s package
> > (Dovecot
> > > 1.1.4) regarding sieve:
> > >   sieve runtime error: Keep: Generic Error
> > >   sieve_execute_bytecode(/etc/dovecot/sieve/default.sievec) failed
> > >
> > > Note that the Sieve Scripts are basically executed fine and working
> > > fine.
> > > After a lot of testing I suppose the following: "keep" doesn't detect
> > > the
> > > private namespace I have to use (courier-compatibility...), thus
> > sieve
> > > fails
> > > to do "keep", the message is handed back to dovecot-deliver which
> > does
> > > a
> > > "keep"-similar action itself. If I have a script with "keep;" as the
> > > only
> > > command, I get this error message. If my script is totally blank
> > (i.e.
> > > implicit keep only), I get the same error. But if there's no implicit
> > > or
> > > explicit "keep", e.g. "fileinto INBOX;" as only command, there's no
> > > error.
> > > Also IMAP-Folders, e.g. "fileinto INBOX.Test", work.
> > >
> > > Unfortunately, "fileinto INBOX" as default is no option for me, as I
> > > use a
> > > delimiter and want to let deliver put the mails into the according
> > > IMAP-Folders.
> > >
> > > Is this a known bug? Any Ideas?
> > >
> > >
> > > Thanks,
> > > Thomas
> > >
> > >
> > > Here's my dovecot -n output:
> > > log_timestamp: %Y-%m-%d %H:%M:%S
> > > protocols: imap imaps pop3 pop3s
> > > ssl_cert_file: /etc/ssl/certs/mail_cip.pem
> > > ssl_key_file: /etc/ssl/private/mail_cip.key
> > > disable_plaintext_auth: no
> > > 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
> > > first_valid_uid: 501
> > > last_valid_uid: 501
> > > first_valid_gid: 501
> > > last_valid_gid: 501
> > > mail_privileged_group: mail
> > > mail_uid: 501
> > > mail_gid: 501
> > > mail_location: maildir:~/Maildir
> > > mail_executable(default): /usr/lib/dovecot/imap
> > > mail_executable(imap): /usr/lib/dovecot/imap
> > > mail_executable(pop3): /usr/lib/dovecot/pop3
> > > mail_plugins(default): acl quota imap_quota
> > > mail_plugins(imap): acl quota imap_quota
> > > mail_plugins(pop3): quota
> > > 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
> > > imap_client_workarounds(default): delay-newmail netscape-eoh
> > > imap_client_workarounds(imap): delay-newmail netscape-eoh
> > > imap_client_workarounds(pop3):
> > > pop3_uidl_format(default): %08Xu%08Xv
> > > pop3_uidl_format(imap): %08Xu%08Xv
> > > pop3_uidl_format(pop3): %f
> > > pop3_client_workarounds(default):
> > > pop3_client_workarounds(imap):
> > > pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
> > > namespace:
> > >   type: private
> > >   prefix: INBOX.
> > >   inbox: yes
> > >   list: yes
> > >   subscriptions: yes
> > > auth default:
> > >   mechanisms: plain login
> > >   passdb:
> > > driver: ldap
> > > args: /etc/dovecot/dovecot-ldap.conf
> > >   userdb:
> > > driver: prefetch
> > >   userdb:
> > > driver: ldap
> > > args: /etc/dovecot/dovecot-ldap.conf
> > >   socket:
> > > type: listen
> > > client:
> > >   path: /var/spool/postfix/private/auth
> > >   mode: 384
> > >   user: postfix
> > > master:
> > >   path: /var/run/dovecot/auth-master
> > >   mode: 384
> > >   user: vmail
> > > plugin:
> > >   quota: maildir:User quota
> > >   quota_rule: *:storage=100M
> > >   quota_rule2: *:messages=5000
> > >   quota_warning: storage=95%% /etc/dovecot/quota_warn_size.sh 95
> > >   quota_warning2: storage=90%% /etc/dovecot/quota_warn_size.sh 90
> > >   quota_warning3: storage=80%% /etc/dovecot/quota_warn_size.sh 80
> > >   quota_warning4: messages=95%% /etc/dovecot/quota_warn_count.sh 95
> > >   quota_warning5: messages=90%% /etc/dovecot/quota_warn_count.sh 90
> > >   quota_warning6: messages=80%% /etc/dovecot/quota_warn_count.sh 80
> > >   acl: vfile:/etc/dovecot/acls:cache_secs=300
> > >
> > 
> 


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


Re: [Dovecot] Source patches from Apple

2008-12-12 Thread Timo Sirainen
On Fri, 2008-12-12 at 14:24 -0600, Mike Abbott wrote:
> Hello Dovecot developers,
> 
> Apple has made and tested significant changes to Dovecot v1.1 and now  
> is ready to contribute them back to your open source project.  The  
> changes include:

Sounds great!

> I could contribute these as one giant patch or as a sequence of  
> discrete patches.  How would you prefer to receive them?

Separate patches would be easiest. I'll most likely put only the bug
fixes to v1.1 and the rest to v1.2.



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


Re: [Dovecot] Problem with imap running at 100%

2008-12-12 Thread Timo Sirainen

On Dec 12, 2008, at 10:07 AM, nuitari-dove...@nuitari.net wrote:

I was doing some checks on a server and found an imap process  
running at 100%, kill -9 was unable to kill it.


What OS/distribution and kernel version are you using?



PGP.sig
Description: This is a digitally signed message part


Re: [Dovecot] Dovecot imap processes pinning CPU

2008-12-12 Thread Timo Sirainen

On Dec 13, 2008, at 3:40 AM, David Rosenstrauch wrote:

In recent days, dovecot's "imap" processes keep getting stuck.  Each  
time I check my server (running dovecot 1.1.7) there's a bunch of  
"imap" processes (sometimes 2 of them, sometimes 4, sometimes 6)  
that are using all of the box's CPU.


And worse, there's no way to kill the processes either (neither kill  
-15 or kill -9 works), which means that I wind up having to reboot  
the box every time this happens.  REALLY irritating.


I wonder what's going on. You're the 3rd person who has started a  
thread about this within a few days. See the "unkillable imap  
process(es) with high CPU-usage" thread that's going on, with the  
exact same issue..

http://dovecot.org/list/dovecot/2008-December/035662.html

I don't normally even *see* the imap processes in htop, as I think  
they're pretty short lived.


Depends on the clients, but many clients keep IMAP connections open  
for a long time, so the imap processes should be long living.


What distribution and kernel version are you using?



PGP.sig
Description: This is a digitally signed message part


[Dovecot] Dovecot imap processes pinning CPU

2008-12-12 Thread David Rosenstrauch
In recent days, dovecot's "imap" processes keep getting stuck.  Each 
time I check my server (running dovecot 1.1.7) there's a bunch of "imap" 
processes (sometimes 2 of them, sometimes 4, sometimes 6) that are using 
all of the box's CPU.


And worse, there's no way to kill the processes either (neither kill -15 
or kill -9 works), which means that I wind up having to reboot the box 
every time this happens.  REALLY irritating.


I don't normally even *see* the imap processes in htop, as I think 
they're pretty short lived.  And I'm not sure what they're looping 
trying to do.  My debugging skills on Linux are a bit weak, and so I 
don't know how to look at the process and see what it's doing.


Also, not sure what's changed on my system to cause this, as this is
definitely a recent problem.  Maybe the upgrade to Thunderbird 2.0.0.18
(since I usually use T'Bird to access my email).  I don't seem to run 
into this problem when I use Squirrelmail.


Anyone have any idea what the problem might be?  Or, if not, then 
suggestions on how I might be able to debug the situation myself?


TIA,

DR



Re: [Dovecot] Source patches from Apple

2008-12-12 Thread Jurvis LaSalle
amazing.  we just finished hacking apple-user-mailattribute into our  
dovecot ldap conf last month.  do you have any sample confs posted?   
our OD usage atm is very crude...


JL

On Dec 12, 2008, at 3:24 PM, Mike Abbott wrote:


Hello Dovecot developers,

Apple has made and tested significant changes to Dovecot v1.1 and  
now is ready to contribute them back to your open source project.   
The changes include:


Scalability and performance:
allow pop/imap mail processes to handle multiple clients
larger listen queues

Stability and maintenance:
fix to allow cross-compilation
workarounds for Mac OS X bugs
a couple general bug fixes
symbol conflict resolution

Features:
Open Directory integration
back off after failed auth attempts
Mac OS X-specific
handle dynamic host name changes

I could contribute these as one giant patch or as a sequence of  
discrete patches.  How would you prefer to receive them?




smime.p7s
Description: S/MIME cryptographic signature


Re: [Dovecot] Source patches from Apple

2008-12-12 Thread rashantha de silva

three cheers to see apple working on this.
hopefully we will see it on 10.6 os x server

looking forward to it.

if there is any tutorial on installing it in conjunction 10.5 server  
it would be greatly appreciated.


rashantha de silva

On Dec 12, 2008, at 12:24 PM, Mike Abbott wrote:


Hello Dovecot developers,

Apple has made and tested significant changes to Dovecot v1.1 and  
now is ready to contribute them back to your open source project.   
The changes include:


Scalability and performance:
allow pop/imap mail processes to handle multiple clients
larger listen queues

Stability and maintenance:
fix to allow cross-compilation
workarounds for Mac OS X bugs
a couple general bug fixes
symbol conflict resolution

Features:
Open Directory integration
back off after failed auth attempts
Mac OS X-specific
handle dynamic host name changes

I could contribute these as one giant patch or as a sequence of  
discrete patches.  How would you prefer to receive them?




Re: [Dovecot] Source patches from Apple

2008-12-12 Thread Cor Bosman
Very cool to see Apple contribute to dovecot!

Cor


[Dovecot] Source patches from Apple

2008-12-12 Thread Mike Abbott

Hello Dovecot developers,

Apple has made and tested significant changes to Dovecot v1.1 and now  
is ready to contribute them back to your open source project.  The  
changes include:


Scalability and performance:
allow pop/imap mail processes to handle multiple clients
larger listen queues

Stability and maintenance:
fix to allow cross-compilation
workarounds for Mac OS X bugs
a couple general bug fixes
symbol conflict resolution

Features:
Open Directory integration
back off after failed auth attempts
Mac OS X-specific
handle dynamic host name changes

I could contribute these as one giant patch or as a sequence of  
discrete patches.  How would you prefer to receive them?

Re: [Dovecot] unkillable imap process(es) with high CPU-usage

2008-12-12 Thread Timo Sirainen

On Dec 12, 2008, at 6:02 PM, Arno Wald wrote:


Timo Sirainen wrote:
You could see if compiling Dovecot without inotify/dnotify support  
would

help. I can't really think of anything else.


I would like to try this and report the result. But there are so many
configure-options that I do not know which options (and how) I should
dis/enable. Could anybody give me the command line for the ./ 
configure?

That would be very kind.


configure --with-notify=none


Or does it make more sense to try another kernel first?


I guess that could also help.



PGP.sig
Description: This is a digitally signed message part


Re: [Dovecot] unkillable imap process(es) with high CPU-usage

2008-12-12 Thread Arno Wald
Timo Sirainen wrote:
> You could see if compiling Dovecot without inotify/dnotify support would
> help. I can't really think of anything else.

I would like to try this and report the result. But there are so many
configure-options that I do not know which options (and how) I should
dis/enable. Could anybody give me the command line for the ./configure?
That would be very kind.

Or does it make more sense to try another kernel first?

Thanks,
Arno


Re: [Dovecot] Problem with sieve: Keep: Generic Error

2008-12-12 Thread Thomas Siebert
OK, now i compiled the latest debian version (1.1.7 from
ftp://ftp.debian.org/debian/pool/main/d/dovecot/) myself and I still get the
same error.

Any ideas, Timo? ;-)


 
> > -Original Message-
> > From: dovecot-bounces+siebert+lists=et.rub...@dovecot.org
> > [mailto:dovecot-bounces+siebert+lists=et.rub...@dovecot.org] On
> Behalf
> > Of Thomas Siebert
> > Sent: Wednesday, December 03, 2008 3:15 AM
> > To: dovecot@dovecot.org
> > Subject: [Dovecot] Problem with sieve: Keep: Generic Error
> >
> > Hi,
> >
> > i came across a strange error message in Ubuntu 8.10s package
> (Dovecot
> > 1.1.4) regarding sieve:
> > sieve runtime error: Keep: Generic Error
> > sieve_execute_bytecode(/etc/dovecot/sieve/default.sievec) failed
> >
> > Note that the Sieve Scripts are basically executed fine and working
> > fine.
> > After a lot of testing I suppose the following: "keep" doesn't detect
> > the
> > private namespace I have to use (courier-compatibility...), thus
> sieve
> > fails
> > to do "keep", the message is handed back to dovecot-deliver which
> does
> > a
> > "keep"-similar action itself. If I have a script with "keep;" as the
> > only
> > command, I get this error message. If my script is totally blank
> (i.e.
> > implicit keep only), I get the same error. But if there's no implicit
> > or
> > explicit "keep", e.g. "fileinto INBOX;" as only command, there's no
> > error.
> > Also IMAP-Folders, e.g. "fileinto INBOX.Test", work.
> >
> > Unfortunately, "fileinto INBOX" as default is no option for me, as I
> > use a
> > delimiter and want to let deliver put the mails into the according
> > IMAP-Folders.
> >
> > Is this a known bug? Any Ideas?
> >
> >
> > Thanks,
> > Thomas
> >
> >
> > Here's my dovecot -n output:
> > log_timestamp: %Y-%m-%d %H:%M:%S
> > protocols: imap imaps pop3 pop3s
> > ssl_cert_file: /etc/ssl/certs/mail_cip.pem
> > ssl_key_file: /etc/ssl/private/mail_cip.key
> > disable_plaintext_auth: no
> > 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
> > first_valid_uid: 501
> > last_valid_uid: 501
> > first_valid_gid: 501
> > last_valid_gid: 501
> > mail_privileged_group: mail
> > mail_uid: 501
> > mail_gid: 501
> > mail_location: maildir:~/Maildir
> > mail_executable(default): /usr/lib/dovecot/imap
> > mail_executable(imap): /usr/lib/dovecot/imap
> > mail_executable(pop3): /usr/lib/dovecot/pop3
> > mail_plugins(default): acl quota imap_quota
> > mail_plugins(imap): acl quota imap_quota
> > mail_plugins(pop3): quota
> > 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
> > imap_client_workarounds(default): delay-newmail netscape-eoh
> > imap_client_workarounds(imap): delay-newmail netscape-eoh
> > imap_client_workarounds(pop3):
> > pop3_uidl_format(default): %08Xu%08Xv
> > pop3_uidl_format(imap): %08Xu%08Xv
> > pop3_uidl_format(pop3): %f
> > pop3_client_workarounds(default):
> > pop3_client_workarounds(imap):
> > pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
> > namespace:
> >   type: private
> >   prefix: INBOX.
> >   inbox: yes
> >   list: yes
> >   subscriptions: yes
> > auth default:
> >   mechanisms: plain login
> >   passdb:
> > driver: ldap
> > args: /etc/dovecot/dovecot-ldap.conf
> >   userdb:
> > driver: prefetch
> >   userdb:
> > driver: ldap
> > args: /etc/dovecot/dovecot-ldap.conf
> >   socket:
> > type: listen
> > client:
> >   path: /var/spool/postfix/private/auth
> >   mode: 384
> >   user: postfix
> > master:
> >   path: /var/run/dovecot/auth-master
> >   mode: 384
> >   user: vmail
> > plugin:
> >   quota: maildir:User quota
> >   quota_rule: *:storage=100M
> >   quota_rule2: *:messages=5000
> >   quota_warning: storage=95%% /etc/dovecot/quota_warn_size.sh 95
> >   quota_warning2: storage=90%% /etc/dovecot/quota_warn_size.sh 90
> >   quota_warning3: storage=80%% /etc/dovecot/quota_warn_size.sh 80
> >   quota_warning4: messages=95%% /etc/dovecot/quota_warn_count.sh 95
> >   quota_warning5: messages=90%% /etc/dovecot/quota_warn_count.sh 90
> >   quota_warning6: messages=80%% /etc/dovecot/quota_warn_count.sh 80
> >   acl: vfile:/etc/dovecot/acls:cache_secs=300
> >
> 




Re: [Dovecot] imap quota makes the Alarm clock expire

2008-12-12 Thread Magnus Appelquist
Well, I don't think it matter. Although I'm not sure that I've  
configured backend properly and I don't know if one backend excludes  
the others (i.e. they may be loaded anyway).


I've tried with three different backend (not at the same time):

plugin {
  quota = fs:user
}

plugin {
  quota = dirsize:user
  quota_rule = *:storage=1024M
}

plugin {
  quota = maildir:storage=10240:ignore=Trash
}

All three variants gives me the same behaviour.

/Magnus


12 dec 2008 kl. 16.13 skrev Timo Sirainen:


On Dec 12, 2008, at 5:06 PM, Magnus Appelquist wrote:


After a couple of seconds when I try to start dovceot, I get this:
r...@taleira:~# /etc/init.d/dovecot start
Alarm clock
If I uncomment the "imap_quota and quota" in dovecot.conf  
everything seem to work fine


What quota backend are you using? fs or maildir?

wait4(-1, 0xffbd7e9c, 0, NULL)  = ? ERESTARTSYS (To be  
restarted)

--- SIGALRM (Alarm clock) @ 0 (0) ---
+++ killed by SIGALRM +++


Dovecot doesn't have any calls to send SIGALRM signals.. If you're  
using fs quota with NFS rpc calls, that could cause it I guess,  
although I don't really understand why the signal would be sent to  
master process instead of just the child process.






Re: [Dovecot] imap quota makes the Alarm clock expire

2008-12-12 Thread Timo Sirainen

On Dec 12, 2008, at 5:06 PM, Magnus Appelquist wrote:


After a couple of seconds when I try to start dovceot, I get this:
r...@taleira:~# /etc/init.d/dovecot start
Alarm clock
If I uncomment the "imap_quota and quota" in dovecot.conf everything  
seem to work fine


What quota backend are you using? fs or maildir?

wait4(-1, 0xffbd7e9c, 0, NULL)  = ? ERESTARTSYS (To be  
restarted)

--- SIGALRM (Alarm clock) @ 0 (0) ---
+++ killed by SIGALRM +++


Dovecot doesn't have any calls to send SIGALRM signals.. If you're  
using fs quota with NFS rpc calls, that could cause it I guess,  
although I don't really understand why the signal would be sent to  
master process instead of just the child process.




PGP.sig
Description: This is a digitally signed message part


[Dovecot] imap quota makes the Alarm clock expire

2008-12-12 Thread Magnus Appelquist

Hello list,

I have a strange problem with dovecot and quota. The error message is  
not obvious...


After a couple of seconds when I try to start dovceot, I get this:
r...@taleira:~# /etc/init.d/dovecot start
Alarm clock

If I uncomment the "imap_quota and quota" in dovecot.conf everything  
seem to work fine:


protocol imap {
 listen = *:143
 ssl_listen = *:993
 # problem pa taleira01: konstigt...
 #mail_plugins = quota imap_quota
 mail_plugins =
}

I can't really figure out what's wrong. There's nothing in the log and  
dovecots error message is not so talkative. It took a while to figure  
out that it was the quota that caused the problem. I guess there is  
something with the underlying FS, but all kernel modules are loaded as  
far as I know. The maildir is on a nfs-mounted disk. The whole system  
is on a XEN machine and I have multipe copies of this image running on  
other machines with no problem.


Strace gives me:

r...@taleira:~# strace dovecot

lstat64("/var/run/dovecot//login", {st_mode=S_IFDIR|0750,  
st_size=60, ...}) = 0
open("/var/run/dovecot//login", O_RDONLY|O_NONBLOCK|O_LARGEFILE| 
O_DIRECTORY|0x8) = 4

fstat64(4, {st_mode=S_IFDIR|0750, st_size=60, ...}) = 0
getdents64(4, /* 3 entries */, 4096)= 88
lstat64("/var/run/dovecot//login/ssl-parameters.dat", {st_mode=S_IFREG| 
0644, st_size=230, ...}) = 0

getdents64(4, /* 0 entries */, 4096)= 0
close(4)= 0
geteuid32() = 0
pipe([4, 5])= 0
fcntl64(4, F_GETFD) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
fcntl64(5, F_GETFD) = 0
fcntl64(5, F_SETFD, FD_CLOEXEC) = 0
dup(2)  = 6
fcntl64(6, F_GETFD) = 0
fcntl64(6, F_SETFD, FD_CLOEXEC) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID| 
SIGCHLD, child_tidptr=0xf7e666f8) = 3343

close(6)= 0
close(5)= 0
alarm(5)= 0
wait4(-1, 0xffbd7e9c, 0, NULL)  = ? ERESTARTSYS (To be  
restarted)

--- SIGALRM (Alarm clock) @ 0 (0) ---
+++ killed by SIGALRM +++
Process 3342 detached


Finally, my system is:

r...@taleira:~# dovecot --version
1.1.4
r...@taleira:~# uname -a
Linux taleira 2.6.26-1-xen-amd64 #1 SMP Sat Nov 8 21:20:04 UTC 2008  
x86_64 GNU/Linux


Any ideas?

/Magnus




Re: [Dovecot] freebsd 7, panics - kqueue?

2008-12-12 Thread mike-maillist

i am tempted to simply disable kqueue in dovecot but am not sure
on the performance penalties.


kqueue is used for two things:
1) As regular ioloop, replacing select/poll. Not using kqueue here  
shouldn't make pretty much any performance difference.


2) As file notifier. When IMAP client starts IDLE command, kqueue  
notifies Dovecot immediately when new files are added to maildir.  
Disabling kqueue here doesn't make the performance worse, but it  
causes delays when notifying client about new mails (0 sec -> max. 30  
sec by default - configurable).


0xc04c4c4d is in knlist_remove_kq (/usr/src/sys/kern/kern_event.c: 
1615).


I don't know much about FreeBSD kernel either, but yes that does look  
like kqueue code.


Thanks so much for such a quick reply, will recompile now without kqueue
as i dont think the 30sec delay in incomming mail is an issue at all,

Mike.


Re: [Dovecot] freebsd 7, panics - kqueue?

2008-12-12 Thread Timo Sirainen
On Dec 12, 2008, at 4:01 PM,  > wrote:



i am tempted to simply disable kqueue in dovecot but am not sure
on the performance penalties.


kqueue is used for two things:

1) As regular ioloop, replacing select/poll. Not using kqueue here  
shouldn't make pretty much any performance difference.


2) As file notifier. When IMAP client starts IDLE command, kqueue  
notifies Dovecot immediately when new files are added to maildir.  
Disabling kqueue here doesn't make the performance worse, but it  
causes delays when notifying client about new mails (0 sec -> max. 30  
sec by default - configurable).


0xc04c4c4d is in knlist_remove_kq (/usr/src/sys/kern/kern_event.c: 
1615).


I don't know much about FreeBSD kernel either, but yes that does look  
like kqueue code.




PGP.sig
Description: This is a digitally signed message part


[Dovecot] Autocreate plugin for 1.1 - not compile in FreeBSD (gcc problem?)

2008-12-12 Thread Proskurin Kirill

Hello all.

I try to compile Autocreate plugin for 1.1 in FreeBSD 7.0-p6.
gcc version:

# gcc -v
Using built-in specs.
Target: i386-undermydesk-freebsd
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 4.2.1 20070719  [FreeBSD]

But it gives me a:

mx# sh -x patch.sh
+ export DOVECOT=/usr/ports/mail/dovecot/work/dovecot-1.1.7
+ gcc -fPIC -shared -g -Wall 
-I/usr/ports/mail/dovecot/work/dovecot-1.1.7 
-I/usr/ports/mail/dovecot/work/dovecot-1.1.7/src/lib 
-I/usr/ports/mail/dovecot/work/dovecot-1.1.7/src/lib-storage 
-I/usr/ports/mail/dovecot/work/dovecot-1.1.7/src/lib-mail 
-I/usr/ports/mail/dovecot/work/dovecot-1.1.7/src/lib-imap 
-DHAVE_CONFIG_H autocreate-plugin.c -o autocreate_plugin.so
In file included from 
/usr/ports/mail/dovecot/work/dovecot-1.1.7/src/lib/lib.h:24,

 from autocreate-plugin.c:22:
/usr/ports/mail/dovecot/work/dovecot-1.1.7/src/lib/compat.h:55:29: 
error: sys/sysmacros.h: No such file or directory

+ cp autocreate_plugin.so /usr/local/lib/dovecot/imap/autocreate_plugin.so
cp: autocreate_plugin.so: No such file or directory
mx#


I try do this at Debian Etch and all work well.

gcc version:
# gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v 
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr 
--enable-shared --with-system-zlib --libexecdir=/usr/lib 
--without-included-gettext --enable-threads=posix --enable-nls 
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-mpfr --with-tune=i686 
--enable-checking=release i486-linux-gnu

Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)


How can I compile it on FreeBSD? autocreate_plugin.so from Debian not 
working at FreeBSD.


--
Best regards,
Proskurin Kirill


[Dovecot] freebsd 7, panics - kqueue?

2008-12-12 Thread mike-maillist

Hi,

We have a issue with a server pretty much just running dovecot, there's
about 250gb of maildirs which has about 200 simultaneous connections to
it running on freebsd 7. The machine has stayed up for about 8 days before
it panics but sometimes panics after about 24 hours.

We are running a PAE kernel (with ULE scheduler) as the machine has 2 (4
core processors) and 8gb of ram, dovecot is compiled with kqueue support
which i suspect is causing the panics.  We are currently trying with a
GENERIC kernel to see if this addresses the issue but looking back through
the dovecot lists there seems to be some issue with kqueue, freebsd and
dovecot, i am tempted to simply disable kqueue in dovecot but am not sure
on the performance penalties.

Please see the freebsd pr for the kgdb dumps - for both dumps the current
process was imap, and the second one seemed to hint towards a problem with
kqueue but im not a c or kernel hacker:

http://www.freebsd.org/cgi/query-pr.cgi?pr=129550

--- snip of what i think is relevent from the dump ---

(kgdb) list *0xc04c4c4d
0xc04c4c4d is in knlist_remove_kq (/usr/src/sys/kern/kern_event.c:1615).
1610 if (!kqislocked)
1611 KASSERT((kn->kn_status & (KN_INFLUX|KN_DETACHED)) == KN_INFLUX,
1612 ("knlist_remove called w/o knote being KN_INFLUX or already removed"));
1613 if (!knlislocked)
1614 knl->kl_lock(knl->kl_lockarg);
1615 SLIST_REMOVE(&knl->kl_list, kn, knote, kn_selnext);
1616 kn->kn_knlist = NULL;
1617 if (!knlislocked)
1618 knl->kl_unlock(knl->kl_lockarg);
1619 if (!kqislocked)
(kgdb)


mail# dovecot -n
# 1.1.7: /usr/local/etc/dovecot.conf
# OS: FreeBSD 7.0-RELEASE-p6 i386
ssl_cert_file: /etc/ssl/dovecot.pem
ssl_key_file: /etc/ssl/dovecot.pem
login_dir: /var/run/dovecot/login
login_executable: /usr/local/libexec/dovecot/imap-login
login_process_per_connection: no
login_processes_count: 20
login_max_processes_count: 256
login_max_connections: 512
max_mail_processes: 1024
verbose_proctitle: yes
first_valid_uid: 89
last_valid_uid: 89
first_valid_gid: 89
last_valid_gid: 89
mail_privileged_group: mail
imap_client_workarounds: delay-newmail outlook-idle netscape-eoh
tb-extra-mailbox-sep
auth default:
  passdb:
driver: vpopmail
  userdb:
driver: vpopmail



Re: [Dovecot] unkillable imap process(es) with high CPU-usage

2008-12-12 Thread Timo Sirainen
On Fri, 2008-12-12 at 10:10 +0100, Arno Wald wrote:
> Timo Sirainen wrote:
> > Anyway, Arno's ps output showed the process to be in R state, not in D
> 
> It is definitely the R state.
> 
>   PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
>  6717 arno  20   0  2964 1608 1192 R  100  0.2   1158:05 imap
> 
> btw: I have switched from imaps to imap protocol, because I thought this
> might change something. But it does not.

You could see if compiling Dovecot without inotify/dnotify support would
help. I can't really think of anything else.

To me it really seems like a kernel bug if a process in R state can't be
killed.


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


Re: [Dovecot] Problem with imap running at 100%

2008-12-12 Thread Timo Sirainen
On Fri, 2008-12-12 at 03:07 -0500, nuitari-dove...@nuitari.net wrote:
> I was doing some checks on a server and found an imap process running at 
> 100%, kill -9 was unable to kill it.

See the subject "unkillable imap process(es) with high CPU-usage" thread
that's going on, with the exact same issue..
http://dovecot.org/list/dovecot/2008-December/035662.html



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


Re: [Dovecot] Problem with imap running at 100%

2008-12-12 Thread Edgar Fuß
> an imap process running at 100%, kill -9 was unable to kill it.
I'm no a Linux expert, but from a BSD perspective, that seems to contradict 
each other. Either the process is doing an uninterruptable sleep or consumes 
CPU time. As said, I'm not a Linux expert, but can you find out what state the 
process is in and, if waiting, what's the wait channel?



Re: [Dovecot] unkillable imap process(es) with high CPU-usage

2008-12-12 Thread Arno Wald
Timo Sirainen wrote:
> Anyway, Arno's ps output showed the process to be in R state, not in D

It is definitely the R state.

  PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
 6717 arno  20   0  2964 1608 1192 R  100  0.2   1158:05 imap

btw: I have switched from imaps to imap protocol, because I thought this
might change something. But it does not.

Bye,
Arno


[Dovecot] Problem with imap running at 100%

2008-12-12 Thread nuitari-dovecot
I was doing some checks on a server and found an imap process running at 
100%, kill -9 was unable to kill it.


hammer ~ # lsof -p 1918
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFFNODE NAME
imap1918 vpopmail  cwdDIR8,2   96  539699 
/var/vpopmail/domains/maxpersuasion.com/kec
imap1918 vpopmail  rtdDIR8,2  856   2 /
imap1918 vpopmail  txtREG8,2   851832 3646578 
/usr/libexec/dovecot/imap
imap1918 vpopmail  memREG8,2  1330888 2752698 /lib64/libc-2.8.so
imap1918 vpopmail  memREG8,214520 2753738 /lib64/libdl-2.8.so
imap1918 vpopmail  memREG8,2   114960 2753800 /lib64/ld-2.8.so
imap1918 vpopmail2w  FIFO0,5  0t0  574015 pipe
imap1918 vpopmail6u  0,60  10 anon_inode

strace & gdb can't seem to attach to the process.

The process was started 2 days ago.

It is dovecot 1.1.6