Date: Sat, 10 Apr 2004 05:05:05 +0300 From: "Ion-Mihai Tetcu" <itetcu@apropo.ro> To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org> Subject: ports/65384: [PATCH] mail/dspam: fix pkg-plist; fix bug in LDA argument passing; add more OPTIONS Message-ID: <1081562705.0@it.buh.cameradicommercio.ro> Resent-Message-ID: <200404100210.i3A2ADf2046313@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 65384 >Category: ports >Synopsis: [PATCH] mail/dspam: fix pkg-plist; fix bug in LDA argument passing; add more OPTIONS >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Apr 09 19:10:12 PDT 2004 >Closed-Date: >Last-Modified: >Originator: Ion-Mihai Tetcu >Release: FreeBSD 5.2-CURRENT i386 >Organization: Tecnik'93 >Environment: System: FreeBSD 5.2-CURRENT #1: Fri Apr 9 17:48:56 EEST 2004 [..]/usr/obj/usr/src/sys/KSE_ULE_UP_apic_2004_04_09 # pkg_info postfix\* | head -n1 Information for postfix-2.0.19,1 # grep dspam /usr/local/etc/postfix/main.cf mailbox_command = /usr/local/bin/dspam --user "$USER" --deliver-spam -s "$USER" # pkg_info dspam\* | head -n1 Information for dspam-2.10.3: # cat /usr/local/etc/dspam/untrusted.mailer_args /usr/libexec/mail.local -s %u >Description: Following a discussion on dspam-users mailing list, dpsam ships now with two .sql for creating the mysql tables: mysql_objects.sql.space.optimized and mysql_objects.sql.speed.optimized As a note, I doubt that there is much "space" optimization with the respective table structure, due to the stored data pattern. The current Makefile doesn't install them and tries to remove mysql_objects.sql on deinstall; the pkg-plist doesn't include them. Included Makefile.diff and pkg-plist.diff should fix that.[1] If compiled with trusted user security (default), dspam doesn't pass the destination recipient to the LDA (the last word from the untrusted.mailer_args); included patch-dpsam.c fixes that. [2] IMHO OPTIONS are there to be used, so I've also added some; feel free to drop them, if you want (for installing only the little fix in Makefile.diff post-patch: @@ -91,7 +137,7 @@ is enough). [3] Bumped PORTREVISON in the patch. [1] Env: postfix-2.0.19, mail.local as LDA, -r-s--x--x on dpsam binary; if someone finds a way to run dspam from postfix/local without o=x, please let me know. >How-To-Repeat: [1] Obvious (make extract and see work/dspam/tools.mysql_drv). [2] Compile dspam --with-trusted-users-security (default), use mail.local as LDA (default), don't put something after therecipient in untrusted.mailer_args [3] - >Fix: --- pkg-plist.diff begins here --- --- pkg-plist.orig Mon Feb 2 12:17:30 2004 +++ pkg-plist Fri Apr 9 21:00:03 2004 @@ -20,7 +20,8 @@ %%PORTDOCS%%@dirrm %%DOCSDIR%% %%MYSQL%%%%EXAMPLESDIR%%/README %%MYSQL%%%%EXAMPLESDIR%%/mysql.data -%%MYSQL%%%%EXAMPLESDIR%%/mysql_objects.sql +%%MYSQL%%%%EXAMPLESDIR%%/mysql_objects.sql.space.optimized +%%MYSQL%%%%EXAMPLESDIR%%/mysql_objects.sql.speed.optimized %%MYSQL%%%%EXAMPLESDIR%%/purge.sql %%MYSQL%%%%EXAMPLESDIR%%/virtual_users.sql %%MYSQL%%@dirrm %%EXAMPLESDIR%% --- pkg-plist.diff ends here --- --- Makefile.diff begins here --- --- Makefile.orig Fri Apr 9 20:59:04 2004 +++ Makefile Fri Apr 9 23:52:41 2004 @@ -7,6 +7,7 @@ PORTNAME= dspam PORTVERSION= 2.10.3 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= http://www.nuclearelephant.com/projects/dspam/sources/ @@ -14,12 +15,21 @@ COMMENT= A server-side bayesian spam filter OPTIONS= MYSQL "Use MySQL and not db4 as database" off \ + MYSQL_COMPRESS "Compress dspam <--> MySQL" off \ MAILDROP "Use Maildrop as local delivery agent" off \ PROCMAIL "Use Procmail as local delivery agent" off \ QMAIL "Play nice with Qmail mail server" off \ ENABLE_SPAM_DELIVERY "Deliver messages marked as spam" off \ SIGNATURE_HEADERS "Put signatures in the header" off \ - WHITELIST "Automatic whitelisting of ham" off + WHITELIST "Automatic whitelisting of ham" off \ + OPT_IN "Enable opt in" off \ + TRUSTED_USERS "Disable trusted user security" off \ + TUM "Enables TuM (Train until Mature)" on \ + ALT_BAYESIAN "Enable alternative-bayesian" on \ + NO_BIAS "Disable bias" off \ + VIRT_USERS "Enable virtual users (need MYSQL)" off \ + SAT "Enable spam source address logging" off \ + VERBOSE_DEBUG "Enable verbose debug" off USE_LIBTOOL_VER=13 USE_REINPLACE= yes @@ -51,6 +61,10 @@ SED_SCRIPT+= -e '/%%MYSQL%%/D' .endif +.if defined(WITH_MYSQL_COMPRESS) +CONFIGURE_ARGS+= --enable-client-compression +.endif + .if defined(WITH_MAILDROP) RUN_DEPENDS= maildrop:${PORTSDIR}/mail/maildrop CONFIGURE_ARGS+= --with-local-delivery-agent='${LOCALBASE}/bin/maildrop $u' @@ -81,6 +95,38 @@ CONFIGURE_ARGS+= --enable-whitelist .endif +.if defined(WITH_OPT_IN) +CONFIGURE_ARGS+= --enable-opt-in +.endif + +.if defined(WITH_TRUSTED_USERS) +CONFIGURE_ARGS+= --disable-trusted-user-security +.endif + +.if defined(WITH_TUM) +CONFIGURE_ARGS+= --enable-tum +.endif + +.if defined(WITH_ALT_BAYESIAN) +CONFIGURE_ARGS+= --enable-alternative-bayesian +.endif + +.if defined(WITH_NO_BIAS) +CONFIGURE_ARGS+= --disable-bias +.endif + +.if defined(WITH_VIRT_USERS) +CONFIGURE_ARGS+= --enable-virtual-users +.endif + +.if defined(WITH_SAT) +CONFIGURE_ARGS+= --enable-source-address-tracking +.endif + +.if defined(WITH_VERBOSE_DEBUG) +CONFIGURE_ARGS+= --enable-verbose-debug +.endif + DOCS= CHANGE README post-patch: @@ -91,7 +137,7 @@ .if defined(WITH_MYSQL) @${MKDIR} ${EXAMPLESDIR} cd ${WRKSRC}/tools.mysql_drv && \ - ${INSTALL_DATA} README *.sql ${EXAMPLESDIR} + ${INSTALL_DATA} README *.sql.* ${EXAMPLESDIR} ${INSTALL_DATA} ${FILESDIR}/mysql.data ${EXAMPLESDIR} .endif .if !defined(NOPORTDOCS) --- Makefile.diff ends here --- --- files/patch-dspam.c begins here --- --- dspam.c.orig Fri Apr 9 20:35:37 2004 +++ dspam.c Fri Apr 9 20:36:03 2004 @@ -2422,12 +2422,12 @@ i++; } } - arg = strsep (&margs, " "); - + if (arg != NULL) { strlcat (args, a, sizeof(args)); strlcat (args, " ", sizeof (args)); } + arg = strsep (&margs, " "); } free (mmargs); --- files/dspam.c ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1081562705.0>