Hello community, here is the log from the commit of package mlmmj checked in at Fri Jun 23 17:10:45 CEST 2006. -------- --- mlmmj/mlmmj.changes 2006-04-10 22:45:38.000000000 +0200 +++ mlmmj/mlmmj.changes 2006-06-23 15:08:41.000000000 +0200 @@ -1,0 +2,5 @@ +Fri Jun 23 15:08:24 CEST 2006 - hvogel@suse.de + +- Add faq patch to be able to have listname+faq + +------------------------------------------------------------------- New: ---- mlmmj-faq.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mlmmj.spec ++++++ --- /var/tmp/diff_new_pack.vUqAwq/_old 2006-06-23 17:10:19.000000000 +0200 +++ /var/tmp/diff_new_pack.vUqAwq/_new 2006-06-23 17:10:19.000000000 +0200 @@ -14,12 +14,13 @@ License: X11/MIT Group: Productivity/Networking/Email/Mailinglists Version: 1.2.11 -Release: 13 +Release: 17 URL: http://mlmmj.mmj.dk/ Summary: Mail Server Independent Reimplementation of the EZMLM Mailing List Source0: %name-%version.tar.bz2 Patch0: rFastTemplate.diff Patch1: mlmmj-1.2.11_subscriber_mmap.patch +Patch2: mlmmj-faq.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -38,6 +39,7 @@ %setup -q %patch0 -p1 %patch1 +%patch2 %build ./configure --prefix=/usr --mandir=%_mandir @@ -64,6 +66,8 @@ /usr/share/%name %changelog -n mlmmj +* Fri Jun 23 2006 - hvogel@suse.de +- Add faq patch to be able to have listname+faq * Mon Apr 10 2006 - mrueckert@suse.de - added mlmmj-1.2.11_subscriber_mmap.patch: * src/subscriberfuncs.c: Do not mmap() 0 byte files. ++++++ mlmmj-faq.patch ++++++ --- 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/listfaq +++ listtexts/listfaq @@ -0,0 +1,4 @@ +Subject: FAQ - Frequently asked questions of the $listaddr$ list. + +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 @@ CTRL_BOUNCES, CTRL_MODERATE, CTRL_HELP, + CTRL_FAQ, CTRL_GET, CTRL_LIST, CTRL_END /* end marker, must be last */ @@ -92,6 +94,7 @@ { "bounces", 1 }, { "moderate", 1 }, { "help", 0 }, + { "faq", 0 }, { "get", 1 }, { "list", 0 } }; @@ -527,6 +530,18 @@ mlmmjsend); } break; + + /* 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; + /* listname+get-INDEX@domain.tld */ case CTRL_GET: --- src/prepstdreply.c +++ src/prepstdreply.c @@ -102,6 +102,9 @@ } else if(strcmp(token, "helpaddr") == 0) { value = concatstr(4, listname, listdelim, "help@", fqdn); goto concatandreturn; + } else if(strcmp(token, "faqaddr") == 0) { + value = concatstr(4, listname, listdelim, "faq@", fqdn); + goto concatandreturn; } 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 <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> +#include <fcntl.h> +#include <sys/types.h> +#include <sys/stat.h> + +#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); +} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit-unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit-help@opensuse.org