Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Virtual domains 2

Status
Not open for further replies.

Morsing

Technical User
Jun 25, 2002
881
GB

Hi,
I have recently switched to Postfix and need to use virtual domains. It's easy enough to recieve mail for virtual domains but how do I get it to rewrite the sender address when sending mail??

I can't find anything about this on the Internet but I really hope it's possible.

Cheers

Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
My Postfix book says that the postfix trivial-rewrite program does this.address re-writing stuff.

Relevant postfix parameters are :
masquerade_domains
allow_percent_hack
append_at_myorigin
append_dot_mydomain
virtual_maps
canonical_maps
recipient_canonical_maps
sender_canonical_maps

I've never tried this myself, and I haven't closely read that part of the Postfix book yet, but it might help you anyway.

G'luck.

 

Thanks for pointing me in the right direction. I had been looking at virtual_alias_domains and it also confused me that in the man page for masquerade_domains and ccanonical_maps it said only to use virtual_alias_domains for virtual domains. They're either wrong or something isn't quite working...

I couldn't get canonical_maps to work so the solution is to use virtual_alias_domain to map *incoming* recipient addresses and sender_canonical_maps to map *outgoing* adsresses.

Although then man pages clearly says that canonical_maps does the job of both sender_canonical_maps and recipient_canonical_maps it doesn't work.

Cheers

Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
Thanks Morsing, I was just about to ask the same question. You would think that this would be an easy thing to find on the Internet, but I couldn't find anything on it. In the main.cf file, I simply specified...

sender_canonical_maps = hash:/etc/postfix/sender_canonical

...and in the /etc/postfix/sender_canonical file...

user@domain1.com user@domain2.com

I issued a "postmap hash:/etc/postfix/sender_canonical" followed by "postfix reload" and all is well.


Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top