Hello all,

I've just moved my mail server (OpenBSD RELEASE, GENERIC.MP) from using
Courier IMAP & Cyrus SASL to Dovecot, with Postfix using dovecot-auth
for SASL. Things have been going OK since around OpenBSD 4.0 release
time until yesterday. Postfix, dovecot, amavisd et al are installed from
packages (-RELEASE).

/var/log/maillog is filling up with errors from Dovecot stating "too
many files open". Just recently, amavisd-new failed saying that it
couldn't open its lock file. The crazy part is, my server is very low
traffic. I have 2 mailboxes and about 300 messages / day. My two main
clients are a Windows XP box with Thunderbird 1.5, where I leave the
Thunderbird client up constantly. My second client is an OS X system
running Thunderbird 1.5 and it is open most of the day for my second
account.

My dovecot.conf is fairly consistent with the distributed example conf,
but I did add a section to support SASL queries from Postfix. Dmesg and
dovecot.conf are below.

How do I fix this? It seems like Dovecot is running away with LOTS of
open files, and the dovecot lists talk about file descriptor leaks for
later versions, as well as kqueue problems noted in the OpenBSD ports
tree CVS log. I've seen fstat reporting something like 36+ connections
for one of my mail accounts when it was just sitting idle. I could
increase ulimit like many MySQL users have in the past, but this seems
more like a runaway program to me.

Thanks,
Seth

DOVECOT:
Nov 30 14:05:48 thomas dovecot: pipe() failed: Too many open files in system

POSTFIX:
Nov 30 14:15:35 thomas postfix/smtpd[23505]: warning: TLS library
problem: 23505:error:02001017:system library:fopen:Too many open files
in
system:/usr/src/lib/libssl/src/crypto/bio/bss_file.c:278:fopen('/etc/postfix/certs/postfix_public_cert.pem','r')

AMAVISD:
Nov 30 15:00:03 thomas amavis[4879]: Net::Server: 2006/11/30-15:00:03
Couldn't open lock file "/var/amavisd/amavisd.lock" [Too many open files
in system]\\n  at line 244 in file
/usr/local/libdata/perl5/site_perl/Net/Server/PreForkSimple.pm

