On Tue, Dec 22, 1998 at 07:22:24AM -0600, Mate Wierdl wrote:
> > > |condredirect LAST2=$(echo $HOST|awk -F"." '{print $(NF-1)"."$NF}'; [ "$LAST2
> > > = "somedom.com" ]
> 
> I never suggested this. The part starting with LAST2 is the *program* part
> of condredirect.  The full .qmail line looks like (all on one line!)
> 

My apologies... I see where you're going :)

> |condredirect $[EMAIL PROTECTED] 
> LAST2=$(echo $HOST|awk -F"." '{print $(NF-1)"."$NF}');
> [ "$LAST2" = = "somedom.com" ]
> 
> Here is what this does: Take the host part of the recipient address, test
> the last two component, if it is somedom.com, forward the message to 
> $[EMAIL PROTECTED], otherwise look at the next instruction in the .qmail file.
> 

Ok... I now understand. But I don't think it answers my original question 
(sorry :-)). Let me restate.

I receive mail for the virtual domain virtdom.com
All virtdom.com mail gets forwarded to forwarddom.com

But...

Mail addressed to stef.virtdom.com must be forwarded to stef.forwarddom.com and
mail addressed to bill.virtdom.com goes to bill.forwarddom.com where stef and
bill could in fact be anything.. I'll have no way of knowing :) 

Actually... as I write this I think that what I am looking for is...
(all one line)

|condredirect $LOCAL@$HOST3.another.com 
LAST2=$(echo $HOST|awk -F"." '{print $(NF-1)"."$NF}');
[ "$LAST2" = = "somedom.com" ]

Stef
-- 
Stefan Morrell                  | Still swearing at NT
Sysadmin Troll                  | Still struggling with UNIX
+44-(0)1924-502824 (W)          | Still enjoying it... must be mad!
[EMAIL PROTECTED]            | [EMAIL PROTECTED] 

Reply via email to