OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: extracting username from e-mail address

From: Wietse Venema (wietseporcupine.org)
Date: Mon Aug 02 2004 - 13:55:07 CDT


Alex Stade:
> Hi,
>
> I have a firewall which is sequestered from my NIS environment and as
> such I want the firewall to forward all incoming mail to a mailserver
> which has the actual user accounts (it runs sendmail, but I doubt that's
> of relevance) where the actual delivery will take place. The problem I
> have is that I am trying to use a content_filter which requires that I
> expand the equivalent of ${user}, which I obviously can't do since the
> user in question doesn't exist in the firewall's passwd file.

In the pipe(8) mailer, ${user} does not have to be a local account.

        Wietse

> Is it possible to derive from say ${recipient} (which ought to be known
> on the firewall) the portion prior to the '' and assign that to some
> custom variable? Or is there some builtin function or variable that
> already does this?
>
> -Alex
>
>
>