Re: error writing to filter (bogofilter)

Christian Ebert <[email protected]>
Newsgroups gmane.mail.maildrop
Organization Black Trash Productions http://www.blacktrash.org
Message-ID <[email protected]>
* Sam Varshavchik on Saturday, June 15, 2013 at 21:38:39 -0400
> As the man page explains, it's not about manually fiddling with
> environment variables, it's the environment variables that maildrop
> sets when starting an external process, as described.
> 
> Ask yourself, if you don't know what the environment variables are,
> how do you find out? Obviously, run the "env" command. So, if you
> can't figure out, after reading the man page, what kind of environment
> variables an external process inherits, you just run the env command,
> and save its output into a file, then look at it.
> 
> Then you would read the rest of maildropfilter, looking for commands
> that execute a new process. You know about one of them, xfilter.
> However, obviously it wouldn't work here. But, reading the man page,
> you would come across the description of the backtick operator, which
> seems perfectly suitable for the job. So, you would have
> 
> `env >environ.save`
> 
> There you have, now you can look at it, and see what the environment
> variables are. Set your environment variables to be the same, pipe the
> suspect message to bogofilter, and see what happens. This would be the
> most accurate reproduction of the overall environment that bogofilter
> would run in, from the xfilter command.

You meant "pipe to maildrop", right?

Oh, right, you meant something easy ;-) I'd already done that -
put the env backticks right before the xfilter with bogofilter -
and compared to the output on my old machine where it works - it
is exactly the same:

SED=/usr/bin/sed
HOSTNAME=krille.blacktrash.org
SHELL=/bin/bash
UMASK=077
MAILDIRQUOTA=
SIZE=333285
LOCKEXT=.lock
LC_ALL=en_US.UTF-8
DEFAULT=/Users/chris/Maildir
MAILFILTER=.mailfilter
PATH=/bin:/usr/bin:/usr/local/bin
LOCKTIMEOUT=60
PWD=/Users/chris
REFORMAIL=/usr/local/bin/reformail
LANG=en_US.UTF-8
MAILDIRMAKE=/usr/local/bin/maildirmake
LINES=4455
SHLVL=1
HOME=/Users/chris
LOCKSLEEP=5
LOCKREFRESH=15
FROM=chris
LOGNAME=chris
MATCH=Message-ID:
SENDMAIL=/usr/sbin/sendmail -oi
_=/usr/bin/env

I have 3 rules and program var settings before the exfilter,
setting the backticks as very first rule yields this:

HOSTNAME=krille.blacktrash.org
SHELL=/bin/bash
UMASK=077
MAILDIRQUOTA=
SIZE=333309
LOCKEXT=.lock
LC_ALL=en_US.UTF-8
DEFAULT=/Users/chris/Maildir
MAILFILTER=.mailfilter
PATH=/bin:/usr/bin:/usr/local/bin
LOCKTIMEOUT=60
PWD=/Users/chris
LANG=en_US.UTF-8
LINES=4458
SHLVL=1
HOME=/Users/chris
LOCKSLEEP=5
LOCKREFRESH=15
FROM=xxxx@xxxx
LOGNAME=chris
SENDMAIL=/usr/sbin/sendmail -oi
_=/usr/bin/env


-- 
So dacht ich. Nächstens mehr.
_HÖLDERLIN:  HYPERION_  --->> http://www.blacktrash.org/hyperion

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.