bryan hunt's [bryan.hunt at ossidian.com] 32 lines of wisdom included:
>> I'm changing from a crap windows email server to a linux one here.
>> I don't want to screw up all the users email while I'm doing it though.
>> I want the emails to keep going to the the regular email server while
> I smooth out any bugs in postfix.
>> I was planning on redirecting the firewall port 25 to an AV proxy which
> forwards the mail to a postfix server.
>> Just for the next couple of days I want to set up postfix so that every mail
> it recieves is duplicated to a second ( existing windowz )server. Is there a
> quick and dirty way to do this ? I seem to remember it was easy to do with
> sendmail but I haven't seen anything nice yet.
What version of Postfix are you using?
If you're planning on going for 2.0.0.1, something like the
following should work:
/etc/postfix/main.cf:
mydestination = domain1.com, ipostfix.domain1.com,
ixchz.domain1.com
...
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_alias_domains = hash:/etc/postfix/virtual_domains
...
transport_maps = hash:/etc/postfix/transport
/etc/postfix/virtual:
user1 at domain1.comuser1 at ipostfix.domain1.comuser1 at ixchz.domain1.com
/etc/postfix/virtual_domains
domain1.com
/etc/postfix/transport
ixchz.domain1.com smtp:[ip.address.of.exchange.server]
You will need to run ``postmap(1)'' on ``/etc/postfix/virtual'' and
``/etc/postfix/virtual_domains''
Mail from user1 at domain1.com goes to:
a) user1 at ipostfix.domain1.com
What you do with this is up to you from here. It's already
listed in mydestination, so Postfix will accept mail. By default,
postfix will collect mail for it in $mail_spool_directory/$username.
b) user1 at ixchz.domain1.com
There is a transport map, telling postfix to deliver mail via smtp
to the ``ip.address.of.exchange.server''
It is possible to map whole domains instead of doing this user by
user. Postfix virtual_alias_maps except @domain.com expansions
(which are the lowest precedent).
Please note also, there are considerable differences between 1.x and
2.x versions of Postfix, as well as big differences in the latest
snapshots. If you do implement this and you're still having
problems, try and specify the version you're using.
If you need help, show output from:
- logs
- postconf -n
- postconf -d mail_version
- anything else you feel necessary
Ref:
RELEASE_NOTES
virtual(5)
sample-virtual.cf
--
Philip Reynolds
RFC Networks tel: 01 8832063
www.rfc-networks.ie fax: 01 8832041
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!