procmail
[Top] [All Lists]

Re: SWITCHRC

2002-09-27 20:58:52
Dallman Ross wrote,


| I have an alias in my shell that runs
|
| formail -s procmail TEST=y < somefile

| I have several recipes in my .procmailrc that deliver
| to $DEFAULT.  I was running in there until now something
| like this:
|
| :0:
| * some conditions
| * ! TEST ?? .
| $DEFAULT

That recipe should fail to match, since $TEST does have at least one
non-newline character.

| I decided to stop writing "* ! TEST ?? ." about five times
| and use a separate rcfile to make the delivery.  So I changed
| the recipes to something like:
|
| :0
| * some conditions
| { SWITCHRC = $SPOOL }

| Within the rc called $SPOOL is this:
|
| :0:
| * ! TEST ?? .
| $DEFAULT

Again, that won't do anything, because the condition will fail.

| Well, the mail does get delivered to $DEFAULT as expected.

It seems to me that it lands in $DEFAULT because procmail reaches the end
without delivery, not by dint of that recipe.  If you named some other
destination there besides $DEFAULT, the message should still land in $DEFAULT.

| procmail: No match on ! "."

Right.  There is no match on "does not have a character that isn't a newline."

| And, as I say, within $SPOOL, a query spat to the
| logs of the value of TEST does show up as I thought it should.

The value of $TEST won't show up in the log unless you log it:

LOG="The value of \$TEST is $TEST, honestly.
"

Verbose logging does not, in my experience, indicate the contents of variables
used as search areas.  My guess is that this has nothing to do with SWITCHRC.



_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • SWITCHRC, dman
    • Re: SWITCHRC, David W. Tamkin <=