Procmail: match pattern then pass to shell script
Hello
I have a simple lookup table as follows:Using Procmail, if I receive an email for bedrock.com, I want to check to see if it needs redirecting based on the information in my lookup table. I'm unsure of the best method. I tried egrep and awk but neither can accept a pattern from stdin, so I wrote a shell script (alias.bedrock is the lookup table): Code:
#!/bin/sh Code:
:0 wc: 1. Is this the best method to achieve this? 2. Is anyone able to offer some assistance please? Many thanks, Steve :) |
The value returned by a regular expression is stored in $MATCH
The value of the recipient of an email is stored in $2 The sender is stored in $1 Hope that helps |
All times are GMT -5. The time now is 01:50 AM. |