many users

tallison at tacocat.net tallison at tacocat.net
Mon Jun 7 18:58:01 CEST 2004


> On Mon, 7 Jun 2004 08:44:03 -0400 (EDT)
> tallison at tacocat.net wrote:
>
> ...[snip]....
>
>> This probably folds into the new features you have added for multiple
>> wordlists.  My point of confusion is the differentiation between $HOME
>> and$BOGOFILTER_DIR.
>>
>> Using $HOME gives me the freedom to tune my wordlist to my email.
>> Filespace hungry, but accurate.  Using $BOGOFILTER_DIR set's everyone
>> to one common wordlist/bogofilter.cf file.  Less filespace and less
>> accuracy.
>>  But probably much simpler to manage for 100 users.
>>
>> But the other question the comes up is: how do you execute bogofilter
>> for 10 virtual users if none of them have a $HOME directory (because
>> they have no /etc/passwd entry) and no ~/.procmailrc file?
>>
>> The only way I can imagine doing anything close to this is running
>> procmail from /etc/procmailrc and using the 'procmail -p' option to
>> pass in user information from postfix so that I can use the $USER to
>> identify their wordlist explicitly.
>
> Tom,
>
> When bogofilter runs, it checks for environment variables BOGOFILTER_DIR
> and HOME.  If both are defined, it uses the value of $BOGOFILTER_DIR to
> find/put the wordlist.  In a normal user environment, ~ and $HOME are
> the same.  As bogofilter is typically run from a script or procmail
> recipe, the environment variable can be set to the appropriate value.
> There's no requirement that $HOME be /home/$USER, though that's the
> normal situation.
>
> To work with 10 virtual users and (presumably) more than 1 directory, a
> table mapping userid to directory could be used, for example:
>
> ### bogofilter.map
> david   /var/spool/bogofilter/D
> tom     /var/spool/bogofilter/T
> luke    /var/spool/bogofilter/L
> don     /var/spool/bogofilter/D
>
>
> ### bogofilter.sh
>
> HOME=`cat bogofilter.map | grep -w ^$USER | awk '{print $2}'
> bogofilter ...
> _______________________________________________
> Bogofilter mailing list
> Bogofilter at bogofilter.org
> http://www.bogofilter.org/mailman/listinfo/bogofilter
>
>

This is getting pretty close...

I'm trying to set up imap authentication through pgsql and would like
avoid having to create a second (duplicate) authentication/user in
/etc/passwd.

However, if I could run one script (/etc/procmailrc) this might do it.



More information about the Bogofilter mailing list