Exim4 additions for Postgresql support
Hendrik Visage
hvisage at envisage.co.za
Fri Apr 9 22:19:26 GMT 2004
Hi there,
Being a preference for postgresql, the attached DEPENDS & BUILD script
would add the support for postgresql, and "fixed" the mysql onlyness that
were in the BUILD script.
Greetz
Hendrik
-------------- next part --------------
(
add_priv_user mail:mail
mkdir -p /var/spool/mail
chmod 1777 /var/spool/mail
chown mail:mail /var/spool/mail
mkdir Local
if module_installed xserver ; then
cp src/EDITME Local/Makefile
cp exim_monitor/EDITME Local/eximon.conf
else
grep -v "EXIM_MONITOR=" src/EDITME > Local/Makefile
fi
if module_installed tcp_wrappers ; then
echo "USE_TCP_WRAPPERS=yes" >> Local/Makefile
echo "EXTRALIBS=-lwrap" >> Local/Makefile
fi
if module_installed Linux-PAM ; then
echo "SUPPORT_PAM=yes" >> Local/Makefile
if module_installed tcp_wrappers ; then
echo "EXTRALIBS=-lpam -ldl -lwrap" >> Local/Makefile
else
echo "EXTRALIBS=-lpam -ldl" >> Local/Makefile
fi
fi
LOOKUP_INCLUDE=""
LOOKUP_LIBS=""
if module_installed mysql; then
echo "LOOKUP_MYSQL=yes" >> Local/Makefile
LOOKUP_INCLUDE="$LOOKUP_INCLUDE -I /usr/include/mysql"
LOOKUP_LIBS="$LOOKUP_LIBS -lmysqlclient"
fi
if module_installed postgresql; then
echo "LOOKUP_PGSQL=yes" >> Local/Makefile
LOOKUP_INCLUDE="$LOOKUP_INCLUDE -I /usr/include/pgsql"
LOOKUP_LIBS="$LOOKUP_LIBS -lpq"
fi
echo ${LOOKUP_INCLUDE}
echo ${LOOKUP_LIBS}
if [ ! -z "$LOOKUP_INCLUDE" ]
then
echo "LOOKUP_INCLUDE=$LOOKUP_INCLUDE" >> Local/Makefile
fi
if [ ! -z "$LOOKUP_LIBS" ]
then
echo "LOOKUP_LIBS=$LOOKUP_LIBS" >> Local/Makefile
fi
echo "EXIM_USER=mail" >> Local/Makefile
echo "BIN_DIRECTORY=/usr/sbin" >> Local/Makefile
echo "CONFIGURE_FILE=/etc/exim.conf" >> Local/Makefile
echo "SPOOL_DIRECTORY=/var/spool/mail" >> Local/Makefile
echo "CFLAGS=$CFLAGS" >> Local/Makefile
echo "AUTH_CRAM_MD5=yes" >> Local/Makefile
echo "AUTH_PLAINTEXT=yes" >> Local/Makefile
echo "LOOKUP_NIS=yes" >> Local/Makefile
default_make
) > $C_FIFO 2>&1 && (
ln -sf ../sbin/exim /usr/lib/sendmail
ln -sf exim /usr/sbin/sendmail
sedit "s:var/mail:var/spool/mail:" /etc/exim.conf
sedit "s/\# group = mail/ group = mail/" /etc/exim.conf
sedit "s/\# mode = 0660/ mode = 0660/" /etc/exim.conf
if [ "$IDENT_QUERIES" == "n" ] &&
! grep -q "rfc1413_query_timeout" /etc/exim.conf
then
cp /etc/exim.conf /tmp/exim.conf
awk '{
sub(/host_lookup = \*/,
"&\nrfc1413_query_timeout = 0s");
print
}' /tmp/exim.conf > /etc/exim.conf
rm /tmp/exim.conf
fi
touch /etc/aliases
)
-------------- next part --------------
(
add_priv_user mail:mail
mkdir -p /var/spool/mail
chmod 1777 /var/spool/mail
chown mail:mail /var/spool/mail
mkdir Local
if module_installed xserver ; then
cp src/EDITME Local/Makefile
cp exim_monitor/EDITME Local/eximon.conf
else
grep -v "EXIM_MONITOR=" src/EDITME > Local/Makefile
fi
if module_installed tcp_wrappers ; then
echo "USE_TCP_WRAPPERS=yes" >> Local/Makefile
echo "EXTRALIBS=-lwrap" >> Local/Makefile
fi
if module_installed Linux-PAM ; then
echo "SUPPORT_PAM=yes" >> Local/Makefile
if module_installed tcp_wrappers ; then
echo "EXTRALIBS=-lpam -ldl -lwrap" >> Local/Makefile
else
echo "EXTRALIBS=-lpam -ldl" >> Local/Makefile
fi
fi
LOOKUP_INCLUDE=""
LOOKUP_LIBS=""
if module_installed mysql; then
echo "LOOKUP_MYSQL=yes" >> Local/Makefile
LOOKUP_INCLUDE="$LOOKUP_INCLUDE -I /usr/include/mysql"
LOOKUP_LIBS="$LOOKUP_LIBS -lmysqlclient"
fi
if module_installed postgresql; then
echo "LOOKUP_PGSQL=yes" >> Local/Makefile
LOOKUP_INCLUDE="$LOOKUP_INCLUDE -I /usr/include/pgsql"
LOOKUP_LIBS="$LOOKUP_LIBS -lpq"
fi
echo ${LOOKUP_INCLUDE}
echo ${LOOKUP_LIBS}
if [ ! -z "$LOOKUP_INCLUDE" ]
then
echo "LOOKUP_INCLUDE=$LOOKUP_INCLUDE" >> Local/Makefile
fi
if [ ! -z "$LOOKUP_LIBS" ]
then
echo "LOOKUP_LIBS=$LOOKUP_LIBS" >> Local/Makefile
fi
echo "EXIM_USER=mail" >> Local/Makefile
echo "BIN_DIRECTORY=/usr/sbin" >> Local/Makefile
echo "CONFIGURE_FILE=/etc/exim.conf" >> Local/Makefile
echo "SPOOL_DIRECTORY=/var/spool/mail" >> Local/Makefile
echo "CFLAGS=$CFLAGS" >> Local/Makefile
echo "AUTH_CRAM_MD5=yes" >> Local/Makefile
echo "AUTH_PLAINTEXT=yes" >> Local/Makefile
echo "LOOKUP_NIS=yes" >> Local/Makefile
default_make
) > $C_FIFO 2>&1 && (
ln -sf ../sbin/exim /usr/lib/sendmail
ln -sf exim /usr/sbin/sendmail
sedit "s:var/mail:var/spool/mail:" /etc/exim.conf
sedit "s/\# group = mail/ group = mail/" /etc/exim.conf
sedit "s/\# mode = 0660/ mode = 0660/" /etc/exim.conf
if [ "$IDENT_QUERIES" == "n" ] &&
! grep -q "rfc1413_query_timeout" /etc/exim.conf
then
cp /etc/exim.conf /tmp/exim.conf
awk '{
sub(/host_lookup = \*/,
"&\nrfc1413_query_timeout = 0s");
print
}' /tmp/exim.conf > /etc/exim.conf
rm /tmp/exim.conf
fi
touch /etc/aliases
)
-------------- next part --------------
depends db &&
depends gawk &&
case $CRON in
f) depends fcron ;;
*) depends hc-cron ;;
esac &&
optional_depends tcp_wrappers "" "" "for controlling remote access"
optional_depends mysql "" "" "for mysql lookup tables"
optional_depends postgresql "" "" "for postgresql lookup tables"
More information about the Lunar
mailing list