Yaakov Selkowitz wrote:
Corinna, Christian, Daniel, Pierre,
Because MTAs must be user-configured, and we certainly don't want to
lose the selection during package upgrades, the alternatives cannot be
handled in package postinst/prerm. I think the only way to make this
work is for each MTA config script to handle these instead by
including the following snippets in the respective MTA config scripts.
Please review this carefully in case I missed anything.
...
postfix:
========
/usr/sbin/alternatives --install /usr/sbin/sendmail mta
/usr/sbin/postfix.exe 0 \
--slave /usr/lib/sendmail mta-sendmail /usr/sbin/postfix.exe \
--slave /usr/bin/mailq mta-mailq /usr/sbin/postfix.exe \
--slave /usr/bin/newaliases mta-newaliases /usr/sbin/postfix.exe
/usr/sbin/alternatives --set mta /usr/sbin/postfix.exe
"postfix" is the control program, there is a separate "sendmail" command
for sendmail emulation. Attached is the alternatives part of the
/etc/postinstall/postfix.sh from the current draft postfix package. It
also provides links for the related man pages.
The Fedora postfix package also provides alternatives for
man5/aliases.5.gz and man8/smtpd.8.gz. Is this needed on Cygwin?
Thanks,
Christian
/usr/sbin/alternatives \
--install /usr/sbin/sendmail mta /usr/sbin/sendmail.postfix.exe 0 \
--slave /usr/lib/sendmail mta-sendmail /usr/sbin/sendmail.postfix.exe \
--slave /usr/bin/mailq mta-mailq /usr/sbin/sendmail.postfix.exe \
--slave /usr/bin/newaliases mta-newaliases /usr/sbin/sendmail.postfix.exe \
--slave /usr/share/man/man1/sendmail.1.gz mta-sendmail-man
/usr/share/man/man1/sendmail.postfix.1.gz \
--slave /usr/share/man/man1/mailq.1.gz mta-mailq-man
/usr/share/man/man1/sendmail.postfix.1.gz \
--slave /usr/share/man/man1/newaliases.1.gz mta-newaliases-man
/usr/share/man/man1/sendmail.postfix.1.gz
/usr/sbin/alternatives --set mta /usr/sbin/sendmail.postfix.exe