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

Re: Postfix configuration (mail to root)



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@my.local.host	account@my.remote.host
>
>and run 'postmap /etc/postfix/generic
>
>Now if the mail is for root@my.local.host it will be delivered
>according to your aliases file. Mail for user@some.internet.host 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@my.remote.host.  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@my.local.host (and /etc/aliases is used for that :-).

/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.

Windows [n.]
  A thirty-two bit extension and GUI shell to a sixteen bit patch to
  an eight bit operating system originally coded for a four bit
  microprocessor and sold by a two-bit company that can't stand one
  bit of competition.
     -- Anonymous USEnet post

Attachment: pgp6l3DLwc5wp.pgp
Description: PGP signature


Reply to: