In the dspam ebuilds theres this: diropts -m0770 -o dspam -g dspam dodir ${DATADIR} Unfortunately this makes dspam not read a users preferences (or anything else) from his datadir. From an strace of a dspam run: ... open("/etc/mail/dspam/data/tharkun/tharkun.prefs", O_RDONLY) = -1 EACCES (Permission denied) ... stat64("/", {st_mode=S_IFDIR|0755, st_size=624, ...}) = 0 stat64("/etc/", {st_mode=S_IFDIR|0755, st_size=3528, ...}) = 0 stat64("/etc/mail/", {st_mode=S_IFDIR|0755, st_size=128, ...}) = 0 stat64("/etc/mail/dspam/", {st_mode=S_IFDIR|0775, st_size=296, ...}) = 0 stat64("/etc/mail/dspam/data/", {st_mode=S_IFDIR|0770, st_size=120, ...}) = 0 stat64("/etc/mail/dspam/data/tharkun/", 0xbfff0a6c) = -1 EACCES (Permission denied) mkdir("/etc/mail/dspam/data/tharkun/", 0770) = -1 EACCES (Permission denied) ... write(2, "6594: [Sat Oct 23 14:53:25 2004]"..., 1106594: [Sat Oct 23 14:53:25 2004] Unable to create directory: /etc/mail/dspam/data/tharkun/: Permission denied ) = 110 stat64("/etc/mail/dspam/data/tharkun/DB_CONFIG", 0xbfff1940) = -1 EACCES (Permission denied) open("/etc/mail/dspam/data/tharkun/DB_CONFIG", O_RDONLY|O_LARGEFILE) = -1 EACCES (Permission denied) stat64("/var/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=96, ...}) = 0 stat64("/etc/mail/dspam/data/tharkun/__db.001", 0xbfff19d0) = -1 EACCES (Permission denied) open("/etc/mail/dspam/data/tharkun/__db.001", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0660) = -1 EACCES (Permission denied) ... ------ If DATADIR has permissions 775, everything works correctly. "Of course" you say, "you started dspam as your user instead of the user your mailsystem uses". Well my postfix starts the mailbox_command (in this case dspam) as the user that the mail is to be delivered to, too. And another thing, untrusted.mailer_args has to have o+r too.
Fixed in CVS, and committed dspam-3.2.0