Re: Postfix configuration (mail to root)
- From: Magnus Therning <magnus@xxxxxxxxxxxx>
- Date: Sat, 30 Sep 2006 21:16:07 +0100
On Sat, Sep 30, 2006 at 22:42:59 +0300, Andrei Popescu wrote:
Magnus Therning <magnus@xxxxxxxxxxxx> 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).
After some research I added the following to my /etc/postfix/main.cf:
mydestination = $myhostname, localhost
That resulted in local delivery for mail sent to root@localhost and
root@xxxxxxxxxxxxx (and /etc/aliases is used for that :-).
I don't understand how is that different than your original config, but
if it works ... :)
At first root@localhost didn't work, now it does. That's a difference.
Mail sent to root by cron is still delivered to my.remote.host so the
difference is of little use.
/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.
$my_args = shift;
system("gcc $my_args");
print "I prefer C\n";
-- Robert Dieterich's contribution to the 2004 Perl Haiku Contest,
Haikus in Perl - 'Dishonerable Mention' winner
Attachment:
pgpsoiQBJGATD.pgp
Description: PGP signature
- Follow-Ups:
- Re: Postfix configuration (mail to root)
- From: Andrei Popescu
- Re: Postfix configuration (mail to root)
- References:
- Postfix configuration (mail to root)
- From: Magnus Therning
- Re: Postfix configuration (mail to root)
- From: Magnus Therning
- Re: Postfix configuration (mail to root)
- From: Andrei Popescu
- Re: Postfix configuration (mail to root)
- From: Magnus Therning
- Re: Postfix configuration (mail to root)
- From: Andrei Popescu
- Re: Postfix configuration (mail to root)
- From: Magnus Therning
- Re: Postfix configuration (mail to root)
- From: Andrei Popescu
- Postfix configuration (mail to root)
- Prev by Date: Re: Etch install
- Next by Date: Problems installing BRUB with RAID5
- Previous by thread: Re: Postfix configuration (mail to root)
- Next by thread: Re: Postfix configuration (mail to root)
- Index(es):
Relevant Pages
- Re: Postfix configuration (mail to root)
... and run 'postmap /etc/postfix/generic ... according to your aliases file.
... That resulted in local delivery for mail sent to root@localhost and ... Keep
Europe free from software patents, ... (Debian-User) - Re: Postfix configuration (mail to root)
... according to your aliases file. ... was a locally delivered email. ...
That resulted in local delivery for mail sent to root@localhost and ... To UNSUBSCRIBE,
email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ... (Debian-User)