FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

LinkBack Thread Tools
Old 04-11-2012, 04:04 PM
Matt Zagrabelny
Default ulimit not working for changing daemon limits


I am trying to increase the number of open files the sendmail daemon
may have. I have read that inserting a ulimit command in the init
script is the way to do this. I have adjusted the init script as so:

# head -n 25 /etc/init.d/sendmail
# Provides: sendmail
# Required-Start: $remote_fs $network $syslog
# Required-Stop: $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 1
# Short-Description: powerful, efficient, and scalable Mail Transport Agent
# Description: Sendmail is an alternative Mail Transport Agent (MTA)
# for Debian. It is suitable for handling sophisticated
# mail configurations, although this means that its
# configuration can also be complex. Fortunately, simple
# thing can be done easily, and complex thing are possible,
# even if not easily understood Sendmail is the *ONLY*
# MTA with a Turing complete language to control *ALL*
# aspects of delivery!

ulimit -n 4096 || echo "Setting ulimit failed for sendmail daemon."
echo Ulimit value for sendmail: `ulimit -n`

# Author: Marc-Christian Petersen <m.c.p@kernel.linux-systeme.com>

I then reboot the system and I see this in my boot log:

>From /var/log/boot:
Wed Apr 11 10:54:28 2012:
Wed Apr 11 10:54:28 2012: Ulimit value for sendmail: 4096
Wed Apr 11 10:54:28 2012:
Wed Apr 11 10:54:28 2012: Starting Mail Transport Agent (MTA): sendmail

However, it looks like the sendmail daemon is still stuck at a maximum
of 1024 open files:

# cat /proc/1634/limits | grep 'Max open files'
Max open files 1024 1024 file

Any ideas of how I can change the maximum open files for sendmail or
what I am doing wrong?

FWIW, I did tweak the clamav-milter daemon using a ulimit in the init
script and it seemed to work:

# cat /proc/1892/limits | grep 'Max open files'
Max open files 4096 4096 files

Thanks for the help!


To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAOLfK3WcK47og-RrqnCNh0BgO1ujs8uCvxOuT03YXqToDv8L-w@mail.gmail.com">http://lists.debian.org/CAOLfK3WcK47og-RrqnCNh0BgO1ujs8uCvxOuT03YXqToDv8L-w@mail.gmail.com

Thread Tools

All times are GMT. The time now is 03:49 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org