On 6/14/2012 9:42 AM, jeffrey j donovan wrote:
> 
> On Jun 13, 2012, at 9:56 PM, jeffrey j donovan wrote:
> 
>>
>> On Jun 13, 2012, at 9:39 PM, jeffrey j donovan wrote:
>>
>>> Greetings
>>> it has been a long time since I've done this, and could use some guidance.
>>>
>>> I have one domain ( example.com ) and 7 systems.
>>>
>>> mx1.example.com
>>> Av1.example.com
>>> relay1.example.com
>>> relay2.exmple.com
>>> imap/pop1
>>> imap/pop2
>>> imap/pop3
>>>
>>> each understand their own /etc/aliases file. if I send a message to 
>>> [email protected] it works fine.
>>> when i try to send to [email protected], all the machines kick it to 
>>> the MX server ( which has a transportmap for example.com ) and I get a loop.
>>>
>>> aliasname:  [email protected]
>>>
>>> can i specify
>>>
>>> [email protected]:      [email protected]
>>>
>>> right now my MX server is only working when i specify the host name in the 
>>> message.
>>>
>>> if there is something I should set in main.cf ? 
>>> <snip>
>>> mydestination = $myhostname, localhost.$mydomain, localhost, example.com, 
>>> $mydomain
>>> mydomain = example.com
>>> mydomain_fallback = localhost
>>> myhostname = mx1.example.com
>>> mynetworks = 127.0.0.0/8
>>> mynetworks_style = host
>>> myorigin = $myhostname
>>> </snip>
>>>
>>> -j
>>
>>
>> answering my own question; is this what i need to change ?
>> http://www.postfix.org/postconf.5.html
>>
>> myorigin (default: $myhostname)
>> The domain name that locally-posted mail appears to come from, and that 
>> locally posted mail is delivered to. The default, $myhostname, is adequate 
>> for small sites. If you run a domain with multiple machines, you should (1) 
>> change this to $mydomain and (2) set up a domain-wide alias database that 
>> aliases each user to [email protected].
>>
>> Example:
>>
>> myorigin = $mydomain
>>
>>
>> okay part (2) of that answer  set up a domain-wide alias database that 
>> aliases each user to [email protected]
>> how do i do that properly ?
>>
>> -j
> 
> Answering my own thread again. the answer was no,..
> changing my origin didn't make any difference. the messages always get sent 
> to my relays which have no local delivery except 
> [email protected]. The local aliases file works, but the global ( 
> domain ) 
> does not re-write the address it just see's [email protected], see there 
> is no transport so it sends back to MX, hence my loop.
> 
> I have read that using virtual alias map may solve the problem. Because the 
> alias does not have to be local. I have always avoided using these because i 
> only have one domain, and figured there was no need to setup a virtual. I 
> guess thi sonly applies if Im using one box and everything is in the box.
> 
> assuming I need to setup a virtual alias map to accept postmaster@domain 
> which machine should host the database , or should they all have the same 
> database ?
> 
> any assistance would be helpful thanks.
> -j
> 
> 


The proper solution is to use a global virtual_alias_maps to map
users to the correct server.  Use rsync or similar to synchronize
the virtual_alias file among the servers.

# main.cf
virtual_alias_maps = hash:/etc/postfix/virtual

# virtual
[email protected]  [email protected]
[email protected]  [email protected]
...


postmaster works the same way --
[email protected]  [email protected]



[optional] On your outgoing gateway use canonical_maps to rewrite
hostX.example.com to example.com.


  -- Noel Jones

Reply via email to