$BOGOFILTER_DIR has no effect, rc example: bogofilter_dir not recognized
Christian Ebert
bcc at phloxic.productions
Tue Apr 22 10:45:25 CEST 2025
* Matthias Andree via bogofilter on Tuesday, April 22, 2025 at 01:12:20 +0200:
> Am 22.04.25 um 00:57 schrieb Christian Ebert:
[...]
>> grep -F BOGOFILTER_DIR ~/.bashrc
>> BOGOFILTER_DIR=${XDG_DATA_HOME}/bogofilter/bogofilter
>> export BOGOFILTER_DIR
>> $ echo $BOGOFILTER_DIR
>> /Users/chris/.local/share/bogofilter/bogofilter
>> $ bogofilter -QQ | grep -F bogofilter-dir
>> bogofilter-dir = /Users/chris/.local/share/bogofilter/bogofilter
>> ls ~/.bogofilter
>> ls: /Users/chris/.bogofilter: No such file or directory
>> $ mail chris
>> Subject: test
>> test
>> .
>> EOT
>> ~$ ls ~/.bogofilter/
>> wordlist.lmdb wordlist.lmdb-lock
>
> Unless MacOS does Stupid Things™, the mail *delivery* runs through a
> different user account (some system account) and environment, and that
> system user will not heed your user's (chris's) local settings and
> also likely not use bash as a shell (if any at all).
>
> You need to check what your mail transfer agent is, how exactly it
> invokes bogofilter and how that (system) user account is configured. I
> don't know MacOS, so I have no idea how it delivers mail.
$ postconf mailbox_command
mailbox_command = /usr/local/bin/maildrop -d ${USER}
(postifx shipped by macos, but own LaunchDaemon(s), also
clamdscan)
Which is why I naively tried to set the environment in my
maildrop mailfilter in my equally naive understanding of the
first paragraph of the SECURITY section in man 1 maildrop.
Again naively, I also temporarily uninstalled bogofilter from
/usr/local and installed it at $HOME. Works fine, but also
ignores BOGOFILTER_DIR.
Anyway, it's nothing urgent, I can make everything work via
configuration files. I was just curious.
--
LAST SHIP HOME
The circumnavigation of the world of the Peter von Danzig
Winner of the German Ocean Film Award 2019
Watch the movie in full online: https://lastshiphome.de/en/movie
More information about the bogofilter
mailing list