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

Re: Postfix troubles



I've worked around a similar problem with postfix recently.

The solution turned out to be very simple, using Postfix's `virtual
host' facility.

You basically insert into your /etc/postfix/main.cf file the contents of
/usr/share/doc/postfix/examples/sample-virtual.cf; the critical line is:

  virtual_maps = hash:/etc/postfix/virtual

You then create a /etc/postfix/virtual file; here's mine
(`catnip.gol.com' and `tc-1-100.kawasaki.gol.ne.jp' are the two
hostnames my system has had in in /etc/hostname; neither is actually a
valid hostname since my ISP uses dynamic IP):

  @catnip.gol.com		@localhost
  @tc-1-100.kawasaki.gol.ne.jp	@localhost

[and then tell postfix about the file with `postmap /etc/postfix/virtual']

If you send mail to just `root', postfix will attach the local hostname
(from /etc/hostname), but then the virtual host map will change this to
be just `root@localhost', which postfix will correctly deliver to the
local machine.

-Miles



Reply to: