Commit 9c27e29f authored by salaun's avatar salaun
Browse files

[Frederic Connes] New feature: add postfix-style alias management in Sympa

New Makefile parameters POSTMAP, POSTMAP_ARG and VIRTUAL_ALIASES
New script postfix_manager.pl. New C wrapper virtualwrapper.c


git-svn-id: https://subversion.renater.fr/sympa/trunk@1293 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent b5b71dd6
......@@ -93,17 +93,31 @@ LOCKDIR = /var/lock/subsys
## Path to newaliases command (or what else may be called to rebuild
## Mail aliases database)
NEWALIASES = @NEWALIASES@
NEWALIASES = @NEWALIASES@
## Argument to newaliases command
# NEWALIASES_ARG = hash:/etc/mail/sympa_aliases
NEWALIASES_ARG = @NEWALIASES_ARG@
## Path to postmap command (or what else may be called to rebuild
## Mail virtual database)
POSTMAP = @POSTMAP@
## Argument to postmap command
# POSTMAP_ARG = hash:/etc/mail/sympa_virtual
POSTMAP_ARG = @POSTMAP_ARG@
## The sendmail aliases file we use. Better use a seperate one for sympa.
## Of cause a extra alias file must be generated with proper permissions
## Of course an extra alias file must be generated with proper permissions
## (owner sympa, write access for sympa, no write access for anyone else)
## and declared in sendmail.cf!
SENDMAIL_ALIASES= @SENDMAIL_ALIASES@
SENDMAIL_ALIASES= @SENDMAIL_ALIASES@
## The postfix virtual file we use. Better use a seperate one for sympa.
## Of course an extra alias file must be generated with proper permissions
## (owner sympa, write access for sympa, no write access for anyone else)
## and declared in main.cf!
VIRTUAL_ALIASES= @VIRTUAL_ALIASES@
## Path to gencat program (creates the .cat catalog file using the .msg)
GENCAT = @GENCAT@
......@@ -173,8 +187,10 @@ sources: src/Makefile src/queue.c src/bouncequeue.c src/aliaswrapper.c
MAILERPROGDIR='${MAILERPROGDIR}' ETCBINDIR='${ETCBINDIR}' \
CONFIG='${CONFIG}' WWSCONFIG='${WWSCONFIG}' \
USER='${USER}' GROUP='${GROUP}' \
SENDMAIL_ALIASES='${SENDMAIL_ALIASES}' NEWALIASES='${NEWALIASES}' \
NEWALIASES_ARG='${NEWALIASES_ARG}' \
SENDMAIL_ALIASES='${SENDMAIL_ALIASES}' \
VIRTUAL_ALIASES='${VIRTUAL_ALIASES}' \
NEWALIASES='${NEWALIASES}' NEWALIASES_ARG='${NEWALIASES_ARG}' \
POSTMAP='${POSTMAP}' POSTMAP_ARG='${POSTMAP_ARG}' \
PIDPRE='${PIDPRE}' PIDPOST='${PIDPOST}' LOCKDIR='${LOCKDIR}');
doc: doc/sympa.tex.tpl doc/Makefile
......@@ -230,6 +246,7 @@ installsrc:
DESTDIR='${DESTDIR}' MAILERPROGDIR='${MAILERPROGDIR}' EXPL_DIR='${EXPL_DIR}' \
PIDDIR='${PIDDIR}' CONFIG='${CONFIG}' WWSCONFIG='${WWSCONFIG}' \
ETCBINDIR='${ETCBINDIR}' SENDMAIL_ALIASES='${SENDMAIL_ALIASES}' \
VIRTUAL_ALIASES='${VIRTUAL_ALIASES}' \
USER='${USER}' GROUP='${GROUP}' newinstall) || exit 1;
installnls:
......@@ -238,6 +255,7 @@ installnls:
DIR='${DIR}' NLSDIR='${NLSDIR}' ETCBINDIR='${ETCBINDIR}' \
DESTDIR='${DESTDIR}' CONFIG='${CONFIG}' WWSCONFIG='${WWSCONFIG}' \
SENDMAIL_ALIASES='${SENDMAIL_ALIASES}' \
VIRTUAL_ALIASES='${VIRTUAL_ALIASES}' \
USER='${USER}' GROUP='${GROUP}' GENCAT='${GENCAT}' newinstall) || exit 1;
installwws:
......@@ -271,6 +289,7 @@ installman:
SYMPA_VERSION=$(SYMPA_VERSION); export SYMPA_VERSION; \
CONFDIR=$(CONFDIR); export CONFDIR; \
SENDMAIL_ALIASES=$(SENDMAIL_ALIASES); export SENDMAIL_ALIASES; \
VIRTUAL_ALIASES=$(VIRTUAL_ALIASES); export VIRTUAL_ALIASES; \
MAILERPROGDIR=$(MAILERPROGDIR); export MAILERPROGDIR; \
PIDDIR=$(PIDDIR); export PIDDIR; \
SPOOLDIR=$(SPOOLDIR); export SPOOLDIR; \
......
......@@ -149,8 +149,15 @@ NEWALIASES = @NEWALIASES@
# NEWALIASES_ARG = hash:/etc/mail/sympa_aliases
NEWALIASES_ARG = @NEWALIASES_ARG@
POSTMAP = @POSTMAP@
# POSTMAP_ARG = hash:/etc/mail/sympa_virtual
POSTMAP_ARG = @POSTMAP_ARG@
SENDMAIL_ALIASES = @SENDMAIL_ALIASES@
VIRTUAL_ALIASES = @VIRTUAL_ALIASES@
GENCAT = @GENCAT@
OPENSSL = @OPENSSL@
......@@ -365,8 +372,10 @@ sources: src/Makefile src/queue.c src/bouncequeue.c src/aliaswrapper.c
MAILERPROGDIR='${MAILERPROGDIR}' ETCBINDIR='${ETCBINDIR}' \
CONFIG='${CONFIG}' WWSCONFIG='${WWSCONFIG}' \
USER='${USER}' GROUP='${GROUP}' \
SENDMAIL_ALIASES='${SENDMAIL_ALIASES}' NEWALIASES='${NEWALIASES}' \
NEWALIASES_ARG='${NEWALIASES_ARG}' \
SENDMAIL_ALIASES='${SENDMAIL_ALIASES}' \
VIRTUAL_ALIASES='${VIRTUAL_ALIASES}' \
NEWALIASES='${NEWALIASES}' NEWALIASES_ARG='${NEWALIASES_ARG}' \
POSTMAP='${POSTMAP}' POSTMAP_ARG='${POSTMAP_ARG}' \
PIDPRE='${PIDPRE}' PIDPOST='${PIDPOST}' LOCKDIR='${LOCKDIR}');
doc: doc/sympa.tex.tpl doc/Makefile
......@@ -421,6 +430,7 @@ installsrc:
DESTDIR='${DESTDIR}' MAILERPROGDIR='${MAILERPROGDIR}' EXPL_DIR='${EXPL_DIR}' \
PIDDIR='${PIDDIR}' CONFIG='${CONFIG}' WWSCONFIG='${WWSCONFIG}' \
ETCBINDIR='${ETCBINDIR}' SENDMAIL_ALIASES='${SENDMAIL_ALIASES}' \
VIRTUAL_ALIASES='${VIRTUAL_ALIASES}' \
USER='${USER}' GROUP='${GROUP}' newinstall) || exit 1;
installnls:
......@@ -429,6 +439,7 @@ installnls:
DIR='${DIR}' NLSDIR='${NLSDIR}' ETCBINDIR='${ETCBINDIR}' \
DESTDIR='${DESTDIR}' CONFIG='${CONFIG}' WWSCONFIG='${WWSCONFIG}' \
SENDMAIL_ALIASES='${SENDMAIL_ALIASES}' \
VIRTUAL_ALIASES='${VIRTUAL_ALIASES}' \
USER='${USER}' GROUP='${GROUP}' GENCAT='${GENCAT}' newinstall) || exit 1;
installwws:
......@@ -462,6 +473,7 @@ installman:
SYMPA_VERSION=$(SYMPA_VERSION); export SYMPA_VERSION; \
CONFDIR=$(CONFDIR); export CONFDIR; \
SENDMAIL_ALIASES=$(SENDMAIL_ALIASES); export SENDMAIL_ALIASES; \
VIRTUAL_ALIASES=$(VIRTUAL_ALIASES); export VIRTUAL_ALIASES; \
MAILERPROGDIR=$(MAILERPROGDIR); export MAILERPROGDIR; \
PIDDIR=$(PIDDIR); export PIDDIR; \
SPOOLDIR=$(SPOOLDIR); export SPOOLDIR; \
......
......@@ -47,11 +47,17 @@ ac_help="$ac_help
ac_help="$ac_help
--with-group=LOGIN set sympa group name (default sympa)"
ac_help="$ac_help
--with-sendmail_aliases=ALIASFILE set sendmail aliases file to be used by Sympa (default /etc/mail/sympa_aliases)"
--with-sendmail_aliases=ALIASFILE set aliases file to be used by Sympa (default /etc/mail/sympa_aliases)"
ac_help="$ac_help
--with-newaliases=FULLPATH set path to sendmail newaliases command (default /usr/bin/newaliases)"
--with-virtual_aliases=ALIASFILE set postfix virtual file to be used by Sympa (default /etc/mail/sympa_virtual)"
ac_help="$ac_help
--with-newaliases=FULLPATH set path to newaliases command (default /usr/bin/newaliases)"
ac_help="$ac_help
--with-newaliases_arg=ARGS set arguments to newaliases command (default NONE)"
ac_help="$ac_help
--with-postmap=FULLPATH set path to postfix postmap command (default /usr/sbin/postmap)"
ac_help="$ac_help
--with-postmap_arg=ARGS set arguments to postfix postmap command (default NONE)"
ac_help="$ac_help
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer"
......@@ -620,7 +626,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:624: checking host system type" >&5
echo "configure:630: checking host system type" >&5
host_alias=$host
case "$host_alias" in
......@@ -641,7 +647,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
echo "configure:645: checking target system type" >&5
echo "configure:651: checking target system type" >&5
target_alias=$target
case "$target_alias" in
......@@ -659,7 +665,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:663: checking build system type" >&5
echo "configure:669: checking build system type" >&5
build_alias=$build
case "$build_alias" in
......@@ -688,7 +694,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:692: checking host system type" >&5
echo "configure:698: checking host system type" >&5
host_alias=$host
case "$host_alias" in
......@@ -720,7 +726,7 @@ echo "$ac_t""$host" 1>&6
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:724: checking for a BSD compatible install" >&5
echo "configure:730: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -773,7 +779,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
echo "configure:777: checking whether build environment is sane" >&5
echo "configure:783: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
......@@ -830,7 +836,7 @@ test "$program_suffix" != NONE &&
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:834: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo "configure:840: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -869,7 +875,7 @@ fi
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
echo "configure:873: checking for working aclocal" >&5
echo "configure:879: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
......@@ -882,7 +888,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
echo "configure:886: checking for working autoconf" >&5
echo "configure:892: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
......@@ -895,7 +901,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
echo "configure:899: checking for working automake" >&5
echo "configure:905: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
......@@ -908,7 +914,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
echo "configure:912: checking for working autoheader" >&5
echo "configure:918: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
......@@ -921,7 +927,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
echo "configure:925: checking for working makeinfo" >&5
echo "configure:931: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
......@@ -1064,7 +1070,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1068: checking for $ac_word" >&5
echo "configure:1074: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -1094,7 +1100,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1098: checking for $ac_word" >&5
echo "configure:1104: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -1145,7 +1151,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1149: checking for $ac_word" >&5
echo "configure:1155: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -1177,7 +1183,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1181: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
echo "configure:1187: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
......@@ -1188,12 +1194,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
#line 1192 "configure"
#line 1198 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:1197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
......@@ -1219,12 +1225,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1223: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:1229: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:1228: checking whether we are using GNU C" >&5
echo "configure:1234: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -1233,7 +1239,7 @@ else
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
......@@ -1252,7 +1258,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:1256: checking whether ${CC-cc} accepts -g" >&5
echo "configure:1262: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -1284,7 +1290,7 @@ else
fi
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:1288: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo "configure:1294: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -1311,7 +1317,7 @@ else
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1315: checking how to run the C preprocessor" >&5
echo "configure:1321: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
......@@ -1326,13 +1332,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 1330 "configure"
#line 1336 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
......@@ -1343,13 +1349,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 1347 "configure"
#line 1353 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
......@@ -1360,13 +1366,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 1364 "configure"
#line 1370 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
......@@ -1391,9 +1397,9 @@ fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for AIX""... $ac_c" 1>&6
echo "configure:1395: checking for AIX" >&5
echo "configure:1401: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
#line 1397 "configure"
#line 1403 "configure"
#include "confdefs.h"
#ifdef _AIX
yes
......@@ -1418,7 +1424,7 @@ rm -f conftest*
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1422: checking for $ac_word" >&5
echo "configure:1428: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -1462,7 +1468,7 @@ fi
# Extract the first word of "openssl", so it can be a program name with args.
set dummy openssl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1466: checking for $ac_word" >&5
echo "configure:1472: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_OPENSSL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -1506,7 +1512,7 @@ fi
# Extract the first word of "gencat", so it can be a program name with args.
set dummy gencat; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1510: checking for $ac_word" >&5
echo "configure:1516: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -1555,7 +1561,7 @@ fi
# Extract the first word of "cvs2cl.pl", so it can be a program name with args.
set dummy cvs2cl.pl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1559: checking for $ac_word" >&5
echo "configure:1565: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_CVS2CL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -1593,7 +1599,7 @@ fi
# Extract the first word of "sh", so it can be a program name with args.
set dummy sh; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1597: checking for $ac_word" >&5
echo "configure:1603: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -1654,6 +1660,15 @@ fi
VIRTUAL_ALIASES=/etc/mail/sympa_virtual
# Check whether --with-virtual_aliases or --without-virtual_aliases was given.
if test "${with_virtual_aliases+set}" = set; then
withval="$with_virtual_aliases"
VIRTUAL_ALIASES="$withval"
fi
NEWALIASES=/usr/bin/newaliases
# Check whether --with-newaliases or --without-newaliases was given.
if test "${with_newaliases+set}" = set; then
......@@ -1672,8 +1687,26 @@ fi
POSTMAP=/usr/sbin/postmap
# Check whether --with-postmap or --without-postmap was given.
if test "${with_postmap+set}" = set; then
withval="$with_postmap"
POSTMAP="$withval"
fi
POSTMAP_ARG=
# Check whether --with-postmap_arg or --without-postmap_arg was given.
if test "${with_postmap_arg+set}" = set; then
withval="$with_postmap_arg"
POSTMAP_ARG="$withval"
fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
echo "configure:1677: checking whether to enable maintainer-specific portions of Makefiles" >&5
echo "configure:1710: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
......@@ -1892,8 +1925,11 @@ s%@SH@%$SH%g
s%@USER@%$USER%g
s%@GROUP@%$GROUP%g
s%@SENDMAIL_ALIASES@%$SENDMAIL_ALIASES%g
s%@VIRTUAL_ALIASES@%$VIRTUAL_ALIASES%g
s%@NEWALIASES@%$NEWALIASES%g
s%@NEWALIASES_ARG@%$NEWALIASES_ARG%g
s%@POSTMAP@%$POSTMAP%g
s%@POSTMAP_ARG@%$POSTMAP_ARG%g
s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
s%@MAINT@%$MAINT%g
......
......@@ -134,17 +134,29 @@ AC_ARG_WITH(group, [ --with-group=LOGIN set sympa group name (default sympa
AC_SUBST(GROUP)
SENDMAIL_ALIASES=/etc/mail/sympa_aliases
AC_ARG_WITH(sendmail_aliases, [ --with-sendmail_aliases=ALIASFILE set sendmail aliases file to be used by Sympa (default /etc/mail/sympa_aliases)], [SENDMAIL_ALIASES="$withval"])
AC_ARG_WITH(sendmail_aliases, [ --with-sendmail_aliases=ALIASFILE set aliases file to be used by Sympa (default /etc/mail/sympa_aliases)], [SENDMAIL_ALIASES="$withval"])
AC_SUBST(SENDMAIL_ALIASES)
VIRTUAL_ALIASES=/etc/mail/sympa_virtual
AC_ARG_WITH(virtual_aliases, [ --with-virtual_aliases=ALIASFILE set postfix virtual file to be used by Sympa (default /etc/mail/sympa_virtual)], [VIRTUAL_ALIASES="$withval"])
AC_SUBST(VIRTUAL_ALIASES)
NEWALIASES=/usr/bin/newaliases
AC_ARG_WITH(newaliases, [ --with-newaliases=FULLPATH set path to sendmail newaliases command (default /usr/bin/newaliases)], [NEWALIASES="$withval"])
AC_ARG_WITH(newaliases, [ --with-newaliases=FULLPATH set path to newaliases command (default /usr/bin/newaliases)], [NEWALIASES="$withval"])
AC_SUBST(NEWALIASES)
NEWALIASES_ARG=
AC_ARG_WITH(newaliases_arg, [ --with-newaliases_arg=ARGS set arguments to newaliases command (default NONE)], [NEWALIASES_ARG="$withval"])
AC_SUBST(NEWALIASES_ARG)
POSTMAP=/usr/sbin/postmap
AC_ARG_WITH(postmap, [ --with-postmap=FULLPATH set path to postfix postmap command (default /usr/sbin/postmap)], [POSTMAP="$withval"])
AC_SUBST(POSTMAP)
POSTMAP_ARG=
AC_ARG_WITH(postmap_arg, [ --with-postmap_arg=ARGS set arguments to postfix postmap command (default NONE)], [POSTMAP_ARG="$withval"])
AC_SUBST(POSTMAP_ARG)
dnl Initialize maintainer mode
AM_MAINTAINER_MODE
......
......@@ -21,13 +21,13 @@
CDEFS = -DCONFIG=\"$(CONFIG)\"
sbin_SRC = sympa.pl alias_manager.pl task_manager.pl sympa_wizard.pl
sbin_SRC = sympa.pl alias_manager.pl postfix_manager.pl task_manager.pl sympa_wizard.pl
lib_SRC = Archive.pm Commands.pm Conf.pm \
Language.pm List.pm Log.pm mail.pm msg.pl Ldap.pm \
smtp.pm tools.pl Version.pm parser.pl
all: queue bouncequeue aliaswrapper
all: queue bouncequeue aliaswrapper virtualwrapper
clean:
@if [ -f ./queue ]; then \
......@@ -39,6 +39,9 @@ clean:
@if [ -f ./aliaswrapper ]; then \
rm aliaswrapper ; \
fi
@if [ -f ./virtualwrapper ]; then \
rm virtualwrapper ; \
fi
install:
echo "Please use the main Makefile for installing sources."
......@@ -99,6 +102,8 @@ installqueue:
installwrapper:
@echo "Installing AliasWrapper binary..."
cp aliaswrapper $(DESTDIR)$(MAILERPROGDIR)/
@echo "Installing VirtualWrapper binary..."
cp virtualwrapper $(DESTDIR)$(MAILERPROGDIR)/
makedir:
@if [ ! -d $(DESTDIR)$(MAILERPROGDIR) ]; then \
......@@ -150,6 +155,8 @@ installmod:
chgrp -R $(GROUP) $(DESTDIR)$(LIBDIR)
chown root $(DESTDIR)$(MAILERPROGDIR)/aliaswrapper
chgrp $(GROUP) $(DESTDIR)$(MAILERPROGDIR)/aliaswrapper
chown root $(DESTDIR)$(MAILERPROGDIR)/virtualwrapper
chgrp $(GROUP) $(DESTDIR)$(MAILERPROGDIR)/virtualwrapper
@echo "Setting privileges..."
chmod 755 $(DESTDIR)$(SBINDIR) $(DESTDIR)$(ETCBINDIR)
chmod 755 $(DESTDIR)$(ETCBINDIR)/scenari $(DESTDIR)$(ETCBINDIR)/templates $(DESTDIR)$(ETCBINDIR)/list_task_models $(DESTDIR)$(ETCBINDIR)/global_task_models
......@@ -158,6 +165,7 @@ installmod:
chmod 600 $(DESTDIR)$(ETCBINDIR)/ca-bundle.crt
chmod 4755 $(DESTDIR)$(MAILERPROGDIR)/queue $(DESTDIR)$(MAILERPROGDIR)/bouncequeue
chmod 4750 $(DESTDIR)$(MAILERPROGDIR)/aliaswrapper
chmod 4750 $(DESTDIR)$(MAILERPROGDIR)/virtualwrapper
queue: queue.c Makefile ../Makefile
$(CC) $(CFLAGS) $(CDEFS) -o queue queue.c
......@@ -169,6 +177,10 @@ aliaswrapper: aliaswrapper.c Makefile ../Makefile
$(CC) $(CFLAGS) $(CDEFS) -DNEWALIASES=\"${NEWALIASES}\" \
-DNEWALIASES_ARG=\"${NEWALIASES_ARG}\" -o aliaswrapper aliaswrapper.c
virtualwrapper: virtualwrapper.c Makefile ../Makefile
$(CC) $(CFLAGS) $(CDEFS) -DPOSTMAP=\"${POSTMAP}\" \
-DPOSTMAP_ARG=\"${POSTMAP_ARG}\" -o virtualwrapper virtualwrapper.c
subst:
@echo "Doing multiple substitutions while installing binaries..."
@( \
......@@ -184,6 +196,7 @@ subst:
CONFIG=$(CONFIG); export CONFIG;\
SYMPA_VERSION=$(SYMPA_VERSION); export SYMPA_VERSION;\
SENDMAIL_ALIASES=$(SENDMAIL_ALIASES); export SENDMAIL_ALIASES;\
VIRTUAL_ALIASES=$(VIRTUAL_ALIASES); export VIRTUAL_ALIASES;\
$(PERL) ../subst.pl $(sbin_SRC) \
)
@echo "Doing multiple substitutions while installing libraries ..."
......@@ -200,6 +213,7 @@ subst:
CONFIG=$(CONFIG); export CONFIG;\
SYMPA_VERSION=$(SYMPA_VERSION); export SYMPA_VERSION;\
SENDMAIL_ALIASES=$(SENDMAIL_ALIASES); export SENDMAIL_ALIASES;\
VIRTUAL_ALIASES=$(VIRTUAL_ALIASES); export VIRTUAL_ALIASES;\
$(PERL) ../subst.pl $(lib_SRC) \
)
......
#!--PERL--
# postfix_manager.pl - this script is intended to automatically create
# list aliases for Postfix when using Sympa.
# Aliases can be added or removed in files --SENDMAIL_ALIASES--
# and --VIRTUAL_ALIASES-- (for virtual hosts).
# RCS Identication ; $Revision$ ; $Date$
#
# Sympa - SYsteme de Multi-Postage Automatique
# Copyright (c) 1997, 1998, 1999, 2000, 2001 Comite Reseau des Universites
# Copyright (c) 1997,1998, 1999 Institut Pasteur & Christophe Wolfhugel
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
## Load Sympa.conf
use lib '--LIBDIR--';
use Conf;
unless (Conf::load('--CONFIG--')) {