On Fri, Apr 12, 2002 at 04:48:55PM -0400, Theo Van Dinter wrote: > Not really a SpamAssassin issue, but ... The procmailex man page has > half of this for the most part: > > I should probably write up a proper version of this for work -- SA is > installed, but there's no access to the home directory on the mail server, > so I have no way to update the preferences file. Hmmm.
Ok, here's the version I just put in place at work. It seems to work from the tests I've run, but let me know if it needs any work. :) Basically, send a message with the subject "user_prefs retrieve" to get a current copy of the preferences. "user_prefs update" will cause the body of the message to be stored as the user_prefs file, and then the update is returned. ------------------------ USER=`whoami` # Update user_prefs file ... USERPREFS=$HOME/.spamassassin/user_prefs :0 * ^Subject: user_prefs update * !^X-Loop: ${USER}@domain.com * !^FROM_DAEMON { :0bc: | mv -f $USERPREFS $USERPREFS.old && cat - > $USERPREFS :0fhW | formail -I "Subject: user_prefs retrieve" } # Retreive the user_prefs file ... :0 * ^Subject: user_prefs retrieve * !^X-Loop: ${USER}@domain.com * !^FROM_DAEMON { :0 fhW # reverse mailheader | formail -rA "X-Loop: ${USER}@domain.com" :0 ah | cat - $USERPREFS 2>&1 | $SENDMAIL $SENDMAILFLAGS -t } ------------------------ -- Randomly Generated Tagline: "The cardinal rule at our school is simple. No shooting at teachers. If you have to shoot a gun, shoot it at a student or an administrator." - "Word Smart II", from Princeton Review Pub. _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk