[Dovecot] Dovecot / OS X 10.4 Mail.app and "Too Many Opened files" error message ?

Xavier Beaudouin kiwi at oav.net
Fri Sep 14 21:48:36 EEST 2007

(replying to myself)

> After a long time, the OS X client say error : "Too Many opened  
> files".

Seems that OS X has stupidly low number of files that can be opened...

$ ulimit -a
open files                    (-n) 256

On my MacBook Pro....

This is bloody low....

So I've figured to change this limit globaly, but it seems that OS X  
don't have any limits.conf or default values....

This kinda strange..

So I decided to do some local fixe for Mail.app  only :

in /Applications/Mail.app/Contents/MacOS/
$ sudo mv Mail Mail.orig
and ...
Create a Mail file with this following content :

# thanks to http://www.amug.org/~glguerin/howto/More-open-files.html

# To understand this, read 'man sh' below "substring processing".
# This can also be accomplished with the 'dirname' command,
# but it may not be installed.

# This should be the name of your native Java-app's executable.

# Set all desired soft-limits here.  See 'ulimit' in 'man sh'.
ulimit -S -n 1000

# Execute the Java-app in the current process.  See 'exec' in 'man sh'.
exec "$here/$cmd" "$@"

$ sudo chmod +x Mail

and this all...

FYI Mail.app is really strange thing....

$ lsof | grep Mail.orig | wc -l

Mostly all libraries and TCP connection to mail server...

Maybe this can be added to Wiki even if it is not too mutch dovecot  
related, but can be usefull for people like me that does have lots of  


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3776 bytes
Desc: not available
Url : http://dovecot.org/pipermail/dovecot/attachments/20070914/524bf9d8/attachment-0001.bin 

More information about the dovecot mailing list