Package: clamsmtp Version: 1.2-3 Severity: important Tags: patch
There is a file descriptor leak with clamsmtp that means it will run out of file descriptors after a period of time. By default Linux systems have a maximum of 1024 FD's per process and clamsmtp does not free file descriptors when an outbound connection is attempted but fails.
After a period of time these file descriptors will eventually run out and the process needs to be restarted as it will not accept any new connections.
Upsteam has been aware of this problem for the past couple of weeks, but has not emailed me since I reported this problem to him.
Please find below a patch to fix this issue:
diff -urN /home/masonc/clamsmtp-1.2/common/spio.c /home/masonc/clamsmtp-1.2-fix/common/spio.c
--- /home/masonc/clamsmtp-1.2/common/spio.c 2004-11-26 21:22:41.000000000 +0000
+++ /home/masonc/clamsmtp-1.2-fix/common/spio.c 2005-03-02 00:23:31.000000000 +0000
@@ -154,8 +154,10 @@
fcntl(fd, F_SETFD, fcntl(fd, F_GETFD, 0) | FD_CLOEXEC);
- if(connect(fd, &SANY_ADDR(*sany), SANY_LEN(*sany)) == -1) + if(connect(fd, &SANY_ADDR(*sany), SANY_LEN(*sany)) == -1) { + close_raw(&fd); RETURN(-1); + }
spio_attach(ctx, io, fd, NULL);
Thanks, Chris
-- System Information: Debian Release: 3.1 APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.10-exec-shield Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)
Versions of packages clamsmtp depends on:
ii clamav-daemon 0.81-2 antivirus scanner daemon
ii debconf [debconf-2.0] 1.4.30.11 Debian configuration management sy
ii libc6 2.3.2.ds1-20 GNU C Library: Shared libraries an
-- debconf information: clamsmtp/do-fixperms: false * clamsmtp/purge: yes
-- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]