[Omail-ospam] nospamh - didn't take user name
Brought to you by:
swix
From: Markus L. <ml...@vt...> - 2003-06-07 15:12:05
|
Hi all, I noticed that my setup where I only use ifspamh to scan and directly pass on to vdeliver didn't use the user prefs as set in the mysql db. spamd always tried to load the settings for the vmailmgr base user (which is executing ifspamh/spamc) from the DB, where as it should have tried to load the settings based on the supplied email address. I traced the problem to the if statement in ifspamh that checks if MAILUSER was supplied or not, I have no clue why it fails, as the MAILUSER variable is set and the similar if statement right before that checks for the presence of the FORWARD email address works. As a work around I simply commented-out the if statement that gives me trouble (at about line 95 in my modified ifspamh (see previous post): # we used to skip 'From ' - the 1st line that got added by spamd/spamc # but it seems newer versions don't add it (and SA 2.50 adds a 3 line # Received header) #if [ -z "$MAILUSER" ]; then output="`$SPAMC -u $MAILUSER | sed '1{/^From .*/d;}'`" #else # output="`$SPAMC | sed '1{/^From .*/d;}'`" #fi Now it works fine (if you always supply the MAILUSER as a second parameter to ifspamh) Hope this is of use to somebody else Markus |