OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Subject: Re: Domain Rewrite Question & size restrictions
From: Alain Thivillon (Alain.Thivillonhsc.fr)
Date: Sun Oct 01 2000 - 00:56:49 CDT


Tony Giacomo <tgiacomomindspring.com> écrivait (wrote) :

> bobcompany1.com -> bobmycompany.com
> joecompany2.com -> joemycompany.com
> tommycompany3.com -> tommymycompany.com
> tonymycompany.com -> tonymycompany.com (unchanged of course)
>

> What is the best way to do this (I hope it is possible) with postfix?
> Can someone provide me with a clear example or a good reference?

        Do you want rewrite envelope or both headers and envelope ?

The best way is to use canonical maps (to rewrite both envelope and
headers):

recipient_canonical_maps = hash:/etc/postfix/rewrite

(assuming you are using håsh on your OS and not DBM).

Then add these lines in /etc/postfix/rewrite:

blablacompany2.com anotherusercompany.com
company1.com company.com
company2.com company.com

Then: 'postmap /etc/postfix/rewrite;postfix reload'

Postfix should be prepared to accept mail for company1.com and
company2.com (relay_domains) and forward them to internal mail server
(using transport_maps or internal DNS).

You can do the same, without changing headers (only destination
envelope) by using virtual_maps.

> Also, is it possible to limit inbound mail to a maximum message size?

# Limits mail to ~8Mb
message_size_limit = 8000000

> Thanks for the help.

Postfix comes with a good documentation, maybe you can read
html/rewrite.html