Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a Postfix server that I am using as an outbound SMTP gateway for a mail server. The postfix server has a name such as smtp.domain1.com.

Now, I have users on my mail server that are trying to send messages to poorly formatted addresses, such as to user@domin. My postfix server is rewriting the address as user@domain.domain1.com.

How can I configure postfix to not rewrite the address and bounce the message if the address is not complete? I believe this can be done with the append_at_myorigin paramter, but the Postifx documentation says that this feature must not be turned off.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

If you really want to stop postfix from rewriting addresses on any "local" mail, use

local_header_rewrite_clients =

"local" in this context means mail sent from the machine itself, and any clients that connect from IP addresses in "$mynetworks", which would likely be the case if this is an internal->external SMTP gateway.

The default setting is

local_header_rewrite_clients = permit_inet_interfaces

which causes postfix to rewrite addresses for mail when the client IP matches $inet_interfaces.

There are a bunch of other options to this parameter, which might allow you to be a bit more specific, cf. local_header_rewrite_clients docs on the postfix website

share|improve this answer
    
This actually is not local mail. This is a relay server for an external mail server. –  Alex Mar 23 '11 at 15:28
    
By default, postfix will rewrite headers for clients it considers "local" but won't for "remote" clients, so long as "remote_header_rewrite_domain" is empty (the default). If you're relaying mail from clients that match $mynetworks, those are considered local. Is that the case? –  malcolmpdx Mar 23 '11 at 15:33
    
Ok, yes it is relaying from clients that match $mynetworks. Thanks for the clarification. –  Alex Mar 23 '11 at 15:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.