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: Brano (branobgmail.com)
Date: Mon Aug 13 2007 - 23:36:13 CDT


-------- Original Message --------

> 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. This did not work as the users were rewritten to
rootlocalhost.domain1.tld
but
this did work (and I can live with that!) :)

# virtual_alias
rootdomain1.tld root[127.0.0.1]

Thanks again for the hint!
Brano