All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mads Martin Joergensen <mmj@mmj.dk>
To: mlmmj@mlmmj.org
Subject: Re: mlmmj-1.2.3 released. Features added and bugs squashed.
Date: Tue, 08 Feb 2005 12:17:49 +0000	[thread overview]
Message-ID: <20050208121749.GC67839@mmj.dk> (raw)
In-Reply-To: <20050208095412.GE56543@mmj.dk>

* Wolf Bergenheim <wolf+mlmmj@bergenheim.net> [Feb 08. 2005 12:45]:
> > > So no support for multiple list addresses ):
> >
> > It's coming, but I wanted to get this bugfix out first. Next version :)
> 
> Great!
> 
> I'm just impatient, because I've been asked to support 2 new parallel domains, 
> and would like the mailinglists to work with the new domains too.

This is completely untested, I only made sure it compiles. So try it out
and let me know if it works, then I'll commit it to CVS.

--- src/mlmmj-process.c
+++ src/mlmmj-process.c
@@ -50,6 +50,7 @@
 #include "subscriberfuncs.h"
 #include "memory.h"
 #include "log_oper.h"
+#include "chomp.h"
 
 enum action {
 	ALLOW,
@@ -309,7 +310,7 @@
 
 int main(int argc, char **argv)
 {
-	int i, opt, noprocess = 0, moderated = 0;
+	int i, j, opt, noprocess = 0, moderated = 0;
 	int hdrfd, footfd, rawmailfd, donemailfd;
 	int subonlypost = 0, addrtocc = 1, intocc = 0;
 	int notoccdenymails = 0, noaccessdenymails = 0, nosubonlydenymails = 0;
@@ -332,6 +333,7 @@
 	struct strlist *access_rules = NULL;
 	struct strlist *delheaders = NULL;
 	struct strlist allheaders;
+	struct strlist *alternates = NULL;
 	struct mailhdr readhdrs[] = {
 		{ "From:", 0, NULL },
 		{ "To:", 0, NULL },
@@ -601,17 +603,31 @@
 	unlink(mailfile);
 
 	listaddr = getlistaddr(listdir);
+	alternates = ctrlvalues(listdir, "listaddress");
 
 	addrtocc = !(statctrl(listdir, "tocc"));
 	if(addrtocc) {
-		for(i = 0; i < toemails.emailcount; i++)
-			if(strcmp(listaddr, toemails.emaillist[i]) = 0)
-				intocc = 1;
-		for(i = 0; i < ccemails.emailcount; i++)
-			if(strcmp(listaddr, ccemails.emaillist[i]) = 0)
-				intocc = 1;
+		for(i = 0; i < toemails.emailcount; i++) {
+			for(j = 0; j < alternates->count; j++) {
+				chomp(alternates->strs[j]);
+				if(strcmp(alternates->strs[j],
+					toemails.emaillist[i]) = 0)
+					intocc = 1;
+			}
+		}
+		for(i = 0; i < ccemails.emailcount; i++) {
+			for(j = 0; j < alternates->count; j++) {
+				chomp(alternates->strs[j]);
+				if(strcmp(alternates->strs[j],
+					ccemails.emaillist[i]) = 0)
+					intocc = 1;
+			}
+		}
 	}
 
+	for(i = 0; i < alternates->count; i++)
+		myfree(alternates->strs[i];
+
 	notoccdenymails = statctrl(listdir, "notoccdenymails");
 	
 	if(addrtocc && !intocc) {

-- 
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
 and totally illogical, with just a little bit more effort?"
                                -- A. P. J.

  parent reply	other threads:[~2005-02-08 12:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-08  9:54 mlmmj-1.2.3 released. Features added and bugs squashed Mads Martin Joergensen
2005-02-08 11:37 ` Wolf Bergenheim
2005-02-08 11:40 ` Mads Martin Joergensen
2005-02-08 11:44 ` Allan Joergensen
2005-02-08 11:45 ` Wolf Bergenheim
2005-02-08 12:17 ` Mads Martin Joergensen [this message]
2005-02-08 12:56 ` Wolf Bergenheim
2005-02-08 14:07 ` Mads Martin Joergensen
2005-02-08 16:19 ` Mads Martin Joergensen
2005-02-08 16:20 ` Mads Martin Joergensen
2005-02-08 16:22 ` Mads Martin Joergensen
2005-02-08 17:57 ` Morten K. Poulsen
2005-02-08 18:08 ` Allan Joergensen
2005-02-08 18:33 ` Mads Martin Joergensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050208121749.GC67839@mmj.dk \
    --to=mmj@mmj.dk \
    --cc=mlmmj@mlmmj.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.