DMESG:
OpenBSD 4.0 (GENERIC.MP) #936: Sat Sep 16 19:27:28 MDT 2006
    [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Intel Pentium III ("GenuineIntel" 686-class, 512KB L2 cache) 594 MHz
cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE
real mem  = 536436736 (523864K)
avail mem = 481337344 (470056K)
using 4256 buffers containing 26923008 bytes (26292K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(00) BIOS, date 08/03/00, BIOS32 rev. 0 @
0xffe90, SMBIOS rev. 2.3 @ 0xfa1d0 (51 entries)
bios0: Dell Computer Corporation PowerEdge 2450
pcibios0 at bios0: rev 2.1 @ 0xf0000/0x10000
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfc320/144 (7 entries)
pcibios0: PCI Interrupt Router at 000:15:0 ("ServerWorks OSB4" rev 0x00)
pcibios0: PCI bus #0 is the last bus
bios0: ROM list: 0xc0000/0x8000 0xc8000/0x600
mainbus0: Intel MP Specification (Version 1.4) (DELL     POWEREDGE A6)
cpu0 at mainbus0: apid 1 (boot processor)
cpu0: apic clock running at 98 MHz
cpu1 at mainbus0: apid 0 (application processor)
cpu1: Intel Pentium III ("GenuineIntel" 686-class, 512KB L2 cache) 594 MHz
cpu1:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE
mainbus0: bus 0 is type PCI
mainbus0: bus 1 is type PCI
mainbus0: bus 2 is type PCI
mainbus0: bus 3 is type ISA
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 11, 16 pins
ioapic0: misconfigured as apic 0, remapped to apid 2
ioapic1 at mainbus0: apid 3 pa 0xfec01000, version 11, 16 pins
ioapic1: misconfigured as apic 0, remapped to apid 3
esm0 at mainbus0
esm0: PowerEdge 2450 Embedded Server Management 5.24
esm0: Primary System Backplane 1.16
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "ServerWorks CNB20LE Host" rev 0x06
pchb1 at pci0 dev 0 function 1 "ServerWorks CNB20LE Host" rev 0x06
pci1 at pchb1 bus 1
ppb0 at pci1 dev 2 function 0 "Intel i960 RM PCI-PCI" rev 0x02
pci2 at ppb0 bus 2
ahc0 at pci2 dev 4 function 0 "Adaptec AIC-7899 U160" rev 0x01: apic 3
int 15 (irq 11)
scsibus0 at ahc0: 16 targets
ahc1 at pci2 dev 4 function 1 "Adaptec AIC-7899 U160" rev 0x01: apic 3
int 14 (irq 10)
scsibus1 at ahc1: 16 targets
fxp0 at pci1 dev 8 function 0 "Intel 8255x" rev 0x08, i82559: apic 3 int
0 (irq 5), address 00:b0:d0:b0:bf:53
inphy0 at fxp0 phy 1: i82555 10/100 PHY, rev. 4
ami0 at pci0 dev 8 function 0 "AMI MegaRAID Series 428" rev 0x04: apic 3
int 6 (irq 11)
ami0: AMI 428, 32b, FW Uc77, BIOS v1.47, 32MB RAM
ami0: 2 channels, 16 targets, 1 logical drives
scsibus2 at ami0: 1 targets
sd0 at scsibus2 targ 0 lun 0: <AMI, Host drive #00, > SCSI2 0/direct fixed
sd0: 34556MB, 34556 cyl, 64 head, 32 sec, 512 bytes/sec, 70770688 sec total
vga1 at pci0 dev 14 function 0 "ATI Mach64 GY" rev 0x7a
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
piixpm0 at pci0 dev 15 function 0 "ServerWorks OSB4" rev 0x50: SMI
iic0 at piixpm0
"unknown" at iic0 addr 0x18 not configured
"unknown" at iic0 addr 0x1a not configured
"unknown" at iic0 addr 0x20 not configured
"unknown" at iic0 addr 0x21 not configured
"unknown" at iic0 addr 0x22 not configured
"unknown" at iic0 addr 0x23 not configured
"unknown" at iic0 addr 0x24 not configured
"unknown" at iic0 addr 0x25 not configured
"unknown" at iic0 addr 0x26 not configured
"unknown" at iic0 addr 0x27 not configured
"unknown" at iic0 addr 0x28 not configured
"unknown" at iic0 addr 0x29 not configured
"unknown" at iic0 addr 0x2a not configured
"unknown" at iic0 addr 0x2b not configured
"unknown" at iic0 addr 0x2c not configured
"unknown" at iic0 addr 0x2d not configured
"unknown" at iic0 addr 0x2e not configured
"unknown" at iic0 addr 0x2f not configured
"unknown" at iic0 addr 0x48 not configured
"unknown" at iic0 addr 0x49 not configured
"unknown" at iic0 addr 0x4a not configured
"unknown" at iic0 addr 0x4b not configured
"unknown" at iic0 addr 0x4c not configured
"unknown" at iic0 addr 0x4d not configured
"unknown" at iic0 addr 0x4e not configured
pciide0 at pci0 dev 15 function 1 "ServerWorks OSB4 IDE" rev 0x00: DMA
atapiscsi0 at pciide0 channel 0 drive 0
scsibus3 at atapiscsi0: 2 targets
cd0 at scsibus3 targ 0 lun 0: <TEAC, CD-224E, 3.7D> SCSI0 5/cdrom removable
cd0(pciide0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2
ohci0 at pci0 dev 15 function 2 "ServerWorks OSB4/CSB5 USB" rev
0x04pci_intr_map: bus 0 dev 15 func 2 pin 1; line 10
pci_intr_map: no MP mapping found
: irq 10, version 1.0, legacy support
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: ServerWorks OHCI root hub, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
isa0 at mainbus0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
biomask 0 netmask 0 ttymask 0
pctr: 686-class user-level performance counters enabled
mtrr: Pentium Pro MTRR support
dkcsum: sd0 matches BIOS drive 0x80
root on sd0a
rootdev=0x400 rrootdev=0xd00 rawdev=0xd02

DOVECOT.CONF:
base_dir = /var/dovecot/
disable_plaintext_auth = yes
ssl_cert_file = /etc/ssl/dovecotcert.pem
login_dir = /var/dovecot/login
login_user = _dovecot
default_mail_env = maildir:~/Maildir
namespace private {
   separator = .
   prefix = INBOX.
   inbox = yes
}
mmap_no_write = yes
mbox_write_locks = fcntl
protocol imap {
  imap_client_workarounds = delay-newmail outlook-idle netscape-eoh
tb-extra-mailbox-sep
}

protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}
protocol lda {
  postmaster_address = [EMAIL PROTECTED]
}
auth default {
  mechanisms = plain
  passdb passwd {
  }
  userdb passwd {
  }
  user = root
  socket listen {
    client {
      path = /var/spool/postfix/private/auth
      mode = 0660
      user = _postfix
      group = _postfix
    }
  }
}
dict {
}
plugin {
}

Reply via email to