Hello community,
here is the log from the commit of package mlmmj
checked in at Thu Sep 7 01:23:03 CEST 2006.
--------
--- mlmmj/mlmmj.changes 2006-08-03 12:18:36.000000000 +0200
+++ mlmmj/mlmmj.changes 2006-09-06 18:23:07.000000000 +0200
@@ -1,0 +2,18 @@
+Wed Sep 6 18:22:29 CEST 2006 - hvogel@suse.de
+
+- split patches better
+- include listtexts
+- add nonomail tuneable
+
+-------------------------------------------------------------------
+Wed Sep 6 16:39:47 CEST 2006 - ssommer@suse.de
+
+- use the send_help function to send faq, help, nodigestsub texts
+
+-------------------------------------------------------------------
+Wed Sep 6 15:16:18 CEST 2006 - ssommer@suse.de
+
+- updated to mlmmj-1.2.12-RC1
+- updated patches to use the new logging functions
+
+-------------------------------------------------------------------
Old:
----
mlmmj-1.2.11.tar.bz2
New:
----
mlmmj-1.2.12-RC1.tar.bz2
mlmmj-nonomailsub.patch
mlmmj-send_help-generic.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mlmmj.spec ++++++
--- /var/tmp/diff_new_pack.cATgza/_old 2006-09-07 01:22:23.000000000 +0200
+++ /var/tmp/diff_new_pack.cATgza/_new 2006-09-07 01:22:23.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package mlmmj (Version 1.2.11)
+# spec file for package mlmmj (Version 1.2.12_RC1)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -13,16 +13,18 @@
Name: mlmmj
License: X11/MIT
Group: Productivity/Networking/Email/Mailinglists
-Version: 1.2.11
-Release: 19
+Version: 1.2.12_RC1
+Release: 1
URL: http://mlmmj.mmj.dk/
Summary: Mail Server Independent Reimplementation of the EZMLM Mailing List
-Source0: %name-%version.tar.bz2
+Source0: %name-1.2.12-RC1.tar.bz2
Patch0: rFastTemplate.diff
Patch1: %{name}-1.2.11_subscriber_mmap.patch
-Patch2: %{name}-faq.patch
-Patch3: %{name}-nodigestsub.patch
-Patch4: %{name}-log.patch
+Patch2: %{name}-send_help-generic.patch
+Patch3: %{name}-faq.patch
+Patch4: %{name}-nodigestsub.patch
+Patch5: %{name}-nonomailsub.patch
+Patch6: %{name}-log.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -38,12 +40,14 @@
Morten K. Poulsen
%prep
-%setup -q
+%setup -q -n %name-1.2.12-RC1
%patch0 -p1
%patch1
%patch2
%patch3
%patch4
+%patch5
+%patch6
%build
./configure --prefix=/usr --mandir=%_mandir
@@ -70,6 +74,15 @@
/usr/share/%name
%changelog -n mlmmj
+* Wed Sep 06 2006 - hvogel@suse.de
+- split patches better
+- include listtexts
+- add nonomail tuneable
+* Wed Sep 06 2006 - ssommer@suse.de
+- use the send_help function to send faq, help, nodigestsub texts
+* Wed Sep 06 2006 - ssommer@suse.de
+- updated to mlmmj-1.2.12-RC1
+- updated patches to use the new logging functions
* Thu Aug 03 2006 - mskibbe@suse.de
- add patch that provides more information at logging
* Mon Jul 10 2006 - hvogel@suse.de
++++++ mlmmj-faq.patch ++++++
--- /var/tmp/diff_new_pack.cATgza/_old 2006-09-07 01:22:23.000000000 +0200
+++ /var/tmp/diff_new_pack.cATgza/_new 2006-09-07 01:22:23.000000000 +0200
@@ -1,34 +1,3 @@
---- include/send_faq.h
-+++ include/send_faq.h
-@@ -0,0 +1,28 @@
-+/* Copyright (C) 2006 Hendrik N. Vogelsang <hvogel at hennevogel.de>
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a copy
-+ * of this software and associated documentation files (the "Software"), to
-+ * deal in the Software without restriction, including without limitation the
-+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-+ * sell copies of the Software, and to permit persons to whom the Software is
-+ * furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be included in
-+ * all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-+ * IN THE SOFTWARE.
-+ */
-+
-+#ifndef SEND_FAQ_H
-+#define SEND_FAQ_H
-+
-+void send_faq(const char *listdir, const char *emailaddr,
-+ const char *mlmmjsend);
-+
-+#endif
--- listtexts/Makefile.am
+++ listtexts/Makefile.am
@@ -1,6 +1,6 @@
@@ -41,10 +10,10 @@
sub-confirm-nomail sub-ok sub-ok-digest sub-ok-nomail subonlypost \
--- listtexts/Makefile.in
+++ listtexts/Makefile.in
-@@ -128,7 +128,7 @@
- sysconfdir = @sysconfdir@
+@@ -105,7 +105,7 @@
target_alias = @target_alias@
textlibdir = @textlibdir@
+
-dist_textlib_DATA = access bounce-probe listhelp moderation notifysub \
+dist_textlib_DATA = access bounce-probe listhelp listfaq moderation notifysub \
notifysub-digest notifysub-nomail notifyunsub notifyunsub-digest \
@@ -57,56 +26,9 @@
+
+Sorry no FAQ available yet.
+
---- src/Makefile.am
-+++ src/Makefile.am
-@@ -26,7 +26,7 @@
- mlmmj_process_SOURCES = mlmmj-process.c writen.c find_email_adr.c \
- incindexfile.c itoa.c getlistaddr.c chomp.c \
- mylocking.c listcontrol.c random-int.c strgen.c \
-- print-version.c send_help.c prepstdreply.c \
-+ print-version.c send_help.c send_faq.c prepstdreply.c \
- do_all_the_voodo_here.c mygetline.c gethdrline.c \
- log_error.c statctrl.c ctrlvalue.c dumpfd2fd.c \
- subscriberfuncs.c ctrlvalues.c memory.c log_oper.c \
---- src/Makefile.in
-+++ src/Makefile.in
-@@ -81,7 +81,7 @@
- find_email_adr.$(OBJEXT) incindexfile.$(OBJEXT) itoa.$(OBJEXT) \
- getlistaddr.$(OBJEXT) chomp.$(OBJEXT) mylocking.$(OBJEXT) \
- listcontrol.$(OBJEXT) random-int.$(OBJEXT) strgen.$(OBJEXT) \
-- print-version.$(OBJEXT) send_help.$(OBJEXT) \
-+ print-version.$(OBJEXT) send_help.$(OBJEXT) send_faq.$(OBJEXT) \
- prepstdreply.$(OBJEXT) do_all_the_voodo_here.$(OBJEXT) \
- mygetline.$(OBJEXT) gethdrline.$(OBJEXT) log_error.$(OBJEXT) \
- statctrl.$(OBJEXT) ctrlvalue.$(OBJEXT) dumpfd2fd.$(OBJEXT) \
-@@ -235,7 +235,7 @@
- mlmmj_process_SOURCES = mlmmj-process.c writen.c find_email_adr.c \
- incindexfile.c itoa.c getlistaddr.c chomp.c \
- mylocking.c listcontrol.c random-int.c strgen.c \
-- print-version.c send_help.c prepstdreply.c \
-+ print-version.c send_help.c send_faq.c prepstdreply.c \
- do_all_the_voodo_here.c mygetline.c gethdrline.c \
- log_error.c statctrl.c ctrlvalue.c dumpfd2fd.c \
- subscriberfuncs.c ctrlvalues.c memory.c log_oper.c \
-@@ -410,6 +410,7 @@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readn.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/send_digest.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/send_help.Po@am__quote@
-+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/send_faq.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/send_list.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statctrl.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strgen.Po@am__quote@
--- src/listcontrol.c
+++ src/listcontrol.c
-@@ -37,6 +37,7 @@
- #include "getlistdelim.h"
- #include "strgen.h"
- #include "send_help.h"
-+#include "send_faq.h"
- #include "send_list.h"
- #include "log_error.h"
- #include "statctrl.h"
-@@ -63,6 +64,7 @@
+@@ -63,6 +63,7 @@
CTRL_BOUNCES,
CTRL_MODERATE,
CTRL_HELP,
@@ -114,33 +36,36 @@
CTRL_GET,
CTRL_LIST,
CTRL_END /* end marker, must be last */
-@@ -92,6 +94,7 @@
+@@ -92,6 +93,7 @@
{ "bounces", 1 },
{ "moderate", 1 },
{ "help", 0 },
-+ { "faq", 0 },
++ { "faq", 0 },
{ "get", 1 },
{ "list", 0 }
};
-@@ -527,6 +530,18 @@
- mlmmjsend);
- }
+@@ -628,6 +630,21 @@
+ send_help(listdir, fromemails->emaillist[0], mlmmjsend, "help", "listhelp");
break;
-+
-+ /* listname+faq@domain.tld */
+
++ /* listname+faq@domain.tld */
+ case CTRL_FAQ:
-+ unlink(mailname);
-+ if(strchr(fromemails->emaillist[0], '@')) {
-+ log_oper(listdir, OPLOGFNAME, "%s requested the faq",
-+ fromemails->emaillist[0]);
-+ send_faq(listdir, fromemails->emaillist[0],
-+ mlmmjsend);
-+ }
-+ break;
++ if(!strchr(fromemails->emaillist[0], '@')) {
++ /* Not a valid From: address */
++ errno = 0;
++ log_error(LOG_ARGS, "A faq request was"
++ " sent with an invalid From: header."
++ " Ignoring mail");
++ return -1;
++ }
++ log_oper(listdir, OPLOGFNAME, "%s requested faq",
++ fromemails->emaillist[0]);
++ send_help(listdir, fromemails->emaillist[0], mlmmjsend, "faq", "listfaq");
++ break;
+
-
/* listname+get-INDEX@domain.tld */
case CTRL_GET:
+ noget = statctrl(listdir, "noget");
--- src/prepstdreply.c
+++ src/prepstdreply.c
@@ -102,6 +102,9 @@
@@ -153,83 +78,3 @@
} else if(strcmp(token, "listgetN") == 0) {
value = concatstr(4, listname, listdelim, "get-N@", fqdn);
goto concatandreturn;
---- src/send_faq.c
-+++ src/send_faq.c
-@@ -0,0 +1,77 @@
-+/* Copyright (C) 2003 Hendrik N. Vogelsang <hvogel at hennevogel.de>
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a copy
-+ * of this software and associated documentation files (the "Software"), to
-+ * deal in the Software without restriction, including without limitation the
-+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-+ * sell copies of the Software, and to permit persons to whom the Software is
-+ * furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be included in
-+ * all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-+ * IN THE SOFTWARE.
-+ */
-+
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+
-+#include "mlmmj.h"
-+#include "send_faq.h"
-+#include "strgen.h"
-+#include "find_email_adr.h"
-+#include "getlistaddr.h"
-+#include "getlistdelim.h"
-+#include "log_error.h"
-+#include "chomp.h"
-+#include "wrappers.h"
-+#include "mygetline.h"
-+#include "prepstdreply.h"
-+#include "memory.h"
-+
-+void send_faq(const char *listdir, const char *emailaddr,
-+ const char *mlmmjsend)
-+{
-+ char *queuefilename, *listaddr, *listdelim, *listname, *listfqdn;
-+ char *fromaddr;
-+
-+ listaddr = getlistaddr(listdir);
-+ listdelim = getlistdelim(listdir);
-+ listname = genlistname(listaddr);
-+ listfqdn = genlistfqdn(listaddr);
-+
-+ fromaddr = concatstr(4, listname, listdelim, "bounces-help@", listfqdn);
-+ myfree(listdelim);
-+
-+ queuefilename = prepstdreply(listdir, "listfaq", "$listowner$",
-+ emailaddr, NULL, 0, NULL);
-+ if(queuefilename == NULL) {
-+ log_error(LOG_ARGS, "Could not prepare faq mail");
-+ exit(EXIT_FAILURE);
-+ }
-+
-+ myfree(listaddr);
-+ myfree(listname);
-+ myfree(listfqdn);
-+
-+ execlp(mlmmjsend, mlmmjsend,
-+ "-l", "1",
-+ "-L", listdir,
-+ "-T", emailaddr,
-+ "-F", fromaddr,
-+ "-m", queuefilename, (char *)NULL);
-+
-+ log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend);
-+ exit(EXIT_FAILURE);
-+}
++++++ mlmmj-nodigestsub.patch ++++++
--- /var/tmp/diff_new_pack.cATgza/_old 2006-09-07 01:22:23.000000000 +0200
+++ /var/tmp/diff_new_pack.cATgza/_new 2006-09-07 01:22:23.000000000 +0200
@@ -1,34 +1,15 @@
---- include/send_nodigestsub.h
-+++ include/send_nodigestsub.h
-@@ -0,0 +1,28 @@
-+/* Copyright (C) 2006 Hendrik N. Vogelsang <hvogel at hennevogel.de>
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a copy
-+ * of this software and associated documentation files (the "Software"), to
-+ * deal in the Software without restriction, including without limitation the
-+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-+ * sell copies of the Software, and to permit persons to whom the Software is
-+ * furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be included in
-+ * all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-+ * IN THE SOFTWARE.
-+ */
-+
-+#ifndef SEND_NODIGESTSUB_H
-+#define SEND_NODIGESTSUB_H
-+
-+void send_nodigestsub(const char *listdir, const char *emailaddr,
-+ const char *mlmmjsend);
-+
-+#endif
+--- TUNABLES
++++ TUNABLES
+@@ -166,3 +166,9 @@
+
+ If this file exists, digest mails won't have a text part with a thread
+ summary.
++
++ · nodigestsub (boolean)
++
++ If this file exists, subscription to the digest version of the mailinglist
++ will be denied. (Usefull if you dont want to allow digests and notify users
++ about it).
--- listtexts/Makefile.am
+++ listtexts/Makefile.am
@@ -3,7 +3,7 @@
@@ -39,10 +20,10 @@
+ sub-confirm-nomail sub-ok sub-ok-digest sub-ok-nomail sub-deny-digest subonlypost \
unsub-confirm unsub-confirm-digest unsub-confirm-nomail unsub-ok \
unsub-ok-digest unsub-ok-nomail listsubs sub-subscribed \
- unsub-notsubscribed
+ unsub-notsubscribed digest submod-moderator submod-requester
--- listtexts/Makefile.in
+++ listtexts/Makefile.in
-@@ -131,7 +131,7 @@
+@@ -108,7 +108,7 @@
dist_textlib_DATA = access bounce-probe listhelp listfaq moderation notifysub \
notifysub-digest notifysub-nomail notifyunsub notifyunsub-digest \
notifyunsub-nomail notintocc sub-confirm sub-confirm-digest \
@@ -50,7 +31,7 @@
+ sub-confirm-nomail sub-ok sub-ok-digest sub-ok-nomail sub-deny-digest subonlypost \
unsub-confirm unsub-confirm-digest unsub-confirm-nomail unsub-ok \
unsub-ok-digest unsub-ok-nomail listsubs sub-subscribed \
- unsub-notsubscribed
+ unsub-notsubscribed digest submod-moderator submod-requester
--- listtexts/sub-deny-digest
+++ listtexts/sub-deny-digest
@@ -0,0 +1,9 @@
@@ -63,147 +44,19 @@
+has been denied. Digests are turned off for this
+mailinglist.
+
---- src/Makefile.am
-+++ src/Makefile.am
-@@ -26,7 +26,7 @@
- mlmmj_process_SOURCES = mlmmj-process.c writen.c find_email_adr.c \
- incindexfile.c itoa.c getlistaddr.c chomp.c \
- mylocking.c listcontrol.c random-int.c strgen.c \
-- print-version.c send_help.c send_faq.c prepstdreply.c \
-+ print-version.c send_help.c send_faq.c send_nodigestsub.c prepstdreply.c \
- do_all_the_voodo_here.c mygetline.c gethdrline.c \
- log_error.c statctrl.c ctrlvalue.c dumpfd2fd.c \
- subscriberfuncs.c ctrlvalues.c memory.c log_oper.c \
---- src/Makefile.in
-+++ src/Makefile.in
-@@ -81,7 +81,7 @@
- find_email_adr.$(OBJEXT) incindexfile.$(OBJEXT) itoa.$(OBJEXT) \
- getlistaddr.$(OBJEXT) chomp.$(OBJEXT) mylocking.$(OBJEXT) \
- listcontrol.$(OBJEXT) random-int.$(OBJEXT) strgen.$(OBJEXT) \
-- print-version.$(OBJEXT) send_help.$(OBJEXT) send_faq.$(OBJEXT) \
-+ print-version.$(OBJEXT) send_help.$(OBJEXT) send_faq.$(OBJEXT) send_nodigestsub.$(OBJEXT) \
- prepstdreply.$(OBJEXT) do_all_the_voodo_here.$(OBJEXT) \
- mygetline.$(OBJEXT) gethdrline.$(OBJEXT) log_error.$(OBJEXT) \
- statctrl.$(OBJEXT) ctrlvalue.$(OBJEXT) dumpfd2fd.$(OBJEXT) \
-@@ -235,7 +235,7 @@
- mlmmj_process_SOURCES = mlmmj-process.c writen.c find_email_adr.c \
- incindexfile.c itoa.c getlistaddr.c chomp.c \
- mylocking.c listcontrol.c random-int.c strgen.c \
-- print-version.c send_help.c send_faq.c prepstdreply.c \
-+ print-version.c send_help.c send_faq.c send_nodigestsub.c prepstdreply.c \
- do_all_the_voodo_here.c mygetline.c gethdrline.c \
- log_error.c statctrl.c ctrlvalue.c dumpfd2fd.c \
- subscriberfuncs.c ctrlvalues.c memory.c log_oper.c \
-@@ -411,6 +411,7 @@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/send_digest.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/send_help.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/send_faq.Po@am__quote@
-+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/send_nodigestsub.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/send_list.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statctrl.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strgen.Po@am__quote@
--- src/listcontrol.c
+++ src/listcontrol.c
-@@ -38,6 +38,7 @@
- #include "strgen.h"
- #include "send_help.h"
- #include "send_faq.h"
-+#include "send_nodigestsub.h"
- #include "send_list.h"
- #include "log_error.h"
- #include "statctrl.h"
-@@ -192,6 +193,14 @@
- unlink(mailname);
- if (closedlist || closedlistsub)
- exit(EXIT_SUCCESS);
-+ if (statctrl(listdir, "nodigestsub"))
-+ if(strchr(fromemails->emaillist[0], '@')) {
-+ log_oper(listdir, OPLOGFNAME, "mlmmj-sub: requested for digest denied",
-+ fromemails->emaillist[0]);
-+ send_nodigestsub(listdir, fromemails->emaillist[0],
-+ mlmmjsend);
-+ }
-+
- if (!strchr(fromemails->emaillist[0], '@'))
- /* Not a valid From: address, silently ignore */
- exit(EXIT_SUCCESS);
---- src/send_nodigestsub.c
-+++ src/send_nodigestsub.c
-@@ -0,0 +1,77 @@
-+/* Copyright (C) 2003 Hendrik N. Vogelsang <hvogel at hennevogel.de>
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a copy
-+ * of this software and associated documentation files (the "Software"), to
-+ * deal in the Software without restriction, including without limitation the
-+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-+ * sell copies of the Software, and to permit persons to whom the Software is
-+ * furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be included in
-+ * all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-+ * IN THE SOFTWARE.
-+ */
-+
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+
-+#include "mlmmj.h"
-+#include "send_nodigestsub.h"
-+#include "strgen.h"
-+#include "find_email_adr.h"
-+#include "getlistaddr.h"
-+#include "getlistdelim.h"
-+#include "log_error.h"
-+#include "chomp.h"
-+#include "wrappers.h"
-+#include "mygetline.h"
-+#include "prepstdreply.h"
-+#include "memory.h"
-+
-+void send_nodigestsub(const char *listdir, const char *emailaddr,
-+ const char *mlmmjsend)
-+{
-+ char *queuefilename, *listaddr, *listdelim, *listname, *listfqdn;
-+ char *fromaddr;
-+
-+ listaddr = getlistaddr(listdir);
-+ listdelim = getlistdelim(listdir);
-+ listname = genlistname(listaddr);
-+ listfqdn = genlistfqdn(listaddr);
-+
-+ fromaddr = concatstr(4, listname, listdelim, "bounces-help@", listfqdn);
-+ myfree(listdelim);
-+
-+ queuefilename = prepstdreply(listdir, "sub-deny-digest", "$listowner$",
-+ emailaddr, NULL, 0, NULL);
-+ if(queuefilename == NULL) {
-+ log_error(LOG_ARGS, "Could not prepare nodigestsub mail");
-+ exit(EXIT_FAILURE);
-+ }
-+
-+ myfree(listaddr);
-+ myfree(listname);
-+ myfree(listfqdn);
-+
-+ execlp(mlmmjsend, mlmmjsend,
-+ "-l", "1",
-+ "-L", listdir,
-+ "-T", emailaddr,
-+ "-F", fromaddr,
-+ "-m", queuefilename, (char *)NULL);
-+
-+ log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend);
-+ exit(EXIT_FAILURE);
-+}
+@@ -206,6 +206,13 @@
+ " Ignoring mail");
+ return -1;
+ }
++ if (statctrl(listdir, "nodigestsub")) {
++ errno = 0;
++ log_error(LOG_ARGS, "A subcribe-digest request was denied");
++ send_help(listdir, fromemails->emaillist[0],
++ mlmmjsend, "nodigest", "sub-deny-digest");
++ return -1;
++ }
+ log_oper(listdir, OPLOGFNAME, "mlmmj-sub: request for digest"
+ " subscription from %s",
+ fromemails->emaillist[0]);
++++++ mlmmj-nonomailsub.patch ++++++
--- TUNABLES
+++ TUNABLES
@@ -172,3 +172,9 @@
If this file exists, subscription to the digest version of the mailinglist
will be denied. (Usefull if you dont want to allow digests and notify users
about it).
+
+ · nonomailsub (boolean)
+
+ If this file exists, subscription to the nomail version of the mailinglist
+ will be denied. (Usefull if you dont want to allow nomail and notify users
+ about it).
--- listtexts/Makefile.am
+++ listtexts/Makefile.am
@@ -3,7 +3,7 @@
dist_textlib_DATA = access bounce-probe listhelp listfaq moderation notifysub \
notifysub-digest notifysub-nomail notifyunsub notifyunsub-digest \
notifyunsub-nomail notintocc sub-confirm sub-confirm-digest \
- sub-confirm-nomail sub-ok sub-ok-digest sub-ok-nomail sub-deny-digest subonlypost \
+ sub-confirm-nomail sub-ok sub-ok-digest sub-ok-nomail sub-deny-digest sub-deny-nomail subonlypost \
unsub-confirm unsub-confirm-digest unsub-confirm-nomail unsub-ok \
unsub-ok-digest unsub-ok-nomail listsubs sub-subscribed \
unsub-notsubscribed digest submod-moderator submod-requester
--- listtexts/Makefile.in
+++ listtexts/Makefile.in
@@ -108,7 +108,7 @@
dist_textlib_DATA = access bounce-probe listhelp listfaq moderation notifysub \
notifysub-digest notifysub-nomail notifyunsub notifyunsub-digest \
notifyunsub-nomail notintocc sub-confirm sub-confirm-digest \
- sub-confirm-nomail sub-ok sub-ok-digest sub-ok-nomail sub-deny-digest subonlypost \
+ sub-confirm-nomail sub-ok sub-ok-digest sub-ok-nomail sub-deny-digest sub-deny-nomail subonlypost \
unsub-confirm unsub-confirm-digest unsub-confirm-nomail unsub-ok \
unsub-ok-digest unsub-ok-nomail listsubs sub-subscribed \
unsub-notsubscribed digest submod-moderator submod-requester
--- listtexts/sub-deny-nomail
+++ listtexts/sub-deny-nomail
@@ -0,0 +1,9 @@
+Subject: Denied subscription to the nomail version of $listaddr$
+
+Your request to subscribe to the nomail version of the mailinglist
+
+$listaddr$
+
+has been denied. The nomail version is turned off for this
+mailinglist.
+
--- src/listcontrol.c
+++ src/listcontrol.c
@@ -242,6 +242,13 @@
" Ignoring mail");
return -1;
}
+ if (statctrl(listdir, "nonomailsub")) {
+ errno = 0;
+ log_error(LOG_ARGS, "A subcribe-nomail request was denied");
+ send_help(listdir, fromemails->emaillist[0],
+ mlmmjsend, "nonomail", "sub-deny-nomail");
+ return -1;
+ }
log_oper(listdir, OPLOGFNAME, "mlmmj-sub: request for nomail"
" subscription from %s",
fromemails->emaillist[0]);
++++++ mlmmj-send_help-generic.patch ++++++
--- include/send_help.h
+++ include/send_help.h
@@ -25,6 +25,6 @@
#define SEND_HELP_H
void send_help(const char *listdir, const char *emailaddr,
- const char *mlmmjsend);
+ const char *mlmmjsend, const char *name, const char *textfile);
#endif
--- src/listcontrol.c
+++ src/listcontrol.c
@@ -625,7 +625,7 @@
}
log_oper(listdir, OPLOGFNAME, "%s requested help",
fromemails->emaillist[0]);
- send_help(listdir, fromemails->emaillist[0], mlmmjsend);
+ send_help(listdir, fromemails->emaillist[0], mlmmjsend, "help", "listhelp");
break;
/* listname+get-INDEX@domain.tld */
--- src/send_help.c
+++ src/send_help.c
@@ -43,7 +43,7 @@
#include "memory.h"
void send_help(const char *listdir, const char *emailaddr,
- const char *mlmmjsend)
+ const char *mlmmjsend, const char *name, const char *textfile)
{
char *queuefilename, *listaddr, *listdelim, *listname, *listfqdn;
char *fromaddr;
@@ -56,10 +56,10 @@
fromaddr = concatstr(4, listname, listdelim, "bounces-help@", listfqdn);
myfree(listdelim);
- queuefilename = prepstdreply(listdir, "listhelp", "$listowner$",
+ queuefilename = prepstdreply(listdir, textfile, "$listowner$",
emailaddr, NULL, 0, NULL, NULL);
if(queuefilename == NULL) {
- log_error(LOG_ARGS, "Could not prepare help mail");
+ log_error(LOG_ARGS, "Could not prepare %s mail", name);
exit(EXIT_FAILURE);
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org