diff --git a/indimail-mta-x/Makefile b/indimail-mta-x/Makefile index 92267032a..80a500d96 100644 --- a/indimail-mta-x/Makefile +++ b/indimail-mta-x/Makefile @@ -900,12 +900,12 @@ qmail.h conf-queue qscanq-stdin: load qscanq-stdin.o auto_qmail.o \ auto_prefix.o auto_spool.o mkfn.o do_ripmime.o auto_ripmime_cmd.o \ do_scan.o auto_scancmd.o do_cleanq.o auto_cleaner.o qregex.o \ -wildmat.o variables.o control.o auto_control.o \ +variables.o control.o auto_control.o \ fmt_xpid.o qmulti.o custom_error.o getqueue.o rt.lib ./load qscanq-stdin auto_qmail.o \ auto_prefix.o auto_spool.o mkfn.o do_ripmime.o \ auto_ripmime_cmd.o do_scan.o auto_scancmd.o do_cleanq.o \ - auto_cleaner.o qregex.o wildmat.o control.o variables.o \ + auto_cleaner.o qregex.o control.o variables.o \ auto_control.o fmt_xpid.o qmulti.o custom_error.o \ getqueue.o `cat rt.lib` $(QMAILLIB) @@ -1086,12 +1086,12 @@ qlx.h ./compile qmail-getpw.c qmail-inject: load qmail-inject.o headerbody.o hfield.o \ -newfield.o quote.o control.o qmail.o envrules.o wildmat.o \ +newfield.o quote.o control.o qmail.o envrules.o \ srs.o rcpthosts.o auto_control.o parse_env.o do_match.o \ variables.o set_environment.o auto_qmail.o auto_prefix.o srs.lib ./load qmail-inject headerbody.o hfield.o newfield.o \ quote.o control.o qmail.o envrules.o do_match.o \ - wildmat.o srs.o rcpthosts.o auto_control.o variables.o \ + srs.o rcpthosts.o auto_control.o variables.o \ auto_qmail.o auto_prefix.o parse_env.o \ set_environment.o $(static_option) $(QMAILLIB) \ -L../libsrs2-x/libsrs2/.libs `cat srs.lib` $(dynamic_option) @@ -1111,11 +1111,11 @@ hassrs.h set_environment.h conf-srs envrules.o: \ compile envrules.c envrules.h control.h \ -wildmat.h parse_env.h +parse_env.h ./compile envrules.c do_match.o: \ -compile do_match.c do_match.h wildmat.h +compile do_match.c do_match.h ./compile do_match.c parse_env.o: \ @@ -1385,11 +1385,11 @@ compile mailfilter.c mailfilter.h qmulti.h qmail.h spawn-filter: \ load spawn-filter.o variables.o report.o auto_qmail.o \ -auto_prefix.o control.o wildmat.o qregex.o parse_env.o \ +auto_prefix.o control.o qregex.o parse_env.o \ auto_control.o envrules.o getDomainToken.o do_match.o \ socket.lib dns.lib ./load spawn-filter variables.o report.o auto_qmail.o \ - auto_prefix.o control.o wildmat.o qregex.o auto_control.o \ + auto_prefix.o control.o qregex.o auto_control.o \ getDomainToken.o envrules.o parse_env.o do_match.o \ $(static_option) $(QMAILLIB) $(dynamic_option) \ `cat dns.lib socket.lib` -lm @@ -1421,7 +1421,7 @@ compile report.c report.h ./compile report.c getDomainToken.o: \ -compile getDomainToken.c getDomainToken.h wildmat.h \ +compile getDomainToken.c getDomainToken.h \ parse_env.h ./compile getDomainToken.c @@ -1452,11 +1452,11 @@ qmail-queue: \ load qmail-queue.o triggerpull.o fmtqfn.o get_uid.o auto_split.o \ auto_uids.o variables.o auto_prefix.o auto_qmail.o do_match.o \ control.o auto_control.o strsalloc.o custom_error.o getqueue.o \ -syncdir.o wildmat.o socket.lib rt.lib +syncdir.o socket.lib rt.lib ./load qmail-queue triggerpull.o fmtqfn.o get_uid.o auto_split.o \ auto_uids.o auto_prefix.o variables.o auto_qmail.o do_match.o \ control.o auto_control.o strsalloc.o custom_error.o getqueue.o \ - syncdir.o wildmat.o $(static_option) $(QMAILLIB) $(dynamic_option) \ + syncdir.o $(static_option) $(QMAILLIB) $(dynamic_option) \ `cat socket.lib rt.lib` qmail-queue.8: \ @@ -1513,12 +1513,12 @@ trydkim.c compile dns.lib dkim.lib conf-indi rm -f trydkim2.o trydkim2 qmail-dkim: qmail-dkim.o auto_control.o pidopen.o auto_prefix.o \ -variables.o control.o dns_text.o wildmat.o getDomainToken.o \ +variables.o control.o dns_text.o getDomainToken.o \ qmulti.o auto_qmail.o custom_error.o getqueue.o parse_env.o \ dns.lib dkim.lib rt.lib conf-ld-$(SYSTEM) load ./load qmail-dkim auto_control.o qmulti.o auto_prefix.o \ variables.o control.o pidopen.o dns_text.o custom_error.o \ - -L../libdkim2-x/.libs `cat dkim.lib` wildmat.o parse_env.o \ + -L../libdkim2-x/.libs `cat dkim.lib` parse_env.o \ getDomainToken.o getqueue.o `cat conf-ld-$(SYSTEM) 2>/dev/null` \ auto_qmail.o $(static_option) $(QMAILLIB) \ $(dynamic_option) -lcrypto `cat dns.lib rt.lib` @@ -1621,11 +1621,11 @@ qmail-send: \ load qmail-send.o qsutil.o control.o newfield.o prioq.o parse_env.o \ trigger.o fmtqfn.o quote.o readsubdir.o qmail.o do_match.o \ auto_qmail.o srs.o rcpthosts.o auto_control.o auto_split.o \ -variables.o getDomainToken.o do_rate.o envrules.o qregex.o wildmat.o \ +variables.o getDomainToken.o do_rate.o envrules.o qregex.o \ auto_prefix.o delivery_rate.o syncdir.o srs.lib rt.lib ./load qmail-send qsutil.o control.o newfield.o \ prioq.o trigger.o fmtqfn.o quote.o readsubdir.o \ - getDomainToken.o do_rate.o wildmat.o qmail.o auto_qmail.o \ + getDomainToken.o do_rate.o qmail.o auto_qmail.o \ auto_split.o variables.o envrules.o srs.o do_match.o \ delivery_rate.o rcpthosts.o auto_control.o auto_prefix.o \ syncdir.o parse_env.o $(static_option) \ @@ -1682,12 +1682,12 @@ slowq-send: \ load slowq-send.o qsutil.o control.o newfield.o prioq.o \ trigger.o fmtqfn.o quote.o readsubdir.o qmail.o do_match.o \ auto_qmail.o srs.o rcpthosts.o auto_control.o auto_split.o \ -variables.o envrules.o parse_env.o qregex.o wildmat.o \ +variables.o envrules.o parse_env.o qregex.o \ getDomainToken.o do_rate.o delivery_rate.o auto_prefix.o \ syncdir.o srs.lib ./load slowq-send qsutil.o control.o newfield.o \ prioq.o trigger.o fmtqfn.o quote.o readsubdir.o \ - do_rate.o wildmat.o qmail.o auto_qmail.o auto_split.o \ + do_rate.o qmail.o auto_qmail.o auto_split.o \ variables.o envrules.o parse_env.o srs.o do_match.o \ rcpthosts.o delivery_rate.o auto_control.o getDomainToken.o \ auto_prefix.o syncdir.o \ @@ -1869,7 +1869,7 @@ compile valid_hname.c qmail_smtpd.so: \ smtpd.o rcpthosts.o recipients.o indimail_stub.o ip.o ipme.o \ ipalloc.o strsalloc.o control.o etrn.o atrn.o received.o \ -wildmat.o qmail.o variables.o envrules.o auto_qmail.o \ +qmail.o variables.o envrules.o auto_qmail.o \ bodycheck.o sqlmatch.o qcount_dir.o mail_acl.o do_match.o \ socket_ip4loopback.o socket_v6loopback.o socket_v4mappedprefix.o \ socket_v6any.o spf.o dns.o auto_uids.o qregex_sql.o srs.o \ @@ -1881,7 +1881,7 @@ read_assign.o socket.lib dns.lib tls.lib gsasl.lib mysql_config $(CC) -dynamiclib -o qmail_smtpd.so smtpd.o rcpthosts.o \ valid_hname.o recipients.o indimail_stub.o load_mysql.o \ qcount_dir.o ip.o ipme.o ipalloc.o strsalloc.o control.o \ - etrn.o atrn.o received.o wildmat.o qmail.o auto_qmail.o \ + etrn.o atrn.o received.o qmail.o auto_qmail.o \ variables.o envrules.o bodycheck.o spf.o dns.o srs.o \ sqlmatch.o socket_v4mappedprefix.o parse_env.o do_match.o \ socket_ip4loopback.o socket_v6loopback.o socket_v6any.o \ @@ -1895,7 +1895,7 @@ read_assign.o socket.lib dns.lib tls.lib gsasl.lib mysql_config $(CC) -shared -rdynamic -nostartfiles -fPIC -s -O4 -o qmail_smtpd.so \ smtpd.o rcpthosts.o recipients.o auto_control.o auto_assign.o \ qcount_dir.o ip.o ipme.o ipalloc.o strsalloc.o control.o etrn.o atrn.o \ - received.o wildmat.o qmail.o variables.o envrules.o parse_env.o srs.o \ + received.o qmail.o variables.o envrules.o parse_env.o srs.o \ bodycheck.o spf.o dns.o sqlmatch.o auto_qmail.o do_match.o valid_hname.o \ socket_v4mappedprefix.o socket_ip4loopback.o socket_v6loopback.o \ socket_v6any.o mail_acl.o auto_uids.o qregex_sql.o tablematch.o \ @@ -1909,7 +1909,7 @@ read_assign.o socket.lib dns.lib tls.lib gsasl.lib mysql_config qmail-smtpd: \ load qmail-smtpd.o smtpd.o rcpthosts.o recipients.o parse_env.o \ ip.o ipme.o ipalloc.o strsalloc.o control.o etrn.o atrn.o \ -received.o wildmat.o qmail.o variables.o auto_control.o \ +received.o qmail.o variables.o auto_control.o \ envrules.o bodycheck.o sqlmatch.o indimail_stub.o do_match.o \ socket_ip4loopback.o socket_v6loopback.o socket_v4mappedprefix.o \ socket_v6any.o mail_acl.o spf.o dns.o auto_uids.o auto_qmail.o \ @@ -1920,7 +1920,7 @@ read_assign.o valid_hname.o socket.lib dns.lib tls.lib gsasl.lib srs.lib \ mysql_config conf-sql ./load qmail-smtpd smtpd.o rcpthosts.o recipients.o srs.o \ ip.o ipme.o ipalloc.o strsalloc.o control.o etrn.o atrn.o \ - qcount_dir.o received.o wildmat.o qmail.o variables.o \ + qcount_dir.o received.o qmail.o variables.o \ envrules.o bodycheck.o spf.o dns.o sqlmatch.o auto_qmail.o \ socket_v4mappedprefix.o socket_ip4loopback.o do_match.o \ socket_v6loopback.o socket_v6any.o mail_acl.o auto_uids.o \ @@ -1969,7 +1969,7 @@ compile mini-smtpd.c auto_qmail.h control.h received.h ipme.h ip.h \ qmail.h rcpthosts.h buffer_defs.h ./compile mini-smtpd.c -mail_acl.o: compile mail_acl.c wildmat.h varargs.h +mail_acl.o: compile mail_acl.c varargs.h ./compile mail_acl.c indimail_stub.o: \ @@ -1979,7 +1979,7 @@ variables.h indimail_stub.h qregex.o: \ compile qregex.c qregex.h control.h \ -variables.h auto_control.h wildmat.h +variables.h auto_control.h ./compile qregex.c mysql_inc: mysql_config @@ -2473,10 +2473,6 @@ triggerpull.o: \ compile triggerpull.c triggerpull.h ./compile triggerpull.c -wildmat.o: \ -compile wildmat.c - ./compile wildmat.c - variables.o: \ compile variables.c variables.h haveip6.h conf-ip ./compile variables.c @@ -2558,11 +2554,11 @@ qmail-rm.1: qmail-rm.9 conf-qmail conf-split autoresponder: load autoresponder.o auto_sysconfdir.o \ variables.o control.o quote.o auto_control.o srs.o rcpthosts.o \ ip.o ipme.o ipalloc.o socket_v4mappedprefix.o socket_v6any.o \ -qregex.o wildmat.o auto_prefix.o conf-srs +qregex.o auto_prefix.o conf-srs ./load autoresponder auto_control.o auto_sysconfdir.o \ variables.o control.o quote.o ip.o ipme.o ipalloc.o \ socket_v4mappedprefix.o socket_v6any.o qregex.o \ - wildmat.o auto_prefix.o srs.o rcpthosts.o $(QMAILLIB) \ + auto_prefix.o srs.o rcpthosts.o $(QMAILLIB) \ -L../libsrs2-x/libsrs2/.libs `cat srs.lib` autoresponder.o: \ @@ -3510,14 +3506,14 @@ batv.o: compile batv.c conf-batv batv.h ./compile `grep -h -v "^#" conf-batv` batv.c uacl: \ -load uacl.o mail_acl.o wildmat.o control.o \ +load uacl.o mail_acl.o control.o \ variables.o qregex.o do_match.o auto_control.o - ./load uacl mail_acl.o wildmat.o control.o \ + ./load uacl mail_acl.o control.o \ variables.o qregex.o do_match.o auto_control.o $(QMAILLIB) uacl.o: \ compile uacl.c qregex.h mail_acl.h control.h \ -wildmat.h varargs.h +varargs.h ./compile uacl.c qmail-sql: \ @@ -3649,7 +3645,7 @@ load drate.o variables.o auto_uids.o auto_qmail.o \ auto_control.o control.o do_rate.o getDomainToken.o \ parse_env.o get_uid.o ./load drate variables.o auto_uids.o parse_env.o \ - auto_qmail.o do_rate.o getDomainToken.o wildmat.o \ + auto_qmail.o do_rate.o getDomainToken.o \ auto_control.o control.o get_uid.o -lm $(QMAILLIB) drate.o: \ @@ -3949,7 +3945,7 @@ rd-remote: \ load rd-remote.o control.o variables.o auto_control.o auto_prefix.o \ do_match.o quote.o ./load rd-remote control.o variables.o auto_control.o auto_prefix.o \ - wildmat.o do_match.o quote.o $(QMAILLIB) + do_match.o quote.o $(QMAILLIB) printass.o: \ compile printass.c read_assign.h auto_assign.h diff --git a/indimail-mta-x/do_match.c b/indimail-mta-x/do_match.c index a93a3147e..ccf2a31cd 100644 --- a/indimail-mta-x/do_match.c +++ b/indimail-mta-x/do_match.c @@ -1,5 +1,5 @@ /* - * $Id: do_match.c,v 1.2 2024-05-09 22:03:17+05:30 mbhangui Exp mbhangui $ + * $Id: do_match.c,v 1.3 2024-05-23 17:15:20+05:30 Cprogrammer Exp mbhangui $ */ #include @@ -35,13 +35,13 @@ do_match(int use_regex, const char *text, const char *regex, const char *errStr[ return (AM_REGEX_ERR); } } else - return (wildmat_internal(text, regex)); + return (wildmat(text, regex)); } void getversion_do_match_c() { - const char *x = "$Id: do_match.c,v 1.2 2024-05-09 22:03:17+05:30 mbhangui Exp mbhangui $"; + const char *x = "$Id: do_match.c,v 1.3 2024-05-23 17:15:20+05:30 Cprogrammer Exp mbhangui $"; x = sccsidwildmath; x++; } diff --git a/indimail-mta-x/doc/ChangeLog b/indimail-mta-x/doc/ChangeLog index cfedb373a..e85120120 100644 --- a/indimail-mta-x/doc/ChangeLog +++ b/indimail-mta-x/doc/ChangeLog @@ -29,6 +29,9 @@ Release @version@-@release@ Start 05/02/2024 End XX/XX/XXXX - 22/05/2024 14. svctool: fix checking for vadddomain path 15. svctool: fix db creation for MariaDB > v10.3 +- 23/05/2024 +16. do_match.c, getDowmainToken.c, qregex.c renamed wildmat_internal to wildmat +16. svctool: added --sysconfdir for indisrvr service creation * Sun Mar 03 2024 12:20:15 +0000 Manvendra Bhangui 3.0.7-1.1%{?dist} Release 3.0.7-1.1 Start 02/01/2024 End 03/02/2024 diff --git a/indimail-mta-x/getDomainToken.c b/indimail-mta-x/getDomainToken.c index 950aaaee5..2bf6a9797 100644 --- a/indimail-mta-x/getDomainToken.c +++ b/indimail-mta-x/getDomainToken.c @@ -1,5 +1,8 @@ /* * $Log: getDomainToken.c,v $ + * Revision 1.9 2024-05-23 17:16:18+05:30 Cprogrammer + * renamed wildmat_internal to wildmat + * * Revision 1.8 2024-05-09 22:03:17+05:30 mbhangui * fix discarded-qualifier compiler warnings * @@ -98,7 +101,7 @@ getDomainToken(const char *domain, stralloc *sa) retval = (REGEXEC(qreg, domain) == REG_NOMATCH ? 1 : REG_NOERROR); regfree(&qreg); } else - retval = !wildmat_internal(domain, ptr); + retval = !wildmat(domain, ptr); } *p1 = ':'; if (!retval) { /*- match occurred for domain or wildcard */ @@ -146,7 +149,7 @@ getDomainToken(const char *domain, stralloc *sa) void getversion_getdomaintoke_c() { - const char *x = "$Id: getDomainToken.c,v 1.8 2024-05-09 22:03:17+05:30 mbhangui Exp mbhangui $"; + const char *x = "$Id: getDomainToken.c,v 1.9 2024-05-23 17:16:18+05:30 Cprogrammer Exp mbhangui $"; x = sccsidwildmath; x = sccsidgetdomainth; diff --git a/indimail-mta-x/qregex.c b/indimail-mta-x/qregex.c index 372528f53..afa595fcb 100644 --- a/indimail-mta-x/qregex.c +++ b/indimail-mta-x/qregex.c @@ -1,11 +1,11 @@ /* - * $Id: qregex.c,v 1.38 2024-05-09 22:03:17+05:30 mbhangui Exp mbhangui $ + * $Id: qregex.c,v 1.39 2024-05-23 17:16:52+05:30 Cprogrammer Exp mbhangui $ * * qregex (v2) * Author : Evan Borgstrom (evan at unixpimps dot org) * Created : 2001/12/14 23:08:16 - * Modified: $Date: 2024-05-09 22:03:17+05:30 $ - * Revision: $Revision: 1.38 $ + * Modified: $Date: 2024-05-23 17:16:52+05:30 $ + * Revision: $Revision: 1.39 $ * * Do POSIX regex matching on addresses for anti-relay / spam control. * It logs to the maillog @@ -184,7 +184,7 @@ wildmat_match(stralloc *addr, struct constmap *ptrmap, stralloc *wildcard) subvalue = wildcard->s[i] != '!'; if (!subvalue) i++; - if ((k != subvalue) && wildmat_internal(addr->s, wildcard->s + i)) + if ((k != subvalue) && wildmat(addr->s, wildcard->s + i)) k = subvalue; i = j + 1; } @@ -239,7 +239,7 @@ regex_match(stralloc *addr, stralloc *map, const char *errStr[]) void getversion_qregex_c() { - const char *x = "$Id: qregex.c,v 1.38 2024-05-09 22:03:17+05:30 mbhangui Exp mbhangui $"; + const char *x = "$Id: qregex.c,v 1.39 2024-05-23 17:16:52+05:30 Cprogrammer Exp mbhangui $"; x = sccsidwildmath; x++; @@ -247,6 +247,9 @@ getversion_qregex_c() /* * $Log: qregex.c,v $ + * Revision 1.39 2024-05-23 17:16:52+05:30 Cprogrammer + * renamed wildmat_internal to wildmat + * * Revision 1.38 2024-05-09 22:03:17+05:30 mbhangui * fix discarded-qualifier compiler warnings * diff --git a/indimail-mta-x/svctool.in b/indimail-mta-x/svctool.in index 0ffeca865..d31bbd043 100644 --- a/indimail-mta-x/svctool.in +++ b/indimail-mta-x/svctool.in @@ -1,5 +1,5 @@ # -# $Id: svctool.in,v 2.728 2024-05-22 09:26:43+05:30 Cprogrammer Exp mbhangui $ +# $Id: svctool.in,v 2.729 2024-05-23 17:17:14+05:30 Cprogrammer Exp mbhangui $ # # @@ -27,7 +27,7 @@ host=@HOST@ shared_objects=0 use_dlmopen=0 skip_sendmail_check=0 -RCSID="# \$Id: svctool.in,v 2.728 2024-05-22 09:26:43+05:30 Cprogrammer Exp mbhangui $" +RCSID="# \$Id: svctool.in,v 2.729 2024-05-23 17:17:14+05:30 Cprogrammer Exp mbhangui $" # # End of User Configuration @@ -4532,17 +4532,12 @@ fi create_clamd() { -if [ $# -lt 2 ] ; then - echo "USAGE: create_clamd clamdPrefix supervise_dir [sysconfdir]" +if [ $# -ne 2 ] ; then + echo "USAGE: create_clamd clamdPrefix supervise_dir" return 1 fi clamdPrefix=$1 SERVICEDIR=$2 -if [ $# -gt 2 ] ; then - mysysconfdir=$3 -else - mysysconfdir=$sysconfdir -fi conf_dir="$DESTDIR"$SERVICEDIR/clamd/variables if [ $nooverwrite -eq 1 -a -d $conf_dir ] ; then return 0 @@ -4563,9 +4558,9 @@ fi ( dump_run_header echo "exec 2>&1" -echo "CLAMD_SOCK=\`grep -w ^LocalSocket $mysysconfdir/scan.conf | awk '{print \$2}'\`" +echo "CLAMD_SOCK=\`grep -w ^LocalSocket $sysconfdir/scan.conf | awk '{print \$2}'\`" echo "if [ -z \"\$CLAMD_SOCK\" ] ; then" -echo " echo \"LocalSocket not defined in $mysysconfdir/scan.conf\" 1>&2" +echo " echo \"LocalSocket not defined in $sysconfdir/scan.conf\" 1>&2" echo " sleep 60" echo " exit 1" echo "fi" @@ -4591,9 +4586,9 @@ echo " /bin/rm -f \$CLAMD_SOCK" echo " fi" echo "fi" echo "" -echo "dbd=\`grep -w \"^DatabaseDirectory\" $mysysconfdir/scan.conf | awk '{print \$2}'\`" +echo "dbd=\`grep -w \"^DatabaseDirectory\" $sysconfdir/scan.conf | awk '{print \$2}'\`" echo "if [ -z \"\$dbd\" ] ; then" -echo " echo \"DatabaseDirectory not defined in $mysysconfdir/scan.conf\" 1>&2" +echo " echo \"DatabaseDirectory not defined in $sysconfdir/scan.conf\" 1>&2" echo " sleep 10" echo " exit 1" echo "fi" @@ -4602,16 +4597,16 @@ echo " echo \"run: FATAL: no signatures found...\"" echo " sleep 300" echo " exit 1" echo "fi" -echo "fgd=\`grep -w \"^Foreground\" $mysysconfdir/scan.conf | awk '{print \$2}'\`" +echo "fgd=\`grep -w \"^Foreground\" $sysconfdir/scan.conf | awk '{print \$2}'\`" echo "if [ -z \"\$fgd\" ] ; then" -echo " echo \"Foreground not defined in $mysysconfdir/scan.conf\" 1>&2" +echo " echo \"Foreground not defined in $sysconfdir/scan.conf\" 1>&2" echo " sleep 10" echo " exit 1" echo "fi" echo "" echo "# Run the scanner daemon." echo "exec $clamdPrefix/sbin/clamd \\" -echo " --config-file=$mysysconfdir/scan.conf" +echo " --config-file=$sysconfdir/scan.conf" ) > "$DESTDIR"$SERVICEDIR/clamd/run /bin/chmod +x "$DESTDIR"$SERVICEDIR/clamd/run @@ -11572,6 +11567,9 @@ case $option in usage 1 fi fi + if [ -n "$mysysconfdir" ] ; then + sysconfdir=$mysysconfdir + fi echo "Creating IndiMail Admin Service Port $bind_port, Service $servicedir, Base Path $base_path" create_indisrvr "$bind_port" "$mysql_host" "$mysql_user" "$mysql_pass" "$avg_user_quota" "$hard_quota" \ "$base_path" "$servicedir" "$use_ssl" @@ -11895,6 +11893,9 @@ case $option in ;; clamd) + if [ -n "$mysysconfdir" ] ; then + sysconfdir=$mysysconfdir + fi if [ ! -d $sysconfdir ] ; then /bin/mkdir -p $sysconfdir fi @@ -12285,12 +12286,12 @@ case $option in elif [ " $clamdPrefix" = " " ] ; then echo "clamd Installation Prefix directory not specified" 1>&2 usage 1 - elif [ " $mysysconfdir" = " " ] ; then - echo "sysconfdir not specified" 1>&2 - usage 1 + fi + if [ -n "$mysysconfdir" ] ; then + sysconfdir=$mysysconfdir fi echo "Creating Virus Scanner Service ClamdPrefix $clamdPrefix, Service $servicedir, Sysconf $sysconfdir" - create_clamd $clamdPrefix $servicedir $mysysconfdir + create_clamd $clamdPrefix $servicedir ;; 18) # create_poppass diff --git a/indimail-mta-x/wildmat.c b/indimail-mta-x/wildmat.c deleted file mode 100644 index 9e8423a9d..000000000 --- a/indimail-mta-x/wildmat.c +++ /dev/null @@ -1,153 +0,0 @@ -/*-** wildmat.c.orig Wed Dec 3 11:46:31 1997 - * $Revision: 1.8 $ - * Do shell-style pattern matching for ?, \, [], and * characters. - * Might not be robust in face of malformed patterns; e.g., "foo[a-" - * could cause a segmentation violation. It is 8bit clean. - * - * Written by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986. - * Rich $alz is now . - * April, 1991: Replaced mutually-recursive calls with in-line code - * for the star character. - * - * Special thanks to Lars Mathiesen for the ABORT code. - * This can greatly speed up failing wildcard patterns. For example: - * pattern: -*-*-*-*-*-*-12-*-*-*-m-*-*-* - * text 1: -adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1 - * text 2: -adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1 - * Text 1 matches with 51 calls, while text 2 fails with 54 calls. Without - * the ABORT code, it takes 22310 calls to fail. Ugh. The following - * explanation is from Lars: - * The precondition that must be fulfilled is that DoMatch will consume - * at least one character in text. This is true if *p is neither '*' no - * '\0'.) The last return has ABORT instead of FALSE to avoid quadratic - * behaviour in cases like pattern "*a*b*c*d" with text "abcxxxxx". With - * FALSE, each star-loop has to run to the end of the text; with ABORT - * only the last one does. - * - * Once the control of one instance of DoMatch enters the star-loop, that - * instance will return either TRUE or ABORT, and any calling instance - * will therefore return immediately after (without calling recursively - * again). In effect, only one star-loop is ever active. It would be - * possible to modify the code to maintain this context explicitly, - * eliminating all recursive calls at the cost of some complication and - * loss of clarity (and the ABORT stuff seems to be unclear enough by - * itself). I think it would be unwise to try to get this into a - * released version unless you have a good test data base to try it out - * on. - */ -#include "wildmat.h" - -/*- Match text and p, return TRUE, FALSE, or ABORT. */ -static int -DoMatch(register const char *text, register const char *p) -{ - register int last; - register int matched; - register int reverse; - - for (; *p; text++, p++) { - if (*text == '\0' && *p != '*') - return ABORT; - switch (*p) - { - case '\\': /*- Literal match with following character. */ - p++; - /*- FALLTHROUGH */ - default: - if (*text != *p) - return FALSE; - continue; - case '?': /*- Match anything. */ - continue; - case '*': - /*- Consecutive stars act just like one. */ - while (*++p == '*') - continue; - /*- Trailing star matches everything. */ - if (*p == '\0') - return TRUE; - while (*text) - if ((matched = DoMatch(text++, p)) != FALSE) - return matched; - return ABORT; - case '[': - reverse = p[1] == NEGATE_CLASS ? TRUE : FALSE; - /*- Inverted character class. */ - if (reverse) - p++; - matched = FALSE; - if (p[1] == ']' || p[1] == '-') { - if (*++p == *text) - matched = TRUE; - } - for (last = *p; *++p && *p != ']'; last = *p) { - /*- This next line requires a good C compiler. */ - if (*p == '-' && p[1] != ']' ? *text <= *++p && *text >= last : *text == *p) - matched = TRUE; - } - if (matched == reverse) - return FALSE; - continue; - } - } - -#ifdef MATCH_TAR_PATTERN - if (*text == '/') - return TRUE; -#endif /*- MATCH_TAR_PATTERN */ - return *text == '\0'; -} - -/*- User-level routine. Returns TRUE or FALSE. */ -int -wildmat_internal(const char *text, const char *p) -{ -#ifdef OPTIMIZE_JUST_STAR - if (p[0] == '*' && p[1] == '\0') - return TRUE; -#endif /*- OPTIMIZE_JUST_STAR */ - return DoMatch(text, p) == TRUE; -} - -#if defined(TEST) -include -/*- Yes, we use gets not fgets. Sue me. */ - -int -main() -{ - char p[80]; - char text[80]; - - printf("Wildmat tester. Enter pattern, then strings to test.\n"); - printf("A blank line gets prompts for a new pattern; a blank pattern\n"); - printf("exits the program.\n"); - for (;;) { - printf("\nEnter pattern: "); - (void) fflush(stdout); - if (gets(p) == NULL || p[0] == '\0') - break; - for (;;) { - printf("Enter text: "); - (void) fflush(stdout); - if (gets(text) == NULL) - exit(0); - /*- Blank line; go back and get a new pattern. */ - if (text[0] == '\0') - break; - printf(" %s\n", wildmat_internal(text, p) ? "YES" : "NO"); - } - } - exit(0); - /*- NOTREACHED */ -} -#endif /*- defined(TEST) */ - -void -getversion_wildmat_internal_c() -{ - const char *x = "$Id: wildmat.c,v 1.8 2024-05-09 22:03:17+05:30 mbhangui Exp mbhangui $"; - - x = sccsidwildmath; - x++; -} diff --git a/indimail-mta-x/wildmat.h b/indimail-mta-x/wildmat.h deleted file mode 100644 index c5f903dbf..000000000 --- a/indimail-mta-x/wildmat.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * $Log: wildmat.h,v $ - * Revision 1.2 2024-05-09 22:03:17+05:30 mbhangui - * fix discarded-qualifier compiler warnings - * - * Revision 1.1 2021-05-23 06:35:07+05:30 Cprogrammer - * Initial revision - * - */ -#ifndef _WILDMAT_H -#define _WILDMAT_H - -#ifndef lint -static const char sccsidwildmath[] = "$Id: wildmat.h,v 1.2 2024-05-09 22:03:17+05:30 mbhangui Exp mbhangui $"; -#endif - -#ifndef TRUE -#define TRUE 1 -#endif -#ifndef FALSE -#define FALSE 0 -#endif -#ifndef ABORT -#define ABORT -1 -#endif - -/*- What character marks an inverted character class? */ -#define NEGATE_CLASS '^' -/*- Is "*" a common pattern? */ -#define OPTIMIZE_JUST_STAR -/*- Do tar(1) matching rules, which ignore a trailing slash? */ -#undef MATCH_TAR_PATTERN - -int wildmat_internal(const char *, const char *); - -#endif