> Now to forward all the mail to a
> different host with the same local part, for each host in
> *.somedom.com put
> 
> |condredirect $[EMAIL PROTECTED] [ "$HOST" = "somedom.com" ]
> |condredirect $[EMAIL PROTECTED] [ "$HOST" = "host1.somedom.com" ]
> ...


Or possibly for *@*.somedom.com

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

>From the man page, 

in .qmail: |condredirect newaddress program [ arg ]

Perhaps I'm just being particularly dense. But I don't see how the constructs
you've suggested fit the model stated in the man page. Also I don't understand
what the different variables ($LOCAL & $HOST in the top examples, $LAST2 and 
$HOST in the lower one) are doing, how do they create a command line that fits
the model?

I can grasp the idea that based on the return code from the program we decide
whether or not to redirect the email. 
I can grasp how your awk statement is constructing a hostname, although it seems
to me that you'll only get the last two elements of a hostname, which probably
won't be enough, but I'll worry about that once I understand what you're doing
with the condredirect :). 

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