On Wed, Jan 12, 2011 at 12:09:40AM +0100, Andy Spiegl wrote:

> > More specifically, "u...@example.com" is a defined email address and 
> > you want to accept all "prefix.u...@example.com" variants for valid
> > users and arbitrary prefixes?
>
> Exactly!
> 
> > You need a "tcp table", or MySQL virtual(5) table that will map alll
> > such inputs to just the bare "u...@example.com", but unlike a regexp
> > table, ONLY when the user is valid.
>
> Uhm, could you elaborate on this a bit.  I am still pretty new to
> complicated postfix setups...

Postfix recipient validation works by locating valid user addresses
in a suitable (address-class dependent) lookup table. Additionally,
regardless of the address class, the virtual(5) table can alias an
arbitrary recipient to one or more (hopefully valid) recipients.

        http://www.postfix.org/ADDRESS_CLASS_README.html
        http://www.postfix.org/ADDRESS_REWRITING_README.html
        http://www.postfix.org/virtual.5.html

So the best way to validate "prefix.u...@example.com" is to construct
a lookup table that will return "u...@example.com" for a lookup key
of the form "u...@example.com", but only if the user is valid.

For this the various *SQL languages tend to have primitives that can
search for substrings of the lookup key.

Finally, the "tcp table" feature of Postfix allows you to implement
a network service that applies suitable logic to derive a result
given a lookup key.

        http://www.postfix.org/tcp_table.5.html

-- 
        Viktor.

Reply via email to