I'm having problems with sending emails to root on my machines at work.
My mail setup is a little strange, I suppose, but not too weird, I think
:-)
I defer all sending of email. Postfix uses a relayhost of
localhost:2300 and my user has a cronjob that sets up an ssh tunnel to a
remote host, my.remote.host, that I use to actually send the email.
(This setup is to avoid the exchange mail server that is used at the
office. I've had A LOT of problems with it and its administrators.)
The current setup works fine for sending to external addresses, but not
for sending to local ones, e.g. to root.
% /usr/lib/sendmail root << EOF
Subject: hello
hello
EOF
% mailq
2B62F4B9DD 335 Fri Sep 29 15:07:41 magnus@my.remote.host
(deferred transport)
root@my.remote.host
This is how I've configured it:
% cat /etc/mailname
my.remote.host
% egrep '^root' /etc/aliases
root: magnus
% hostname -f
my.local.host
My /etc/postfix/main.cf contains the following:
myhostname = my.local.host
myorigin = /etc/mailname
mydestination = my.local.host, localhost
How do I configure this so that emails for root are sent to
magnus@my.local.host rather than root@my.remote.host?
And, why are mails sent by the user magnus recorded as sent from
magnus@my.remote.host?
/M
--
Magnus Therning (OpenPGP: 0xAB4DFBA4)
magnus@therning.org Jabber: magnus.therning@gmail.com
http://therning.org/magnus
Software is not manufactured, it is something you write and publish.
Keep Europe free from software patents, we do not want censorship
by patent law on written works.
Unreadable code,
Why would anyone use it?
Learn a better way.
-- Geoff Kuenning's contribution to the 2004 Perl Haiku Contest,
Haikus about Perl - 'Dishonerable Mention' winner
Attachment:
pgpNKo4CjWe_B.pgp
Description: PGP signature