Re: Postfix configuration (mail to root)



Magnus Therning <magnus@xxxxxxxxxxxx> wrote:

On Fri, Sep 29, 2006 at 20:07:18 +0300, Andrei Popescu wrote:
Magnus Therning <magnus@xxxxxxxxxxxx> wrote:

This is how I've configured it:

% cat /etc/mailname
my.remote.host

% hostname -f
my.local.host

Maybe I'm wrong, but it seems to me that /etc/mailname should also be
'my.local.host'

But then I can't send emails because a lot of servers out there do a
lookup on the server name in the envelope header and my.local.host is on
a private LAN and can't be looked up.

Basically, the setup I want is:

root and other local accounts are delivered locally
non-local accounts are forwarded to the relayhost

To have the latter work I need to make sure that the envelope header
contains an address with a domain that can be looked up on the internet.
That's what I get by sticking my.remote.host in /etc/mailname. However,
that seems to screw up local delivery :-(

I can't see that this is a very unique situation, AFAICS that is exactly
what Internet With Smart Host is when I run 'dpkg-reconfigure postfix'.

You can do this with rewriting. I just set this up today so its fresh :)

/etc/postfix/main.cf:

smtp_generic_maps = hash:/etc/postfix/generic

then create /etc/postfix/generic with something like this:

user@xxxxxxxxxxxxx account@xxxxxxxxxxxxxx

and run 'postmap /etc/postfix/generic

Now if the mail is for root@xxxxxxxxxxxxx it will be delivered
according to your aliases file. Mail for user@xxxxxxxxxxxxxxxxxx will
be sent to respective address with rewriten From:

Regards,
Andrei
--
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: mail vs. Mutt
    ... How many time person must spent for configuring Mutt? ... For mail to be able to send to the internet you have to activate address rewriting in your MTA ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • Re: mail vs. Mutt
    ... How many time person must spent for configuring Mutt? ... For mail to be able to send to the internet you have to activate address rewriting in your MTA ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • DEPLOY IPTV SERVICES!
    ... Internet Protocol Television enables low-cost and globally scalable ... delivery of multimedia content to end users. ... The provider sends to the user Tornado M10 Digital Media Center ... Based on account balance and permissions, the server authorizes ...
    (comp.dcom.videoconf)
  • Re: problems with email routing
    ... Once the internet (and hence the vpn link) came up, ... across the site 2 site vpn link using the routing group connector. ... What I am consfused about is where to start troubleshooting this delivery ...
    (microsoft.public.exchange.connectivity)
  • Re: FOAK - BT Vision
    ... up on Internet stuff, currently with Zen, but their house has been with ... can't see any problems relating to delivery of the service other than ... the BT hub and the STB - wireless won't cut it. ... in the house, you probably shouldn't get BT Vision ...
    (uk.rec.motorcycles)