Re: Postfix configuration (mail to root)



On Sat, Sep 30, 2006 at 20:25:51 +0100, Magnus Therning wrote:
On Sat, Sep 30, 2006 at 20:36:34 +0300, Andrei Popescu wrote:
[..]
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:

I can't seem to make it do what I want it to, which would be the exact
opposite of what you're doing. My problem was that

% /usr/lib/sendmail root << EOF
Subject: test

Test
EOF

Would result in a mail being sent to root@xxxxxxxxxxxxxxx What I wanted
was a locally delivered email (according to the /etc/aliases file).

Just to clarify why this is a bit of a problem to me. cron keeps on
sending email to root (not root@localhost or root@xxxxxxxxxxxxx). I'd
rather have the output from my crontabs delivered locally.

/M

--
Magnus Therning (OpenPGP: 0xAB4DFBA4)
magnus@xxxxxxxxxxxx Jabber: magnus.therning@xxxxxxxxx
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.

The right to search for truth implies also a duty; one must not
conceal any part of what one has recognized to be true.
-- Albert Einstein

Attachment: pgp7HTHlQSg4Y.pgp
Description: PGP signature



Relevant Pages