OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: trivial-rewrite regular expression substitution

From: David DeFranco (david.defrancogmail.com)
Date: Wed Oct 01 2008 - 14:38:36 CDT


Thanks for the answers.

This is an internal mail server for system generated mail, and I'm
re-writing the address before determining the transport so there's sanity
checking already in place. I would never consider this kind of setup on a
user/internet relay server. Heck, I wouldn't consider this solution in the
first place, but it's legacy ( currently on sendmailx ) and I have to make
it work. I wanted to avoid using an explicit map file because it could be
complex and has to be updated manually.

Is there another way to programmatically determine the next-hop?

Thanks again

On Wed, Oct 1, 2008 at 6:15 AM, Wietse Venema <wietseporcupine.org> wrote:

> David DeFranco:
> > I need data that's in the user part of the address to determine the
> > nexthop.
>
> With regexp substitution, this would give giving random users
> control over destination host names, host addresses, and TCP ports.
>
> Instead of using (regexp) to grab the nexthop from the recipient
> localpart or domain part, specify the string explicitly.
>
> /......(regexp)....../ ......$1......
>
> /......whatever....../ ......whatever......
>
> Repeat this for each such domain.
>
> Wietse
>