OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Address rewrite oddity

From: mouss (usebsdfree.fr)
Date: Tue Apr 11 2006 - 16:18:15 CDT


Gary W. Smith wrote:
> Mouss,
>
> I setup my development environment and copied over the scripts from prod, pointed one of my personal domains over (one I don't get any real email at) and tested it with the cases I presented.
>
> First I must appologize for some things here. Our original configuration was setup some time ago and I think we just kept porting over the config files. The problem did exist before we upgraded to 2.2.8 (I think it was 2.1 or 2.0 before).
>
> Another thing that I found while probing around with some of the older configuration files is that we did not have a virtual domains list. I believe that this might have been the reason for the email requiring a second alias address to match the primary login id. Does this make sense?
>

while this is recommended, it's not related to the problem you described.

> The second issue is that we use mysql for the aliases table. The sql statement used to retrieve the virtual destination appends the domain name to the email address. The domain appened is the server name (which is derived from hostname). We removed that from the statement and now the multiple list of addresses works.

so that's your problem.

In the future, always use:
- 'postconf -n' to see what postfix is "thinking"
- 'postmap -q' to check what maps return.

In general, it is a bad idea to have too much grammar in your lookup,
unless yo know what you are doing. In particular, appending domains is
almost always a bad idea. domains must be provided by the sender. if
ever needed, let the MTA (postfix here) do it. but even then, this
should be "minimized".