--- configure.orig Thu Dec 11 14:28:41 2003 +++ configure Thu Dec 11 14:28:48 2003 @@ -48,6 +48,8 @@ QSLANG="en_GB" fi +QSLANG=`echo $QSLANG|sed 's/\..*//'` + if [ ! -d "./locale/$QSLANG" ]; then echo " @@ -83,7 +83,8 @@ DEBUG_LEVEL="1" FORCE_UNZIP="0" DESCRIPTIVE_HEADERS="0" NOTIFY_ADDRESSES="sender,admin" -USERNAME="$USER" +ADMIN_MAIL="$USER" +ADMIN_REALNAME="System Anti-Virus Administrator" MANUAL_INSTALL="0" INSTALLIT="0" DONOTCONFIRM="0" @@ -100,8 +101,10 @@ do --spooldir) if [ "$2" != "" ] ; then shift ; fi ; AS_QQ="$1" ;; --qmaildir) if [ "$2" != "" ]; then shift ; fi ; QMAILDIR="$1" ;; --bindir) if [ "$2" != "" ] ; then shift ; fi ; BINDIR="$1" ;; - --user|--admin) if [ "$2" != "" ] ; then shift ; fi ; USERNAME="$1" ;; - --domain) if [ "$2" != "" ] ; then shift ; fi ; MAILDOMAIN="$1" ;; + --admin|--user) if [ "$2" != "" ] ; then shift ; fi ; ADMIN_MAIL=`echo $1 | sed 's/@/\\\\@/'` ;; + --admin-realname) if [ "$2" != "" ] ; then shift ; fi ; ADMIN_REALNAME=`echo $1 | sed 's/_/ /g'` ;; + --spams-redirect) if [ "$2" != "" ] ; then shift ; fi ; SPAMS_REDIRECT=`echo $1 | sed 's/@/\\\\@/'` ;; + --spams-tosuffix) if [ "$2" != "" ] ; then shift ; fi ; SPAMS_TOSUFFIX="$1" ;; --notify) if [ "$2" != "" ]; then shift ; fi ; NOTIFY_ADDRESSES="$1" ;; --batch) DONOTCONFIRM="1" ; if [ "$2" != "" -a "`echo $2|grep '\-'`" = "" ] ; then shift ; fi ;; --silent-viruses) if [ "$2" != "" ]; then shift ; fi ; FIND_SILENT_VIRUSES="$1" ;; @@ -130,9 +133,17 @@ valid options: --spooldir defaults to $AS_QQ/ --bindir where to install qmail-scanner-queue.pl Defaults to /var/qmail/bin/ - --admin user to Email alerts to (default: $USERNAME) - --domain "user"@"domain" makes up Email address - to Email alerts to. + --admin email to send alerts to (default: $ADMIN_MAIL) + --admin-realname <...> realname for sending alerts + Defaults to "$ADMIN_REALNAME" + nb: use '_' instead of ' ' (sorry for inconvenience) + --spams-redirect email to redirect detected spams to + Defaults to empty (no redirection) + --spams-tosuffix suffix to alter recipient with + i.e. recipient user@domain + will be transform into user-suffix@domain + Defaults to empty (do not alter recipients) + nb: 'spams-admin' option has precedence on this --scanners Defaults to "auto" - will use whatever scanners are found on system. @@ -911,12 +922,16 @@ fi if [ "$UNAME" ] ; then FQDN="$UNAME" ; fi if [ "$HOST" ] ; then FQDN="$HOST" ; fi -MAILDOMAIN=${MAILDOMAIN:-$FQDN} -LOCAL_DOMAINS_ARRAY=${LOCAL_DOMAINS_ARRAY:-$MAILDOMAIN} -CMDLINE="$0 --spooldir $AS_QQ --qmaildir $QMAILDIR --bindir $BINDIR --qmail-queue-binary $QMAILQUEUE_BIN --admin $USERNAME --domain $MAILDOMAIN --notify $NOTIFY_ADDRESSES --local-domains $LOCAL_DOMAINS_ARRAY --silent-viruses $SILENT_VIRUSES --lang $QSLANG --debug $DEBUG_LEVEL --unzip $FORCE_UNZIP --add-dscr-hdrs $DESCRIPTIVE_HEADERS --archive $ARCHIVEIT --redundant $REDUNDANT --log-details $LOG_DETAILS --log-crypto $LOG_CRYPTO --fix-mime $FIX_MIME --scanners \"$SCANNERS\"" - +LOCAL_DOMAINS_ARRAY=${LOCAL_DOMAINS_ARRAY:-$FQDN} +CMDLINE="$0 --spooldir $AS_QQ --qmaildir $QMAILDIR --bindir $BINDIR --qmail-queue-binary $QMAILQUEUE_BIN --admin $ADMIN_MAIL --admin-realname \"$ADMIN_REALNAME\" --notify $NOTIFY_ADDRESSES --local-domains $LOCAL_DOMAINS_ARRAY --silent-viruses $SILENT_VIRUSES --lang $QSLANG --debug $DEBUG_LEVEL --unzip $FORCE_UNZIP --add-dscr-hdrs $DESCRIPTIVE_HEADERS --archive $ARCHIVEIT --redundant $REDUNDANT --log-details $LOG_DETAILS --log-crypto $LOG_CRYPTO --fix-mime $FIX_MIME --scanners \"$SCANNERS\"" +if [ -n "$SPAMS_REDIRECT" ]; then + CMDLINE="$CMDLINE --spams-redirect $SPAMS_REDIRECT" +fi +if [ -n "$SPAMS_TOSUFFIX" ]; then + CMDLINE="$CMDLINE --spams-tosuffix $SPAMS_TOSUFFIX" +fi if [ "$MANUAL_INSTALL" = "1" ]; then CMDLINE="$CMDLINE --no-QQ-check $MANUAL_INSTALL" fi @@ -1286,7 +1301,7 @@ if [ "$SPAMC_BINARY" != "" ]; then fi fi -USERNAME=${USERNAME:-$LOGNAME} +ADMIN_MAIL=${ADMIN_MAIL:-$LOGNAME} SCANNER_ARRAY=`echo $SCANNER_ARRAY|sed 's/^,//g'` @@ -1360,7 +1375,13 @@ if [ "$ARCHIVEIT" != "0" ]; then fi echo "archiving $ASTRING into $AS_QQ/$ARCHIVEDIR/" fi -echo "virus-admin=$USERNAME@$MAILDOMAIN" +echo "admin=$ADMIN_MAIL" +if [ -n "$SPAMS_REDIRECT" ]; then + echo "spams-admin=$SPAMS_REDIRECT" +fi +if [ -n "$SPAMS_TOSUFFIX" ]; then + echo "spams-suffix=$SPAMS_TOSUFFIX" +fi echo "local-domains=$LOCAL_DOMAINS_ARRAY" echo "silent-viruses=$FIND_SILENT_VIRUSES_ARRAY" echo "scanners=$SCANNER_ARRAY" @@ -1506,10 +1527,12 @@ s?SPAMASSASSIN_BINARY?$SPAMASSASSIN_BINA s?SPAMC_BINARY?$SPAMC_BINARY?g; s?SPAMC_OPTIONS?$SPAMC_OPTIONS?g; s?SPAMC_SUBJECT?$SPAMC_SUBJECT?g; -s?USERNAME?$USERNAME?g; +s?ADMIN_MAIL?$ADMIN_MAIL?g; +s?ADMIN_REALNAME?$ADMIN_REALNAME?g; +s?SPAMS_REDIRECT?$SPAMS_REDIRECT?g; +s?SPAMS_TOSUFFIX?$SPAMS_TOSUFFIX?g; s?SKIP_TEXT_MSGS?$SKIP_TEXT_MSGS?g; s?FQDN?$FQDN?g; -s?MAILDOMAIN?$MAILDOMAIN?g; s?LOCAL_DOMAINS_ARRAY?$LOCAL_DOMAINS_ARRAY?g; s?NOTIFY_ADDRESSES?$NOTIFY_ADDRESSES?g; s?FIND?$FIND?g;