On 9/29/05 10:35 AM, "Dan Horne" <[EMAIL PROTECTED]> wrote: > Setting up a new mailserver on FreeBSD 5.4 using postfix and maildrop > which calls spamc. So far it is working like this: All users are > virtual and need per-user filtering. Postfix and maildrop get user > information from a mysql db, so once postfix passes the email to > maildrop: > > 1) maildrop calls spamc with the following line in maildroprc: > > exception { > xfilter "/usr/local/bin/spamc -u $LOGNAME " > } > > 2) /usr/local/etc/rc.d/sa-spamd.sh (the FreeBSD startup script for > spamd) has the following line: > > spamd_flags=${spamd_flags:-"-c -d -r ${spamd_pidfile} > --virtual-config-dir=/home/vmail/%d/%l/.spamassassin "} > > > When sending an email I get the following in the logs: > > spamd: handle_user unable to find user: [EMAIL PROTECTED] > spamd: still running as root: user not specified with -u, not found, or > set to root, falling back to nobody at /usr/local/bin/spamd line 1147, > <GEN10> line 4. > > So, if I am reading this right, maildrop is passing the correct user via > the -u switch ([EMAIL PROTECTED]), so spamd should try to get its > settings from /home/vmail/example.com/validuser/.spamassassin. However, > for some reason it is not able to do so. > > Basically I need per-user settings running spamd with only virtual users > on the box, and the method of doing that is not as important as the end > result. So if there is a BETTER way of running spamc with per-user > settings in my config, please let me know. Otherwise, can someone help > me understand why I am getting the message "handle_user unable to find > user: [EMAIL PROTECTED]" in the logs? > > Thanks, > > Dan Horne > It looks to me like you don't have per-user settings in your mysql db for that particular user. I do domain-based settings so I always get that message in my logs. It will say that if there are no rows in the db with that user's email address, and is normal. However, the spamd as root thing is a separate issue. -- Matthew Yette Senior Engineer (NOC/Operations) M.A. Polce Consulting 315-838-1644