Re: error writing to filter (bogofilter)

Sam Varshavchik <[email protected]>
Newsgroups gmane.mail.maildrop
Message-ID <[email protected]>
Christian Ebert writes:

> * Sam Varshavchik on Saturday, June 15, 2013 at 20:14:23 -0400
> > I already explained how conditions are not the same, namely the
> > environment variables that are set or cleared, by maildrop, for
> > started processes. As I wrote before, see "Environment" in the
> > maildropfilter man page, and replicate how bogofilter gets invoked, by
> > setting or clearing the same environment variables, and piping the
> > message to its standard input.
>
> Then please be so kind and tell me how exactly I can achieve
> this. I am not aware of having fiddled with any vars - especially
> not compared to my previous machine where the exact same setup
> worked. I just compared the output of env with the old machine
> and could not spot any difference.

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.

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

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

_______________________________________________
Courier-maildrop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (GNU/Linux)

iEYEABECAAYFAlG9Fx8ACgkQx9p3GYHlUOJQTQCeItaGqIxaFUybK8Cu0CXnqdST
nNAAnjGfE8LZ1yCf9BikhUZUDfIIKDTz
=KoKz
-----END PGP SIGNATURE-----
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.