On Thu, Aug 23, 2001 at 11:21:27AM -0600, Jason R. Mastaler wrote:
> On Thu, 23 Aug 2001, Mate Wierdl wrote:
> 
> >> Is there any way to determine what the *original* envelope
> >> recipient ([EMAIL PROTECTED]) was under a virtualdomain before
> >> qmail changed it to the local representation?
> > 
> > How about
> > 
> > echo $RECIPIENT | sed 's/jasonrm-flunkerz-//'
> 
> That will work only for my example case.  I need a general solution
> that will work for all virtualdomain users.

Then:

1)  parse the virtualdomain file:

PREPEND=
`awk -F: '$1 == "'$HOST'" { print $2 }' /var/qmail/control/virtualdomains`-

2) 

echo $RECIPIENT | sed "s/$PREPEND//"

Mate

Reply via email to