OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: Advanced config help needed

From: Noel Jones (njonesmegan.vbhcs.org)
Date: Tue Aug 14 2007 - 09:30:31 CDT


At 10:35 PM 8/13/2007, Brano wrote:
>>At 09:35 PM 8/13/2007, Brano wrote:
>>>I'd appreciate help with my config (can't figure it out for hours):
>>>- running postfix as front-end for Scalix server on the same linux box
>>>- Scalix is listening on port 10026
>>>- the system is receiving mails for domain1.com and domain2.com
>>>
>>>Everything works fine, ALL e-mails are passed to Scalix however I need
>>>one enhancement:
>>>- I need all e-mails for certain users (i.e. root or postmaster
>>>domain1 or domain2) to be delivered to local /var/spool/mail/root (or
>>>postmaster) instead to Scalix (that is not configured to handle these
>>>users and it's bouncing it back)
>>>
>>>My confing as follows:
>>>
>>>main.cf
>>>----------
>>>myhostname = mail.domain1.com
>>>mydomain = domain1.com
>>>mydestination = $myhostname, $mydomain, localhost, localhost.localdomain
>>>
>>>transport_maps = hash:/etc/postfix/my_transport
>>>relay_domains = /etc/postfix/my_relay_domains
>>>
>>>
>>>my_transport
>>>-------------------
>>>domain1.com smtp:[127.0.0.1]:10026
>>>.domain1.com smtp:[127.0.0.1]:10026
>>>
>>>domain2.com smtp:[127.0.0.1]:10026
>>>.domain2.com smtp:[127.0.0.1]:10026
>>>
>>>my_relay_domains
>>>---------------------------
>>>domain1.com
>>>domain2.com
>>>
>>>Any hints highly appreciated.
>>>Thanks,
>>>Brano
>>
>>Simple. Just add a virtual_alias_maps entry to rewrite
>>rootdomain1.tld to rootlocalhost. Repeat as needed.
>># main.cf
>>virtual_alias_maps = hash:/etc/postfix/virtual_alias
>># virtual_alias
>>rootdomain1.tld rootlocalhost
>>abusedomain2.tld rootlocalhost
>>...
>
>
>Thanks, I've tried this before but no luck. The user is being
>rewritten to sysadmlocalhost.domain1.tld
>
>Any other hints highly appreciated ;)

You are still trying to relay mail addressed to localhost to your
internal relay. You'll need to add a transport entry to override it.

# transport_maps
...
localhost.domain1.tld local:

--
Noel Jones