NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: trouble with postfix parameter. ( Was: howto get my email aliases to work?) [SEC=UNCLASSIFIED]



On Mon, 11 Feb 2008 13:12:22 +1100
"Paul (NCC/CS.)" <pts%bom.gov.au@localhost> wrote:

> 
> 
> Hi my aliases are working but being overridden by this:
> 
> in /etc/postfix/mail.cf
> 
> myorigin = $mydomain
> 
> 
> This ensures return address's in email are:   xyz @ $mydomain
> and not xyz @ myhostname.mydomain
> 
> Which is good, but the parameter has another effect:
> 
> >>>>>
> # For the sake of consistency between sender and recipient addresses,
> # myorigin also specifies the default domain name that is appended
> # to recipient addresses that have no @domain part.
> #
> #myorigin = $myhostname
> myorigin = $mydomain
> >>>>>
> 
> 
> So mail simply to root ends up being root @ mydomain and therefore
> goes to the company sysadmins and servers instead of ME at my box.
> (They HATE this).
> 
> 
> If I take away this parameter the aliases kick in :
> 
> root: pts
> operator: pts
> 
> and I get roots mail, but without the parameter I have the problem
> of return addresses being pts @ host.domainname  !
> 
> I need the parameter to specify the return address correctly but it
> also effects the SEND address as it says above.
> 
> Nightmare!  
> 
> Can anyone suggest what I should do ?
> 
Use sender_canonical_maps and recipient_canonical_maps.  Add

  sender_canonical_maps = hash:/etc/postfix/sender_canonical_maps
  recipient_canonical_maps = hash:/etc/postfix/recipient_canonical_maps

to main.cf and put rewrite rules in those files.  Then do

  postmap sender_canonical_maps
  postmap recipient_canonical_maps


                --Steve Bellovin, http://www.cs.columbia.edu/~smb



Home | Main Index | Thread Index | Old Index