spartacus9 has asked for the wisdom of the Perl Monks concerning the following question:

I am migrating my mail server from server A to server B. I have several hundred perl programs on server A that send their output to an e-mail address by piping to /usr/lib/sendmail. I want to disable all mail services from server A, including sendmail, and route all outbound mail delivery through the new mail server on server B. i was thinking of writing a perl script to replace /usr/lib/sendmail -- this script would accept the same arguments as sendmail, and then use the Mail::Sender module to route the message through the mail server on server B. Has anyone done this before, or know of a better solution (other than modifying hundreds of existing scripts!)

Replies are listed 'Best First'.
Re: Using perl in mail server migration
by gav^ (Curate) on Sep 18, 2002 at 03:24 UTC
    This isn't a perl question at all. You should just set up sendmail to relay all mail from server A to server B.

    Something like this should do the trick: define('SMART_HOST', 'smtp:my.server.here')

    gav^

      Or why not change the name of server A and make it's old name a DNS cononical for server B

      However, you are correct as this does not look perl related.

Re: Using perl in mail server migration
by Aristotle (Chancellor) on Sep 18, 2002 at 08:13 UTC