#!/bin/sh
#
# $OpenBSD: exim-enable,v 1.2 2014/03/13 14:50:41 sthen Exp $

if [ -f /etc/mailer.conf.exim ]; then
    if [ -f /etc/mailer.conf ]; then
        mv -f /etc/mailer.conf /etc/mailer.conf.pre-exim
        echo "old /etc/mailer.conf saved as /etc/mailer.conf.pre-exim"
    fi
    mv -f /etc/mailer.conf.exim /etc/mailer.conf
    echo "exim /etc/mailer.conf enabled"
    echo ""
    echo "NOTE: do not forget to add smtpd_flags=NO to"
    echo "      /etc/rc.conf.local to disable smtpd" 
    echo ""
    echo "NOTE: do not forget to add exim to pkg_scripts in"
    echo "      /etc/rc.conf.local to start exim automatically." 
else
    echo "can't find /etc/mailer.conf.exim, exim not enabled"
fi
