procmail
[Top] [All Lists]

Dumb FAQy wildcard question

1996-08-23 16:38:31
I'm trying to match one of two possible responses based on an  
impossible-to-determine number of ways to submit the request.

<WHEW!>

Let's say I had a Majordomo mailing list.

Let's say I wanted to pass an info file back to a potential subscriber based  
on the sender's request to subscribe.

Let's say I had a subscription clue--a weekly changing keyword--embedded in  
the instructions on subscribing (don't ask, just accept it and move on  :-)    
)

Let's say a proper request (sent by MJ because it's closed subscription)  
would look like:

Marke Robelsoy <robelsoy(_at_)provider(_dot_)isp> requests that you approve 
the following:

      subscribe list clue <robelsoy(_at_)provider(_dot_)isp>

If you approve, blah blah blah

Now, let's say that, without this clue (the way most of us usually do stuff),  
it would look like this:

Marke Robelsoy <robelsoy(_at_)provider(_dot_)isp> requests that you approve 
the following:

      subscribe list <robelsoy(_at_)provider(_dot_)isp>

If you approve, blah blah blah

What I want to do is return an info file to the subscriber saying, "Hey,  
dude, go look at the instructions on subscribing so you know what the clue is  
this week and how to use it when subscribing," if the clue isn't there.  And,  
if it is there, automatically send a message back to the Majordomo like so:

approve password subscribe list robelsoy(_at_)provider(_dot_)isp

Now, logic says I need a recipe that asks for a wildcard, but in the past  
I've been corrected for using wildcards improperly.  If it makes it any  
easier, let me build what I'm trying to say and invite correction:

:0
* !^From +YOUR_USERNAME
* !^Subject:.Re:
* !^FROM_DAEMON
* ^Subject:.APPROVE List
{
        :0
        * B ?? subscribe list <
        * B ?? subscribe list word-that-isn't-clue
        |(formail -r ; cat list_info) | $SENDMAIL -oi -t
#if the clue isn't right after the list name, send the info file

        :0
        * B ?? subscribe list Clue
        |(somehow get the right subscribe command sent to MJ)
# if the clue *IS* right after the name, auto-subscribe them
}

So, the long-winded question is, how can I say, "Match every string except  
this and send those people the info file.  Match *this* exact string and  
subscribe them."?

Thanks in advance.  Do a good job, and I have a tougher question for you  :-O


Carl

<Prev in Thread] Current Thread [Next in Thread>