Matt:
True.. And that username CAN be specified by spamc -u. Spamc passes it to spamd, spamd uses it when calling SQL.
Quoting from the SPAMc man page:
-u usernameThis argument has been semi-obsoleted. To have spamd use per-user-config files, run spamc as the user whose config files spamd should load. If youâre running spamc as some other user, though, (eg. root,mail, nobody, cyrus, etc.) then you can still use this flag.
In this situation this would work assuming that local delivery is happening through procmail or some other method whereby spamc is called with the username. The -u option for spamd does something very interesting. It takes the user portion of the address and stripes off the domain, so you get something like this:
"[EMAIL PROTECTED]" is passed to spamd as "hfc"Since I am running spamassassin site wide, and I have a number of domains hitting this mail server, I really need to have the entire email address represented...Here is what my database looks like:
mysql> use spamassassin mysql> show tables; +------------------------+ | Tables_in_spamassassin | +------------------------+ | userpref | +------------------------+ mysql> select * from userpref; +-----------------+----------------+--------------+--------+ | username | preference | value | prefid | +-----------------+----------------+--------------+--------+ | [EMAIL PROTECTED] | whitelist_from | [EMAIL PROTECTED] | 1 | | hfc | whitelist_from | [EMAIL PROTECTED] | 2 | +-----------------+----------------+--------------+--------+ 2 rows in set (0.00 sec)
It will find just hfc, but I really need it to find the whole to: address so that I can use this site wide.
Thanks for your help with HFC
What I want to have happen is each time SPAMd runs a distributed spam check I would like it to take the To: address, use that to make it's query to the SQL database, and then perform the actual filter process using userprefs held in the SQL database.Yes, and that's exactly what you'll get. The whole point of passing -u to spamc is to force-override what user_prefs the spamd instance will use.
smime.p7s
Description: S/MIME Cryptographic Signature