QUOTED_MESSAGE: > On 2004-05-25, 10:54:30 (-0700), David Fetrow > wrote: [SNIP] > > You're very welcome! :) > [SNIP] > > OK, this should be easy enough - the main question > would be how to pass the login name to the Sanitizer. > Currently the only information the Sanitizer has comes from > the message headers, and as you probably know from personal > experience, thanks to "bcc" and mailing lists and > such things, the user's login name may actually not occur > anywhere in the message headers. > > If you're running from within a procmail environment, > then it's easy enough to set an environment variable > containing the recipient's login name - but if you can set > an environment variable, you can just as easily customize > the sanitizer's config instead. An example of this is > actually implemented in the procmail ruleset I distributed > the other day, which is at: > > http://mailtools.anomy.net/dist/sanitizer.procmail > > If you take a look at that code, then you can see that > the procmail recipie defines a TMPDIR which is based on the > recipient's login name: > > TMPPDIR=/tmp/sanitizer.$LOGNAME > > This is then used to define a custom file_name_tpl when > the sanitizer is invoked: > > :0 f > |$ANOMY/bin/sanitizer.pl \ > "file_name_tpl > = $TMPDIR/eml-$DATE-$$"'-$$$-$F' \ > $SANCFG > \ > 'feat_log_stderr > = 1' \ > 2>$SANLOG > > > If you aren't running from within procmail, you could > almost certainly implement a similar strategy using a simple > shell-script wrapper around the sanitizer. > > Does this help solve your problem?
EKKI skrifa neitt hér:
© 2000-2002 Bjarni R. Einarsson / fyrirspurnir / skilmálar / þakkir /