On Tue, Dec 22, 1998 at 09:50:00AM +0000, Stefan Morrell wrote:
> > 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
> 

All the variables that can be used in .qmail files are explained in 

man qmail-command.  So when the recipient of an incoming message is 

[EMAIL PROTECTED], then $LOCAL=stefan.  

$[EMAIL PROTECTED] 

is the new address!

> > |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!)

|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.

Mate
---
Mate Wierdl | Dept. of Math. Sciences | University of Memphis  

Reply via email to