On Nov 16, 2006, at 15:47, Stephen Warren wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Doug Hardie wrote: >> Setting the HOME env variable before calling tmda-filter does >> work. I >> didn't see HOME used in the code, but it must be there somewhere. > > It's used internally by Python itself. > >> That is the easiest way to get NIS users to work. I decided to >> create my own wrapper for tmda-filter as procmail and others >> introduce >> yet another layer of overhead with reading the entire message and >> processing it just to set the env variables. > > I'm still confused why HOME isn't being automatically set correctly. > > Do you believe that you need to write a wrapper to set HOME because: > > 1) You tested invoking tmda-rfilter from sendmail and it didn't work,
Sendmail is only setting one env variable (name forgotten but its value is "sendmail"). It does not set HOME. > or > 2) You tested it on the command-line when HOME was set incorrectly, > and > it didn't work? > > If (2), then you really need to try (1) and see if sendmail is already > doing the right thing - it's likely quite difficult to correctly and > accurately manually simulate the environment that sendmail creates > when > it invokes tmda-rfilter. Getting rid of all the env variables was tricky. > > That said, if you don't want to use procmail/maildrop, given that > you're > using sendmail, then I guess you need *some* kind of wrapper between > sendmail and tmda-rfilter to set SENDER, RECIPIENT, and EXTENSION, as > described at: > > http://wiki.tmda.net/ServerConfiguration#sendmail > > As a first step, however, I really would suggest getting everything > working the "standard" way using procmail, and testing everything > under > for real using the MTA (if only for test email accounts), before > spending time re-writing procmail as an optimization. The wrapper is only about 25 lines of c code. Very straight forward once you know HOME has to be set. That should be included in the documentation rather than presuming its set magically by something else. > _____________________________________________ tmda-users mailing list (tmda-users@tmda.net) http://tmda.net/lists/listinfo/tmda-users