On 03/30/2011 11:43 AM, Victor Duchovni wrote:
On Wed, Mar 30, 2011 at 11:35:03AM -0500, Clayton Keller wrote:

I would like to allow the use of the recipient_delimiter, but rewrite the
address to ensure that it is delivered to the original address.

i.e. [email protected] ->  [email protected]

I would like this to be available to all addresses we accept mail for. To
do so I have been testing a regexp using virtual_alias_maps.

I would like to be able to rewrite the address as described, but properly
handle the recipient verification similar to that when the
virtual_alias_maps is not enabled. With this not enabled address which do
contain the recipient_delimiter are then properly known or unknown.

Is there a better way to handle the rewrite in my case rather than using
virtual_alias_maps?

Use virtual alias maps, but NOT regular expressions, rather:

     main.cf:
        indexed = ${default_database_type}:${config_directory}/
        virtual_alias_maps = ${indexed}virtual
        propagate_unmatched_extensions = canonical

     virtual:
        # Identity virtual alias mappings for all users that
        # don't already have other alias entries.
        #
        [email protected]                [email protected]
        ...


I thought about that as well. However, the list could grow to over 20k+ addresses.

Should I use the virtual_alias_maps rather than my use of:
        
        relay_recipient_maps = hash:/etc/postfix/relay_recipients

to handle the valid recipient checks? This would keep me from populating two hash'd indexed files with basically the same data.

That combined with your propagate_unmatched_extensions I think will do what I'm needing to do.


Reply via email to