wgroenewold
New member
- Joined
- Nov 30, 2017
- Messages
- 3
Hi,
Because we use postfix as MTA instead of exim we disabled exim. But when we use the CB2 update script it also sets the sendmail link back to exim when updating PHP.
It uses the function set_sendmail_link(). What is the neat way to overrule this function. Is it possible to let CB2 check in the /custom for our own version of the function or should I just change it in the build-script?
Because we use postfix as MTA instead of exim we disabled exim. But when we use the CB2 update script it also sets the sendmail link back to exim when updating PHP.
It uses the function set_sendmail_link(). What is the neat way to overrule this function. Is it possible to let CB2 check in the /custom for our own version of the function or should I just change it in the build-script?
Code:
set_sendmail_link() {
SM=/usr/sbin/sendmail
MW=/usr/sbin/mailwrapper
LINK_TO_EXIM="ln -sf exim ${SM}"
if [ "$OS" = "FreeBSD" ] && [ -x ${MW} ]; then
MC=/etc/mail/mailer.conf
T=${MC}.temp
E=`grep -m1 -c exim ${MC}`
if [ "${E}" -eq 0 ]; then
cp -f ${MC} ${MC}.backup
wget ${WGET_CONNECT_OPTIONS} -O ${T} ${WEBPATH_SERVICES}/mailer.conf
if [ ! -s ${T} ]; then
${LINK_TO_EXIM}
return
fi
cp -f ${T} ${MC}
fi
L=`readlink $SM`
if [ "${L}" = "exim" ]; then
ln -sf ${MW} ${SM}
fi
return
fi
${LINK_TO_EXIM}
}