[H-GEN] Procmail testing

Greg Black gjb at gbch.net
Mon Jan 5 22:03:14 EST 2004


On 2004-01-05, Jason Parker-Burlingham wrote:
> Greg Black <gjb at gbch.net> writes:
> 
> > Yes, I think I advocated a test account myself -- and it's the
> > only way to test stuff that could easily see you losing actual
> > email that you wanted if you make some little mistake.
> 
> This really, really demonstrably did not work for me a few weeks ago.
> [Explanation and sample code snipped]
> Pissed off?  You bet.  I still have no idea how a rule that worked
> appeared to work perfectly well failed to work so spectacularly for a
> user with *much* less stringent requirements.

It didn't work because you didn't follow The Rule for a test
account.  In essence, it works like this: using some suitable
tool such as pax, make a complete copy of the account that you
will eventually apply your rules to, e.g.:

    cd /home
    mkdir foo
    cd bar
    pax -rwpe . ../foo
    
Then create a new user foo with the same uid as bar but with
/home/foo as their home directory.  Then test on foo.  When this
works, you'll also know it works for bar and you can then copy
the relevant stuff back there.

The alternative method is to copy user bar to a crash box and
test things there until they work.

In both the above scenarios, you probably will also have to edit
a few files in foo's home if they make references to things like
"/home/bar" or "bar at some.domain" rather than the safer "${HOME}"
and "${USER}@some.domain" -- but you knew that already ...

> Suggestions welcome, procmailrc available on request.

I'm not a procmail or bogofilter user, so I won't try to debug
the actual problem here.

Cheers, Greg



More information about the General mailing list