All of lore.kernel.org
 help / color / mirror / Atom feed
* mlmmj-1.2.3 released. Features added and bugs squashed.
@ 2005-02-08  9:54 Mads Martin Joergensen
  2005-02-08 11:37 ` Wolf Bergenheim
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Mads Martin Joergensen @ 2005-02-08  9:54 UTC (permalink / raw)
  To: mlmmj

Hey all,

First, I want to express a big thank you to Andrea Barisani who once
again found a pretty hard to find bug, and also helped with a lot of
testing wrt. DSN support addition.

The ChangeLog has the glory details, I can recommend an upgrade:

1.2.3
 o Only allow subscription of addresses with '@' in them
 o Fix return value from unsubscribe function
 o Add extra lock layer when accessing subscribers files
 o In case of listname+bounces-INDEX use the DSN (RFC1891) report to
   extract the bouncing address
 o Fix usage of a zero sized control/verp string
 o Make the Date: header RFC2822 conformant

http://mlmmj.mmj.dk/files/mlmmj-1.2.3.tar.gz
http://mlmmj.mmj.dk/files/mlmmj-1.2.3.tar.bz2

-- 
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.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: mlmmj-1.2.3 released. Features added and bugs squashed.
  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
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Wolf Bergenheim @ 2005-02-08 11:37 UTC (permalink / raw)
  To: mlmmj

On Tuesday 08 February 2005 11:54, Mads Martin Joergensen wrote:
> Hey all,
>
> The ChangeLog has the glory details, I can recommend an upgrade:
>

So no support for multiple list addresses ):

--W

-- 

<:3 )---- Wolf Bergenheim ----( 8:>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: mlmmj-1.2.3 released. Features added and bugs squashed.
  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
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Mads Martin Joergensen @ 2005-02-08 11:40 UTC (permalink / raw)
  To: mlmmj

* Wolf Bergenheim <wolf+mlmmj@bergenheim.net> [Feb 08. 2005 12:37]:
> > The ChangeLog has the glory details, I can recommend an upgrade:
> 
> So no support for multiple list addresses ):

It's coming, but I wanted to get this bugfix out first. Next version :)

-- 
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.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: mlmmj-1.2.3 released. Features added and bugs squashed.
  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
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Allan Joergensen @ 2005-02-08 11:44 UTC (permalink / raw)
  To: mlmmj

On 08-Feb-2005, Mads Martin Joergensen wrote:

Hi,

> The ChangeLog has the glory details, I can recommend an upgrade:
> 1.2.3

I would like to request a feature. It's been on my wishlist for quite
some time; I would like the port of the outgoing relay server to be
configurable (just changing init_socket.c works i know).

mvh
-- 
Allan Joergensen

"Do androids sleep with electric sheep?"

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: mlmmj-1.2.3 released. Features added and bugs squashed.
  2005-02-08  9:54 mlmmj-1.2.3 released. Features added and bugs squashed Mads Martin Joergensen
                   ` (2 preceding siblings ...)
  2005-02-08 11:44 ` Allan Joergensen
@ 2005-02-08 11:45 ` Wolf Bergenheim
  2005-02-08 12:17 ` Mads Martin Joergensen
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Wolf Bergenheim @ 2005-02-08 11:45 UTC (permalink / raw)
  To: mlmmj

On Tuesday 08 February 2005 13:40, Mads Martin Joergensen wrote:
> * Wolf Bergenheim <wolf+mlmmj@bergenheim.net> [Feb 08. 2005 12:37]:
> > > The ChangeLog has the glory details, I can recommend an upgrade:
> >
> > 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.

--W

-- 

<:3 )---- Wolf Bergenheim ----( 8:>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: mlmmj-1.2.3 released. Features added and bugs squashed.
  2005-02-08  9:54 mlmmj-1.2.3 released. Features added and bugs squashed Mads Martin Joergensen
                   ` (3 preceding siblings ...)
  2005-02-08 11:45 ` Wolf Bergenheim
@ 2005-02-08 12:17 ` Mads Martin Joergensen
  2005-02-08 12:56 ` Wolf Bergenheim
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Mads Martin Joergensen @ 2005-02-08 12:17 UTC (permalink / raw)
  To: mlmmj

* 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.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: mlmmj-1.2.3 released. Features added and bugs squashed.
  2005-02-08  9:54 mlmmj-1.2.3 released. Features added and bugs squashed Mads Martin Joergensen
                   ` (4 preceding siblings ...)
  2005-02-08 12:17 ` Mads Martin Joergensen
@ 2005-02-08 12:56 ` Wolf Bergenheim
  2005-02-08 14:07 ` Mads Martin Joergensen
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Wolf Bergenheim @ 2005-02-08 12:56 UTC (permalink / raw)
  To: mlmmj

On Tuesday 08 February 2005 14:17, Mads Martin Joergensen wrote:
> * Wolf Bergenheim <wolf+mlmmj@bergenheim.net> [Feb 08. 2005 12:45]:
>
> 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.

ahem.. it is a production server... I'd rather not put untested code there... 
I hope you understand... /:

But thanks for jumping up and doing it. It's not that much of a rush.. the new 
domains are going live 1.3 (:

--W

It looks like it _should_ work (;

-- 

<:3 )---- Wolf Bergenheim ----( 8:>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: mlmmj-1.2.3 released. Features added and bugs squashed.
  2005-02-08  9:54 mlmmj-1.2.3 released. Features added and bugs squashed Mads Martin Joergensen
                   ` (5 preceding siblings ...)
  2005-02-08 12:56 ` Wolf Bergenheim
@ 2005-02-08 14:07 ` Mads Martin Joergensen
  2005-02-08 16:19 ` Mads Martin Joergensen
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Mads Martin Joergensen @ 2005-02-08 14:07 UTC (permalink / raw)
  To: mlmmj

* Wolf Bergenheim <wolf+mlmmj@bergenheim.net> [Feb 08. 2005 13:56]:
> > 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.
> 
> ahem.. it is a production server... I'd rather not put untested code there... 
> I hope you understand... /:
> 
> But thanks for jumping up and doing it. It's not that much of a rush.. the new 
> domains are going live 1.3 (:

Could be you had a test setup.

-- 
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.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: mlmmj-1.2.3 released. Features added and bugs squashed.
  2005-02-08  9:54 mlmmj-1.2.3 released. Features added and bugs squashed Mads Martin Joergensen
                   ` (6 preceding siblings ...)
  2005-02-08 14:07 ` Mads Martin Joergensen
@ 2005-02-08 16:19 ` Mads Martin Joergensen
  2005-02-08 16:20 ` Mads Martin Joergensen
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Mads Martin Joergensen @ 2005-02-08 16:19 UTC (permalink / raw)
  To: mlmmj

* Allan Joergensen <allan@nowhere.dk> [Feb 08. 2005 17:02]:
> > The ChangeLog has the glory details, I can recommend an upgrade:
> > 1.2.3
> 
> I would like to request a feature. It's been on my wishlist for quite
> some time; I would like the port of the outgoing relay server to be
> configurable (just changing init_socket.c works i know).

Allan, could you try this patch. It'll make the port configurable with
LISTDIR/control/smtpport.

--- include/init_sockfd.h
+++ include/init_sockfd.h
@@ -24,6 +24,6 @@
 #ifndef INIT_SOCKFD_H
 #define INIT_SOCKFD_H
 
-void init_sockfd(int *sockfd, const char *relayhost);
+void init_sockfd(int *sockfd, const char *relayhost, unsigned short port);
 
 #endif /* INIT_SOCKFD_H */

--- include/mlmmj-send.h
+++ include/mlmmj-send.h
@@ -45,7 +45,7 @@
 		   size_t mailsize, const char *from, const char *listdir,
 		   const char *hdrs, size_t hdrslen, const char *body,
 		   size_t bodylen, const char *extra);
-int initsmtp(int *sockfd, const char *relayhost);
+int initsmtp(int *sockfd, const char *relayhost, unsigned short port);
 int endsmtp(int *sockfd);
 
 #endif /* MMJML_SEND_H */
--- src/init_sockfd.c
+++ src/init_sockfd.c
@@ -32,11 +32,10 @@
 #include "init_sockfd.h"
 #include "log_error.h"
 
-void init_sockfd(int *sockfd, const char *relayhost)
+void init_sockfd(int *sockfd, const char *relayhost, unsigned short port)
 {
 	int len;
 	struct sockaddr_in addr;
-	u_short port = 25;
 
 	if (getenv("MLMMJ_TESTING")) {
 		relayhost = "127.0.0.1";
--- src/mlmmj-send.c
+++ src/mlmmj-send.c
@@ -290,13 +290,13 @@
 	return 0;
 }
 
-int initsmtp(int *sockfd, const char *relayhost)
+int initsmtp(int *sockfd, const char *relayhost, unsigned short port)
 {
 	int retval = 0;
 	char *reply = NULL;
 	char *myhostname = hostnamestr();
 	
-	init_sockfd(sockfd, relayhost);
+	init_sockfd(sockfd, relayhost, port);
 	
 	if((reply = checkwait_smtpreply(*sockfd, MLMMJ_CONNECT)) != NULL) {
 		log_error(LOG_ARGS, "No proper greeting to our connect"
@@ -600,7 +600,7 @@
 	char *mlmmjbounce = NULL, *bindir, *mailmap, *probefile, *a;
 	char *body = NULL, *hdrs = NULL, *memmailsizestr = NULL, *verp = NULL;
 	char relay[16], *listname, *listfqdn, *verpfrom, *maxverprecipsstr;
-	char strindex[32], *reply;
+	char strindex[32], *reply, *strport;
 	ssize_t memmailsize = 0;
 	DIR *subddir;
 	struct dirent *dp;
@@ -608,6 +608,7 @@
 	struct hostent *relayent;
 	uid_t uid;
 	struct strlist stl;
+	unsigned short smtpport;
 
 	CHECKFULLPATH(argv[0]);
 	
@@ -863,11 +864,13 @@
 				strncpy(relay, RELAYHOST, sizeof(relay));
 		}
 	}
+	strport = ctrlvalue(listdir, "smtpport");
+	smtpport = (unsigned short)atol(strport);
 
 	switch(listctrl[0]) {
 	case '1': /* A single mail is to be sent */
 	case '6':
-		initsmtp(&sockfd, relay);
+		initsmtp(&sockfd, relay, smtpport);
 		sendres = send_mail(sockfd, bounceaddr, to_addr, replyto,
 				mailmap, st.st_size, listdir, NULL,
 				hdrs, hdrslen, body, bodylen);
@@ -910,7 +913,7 @@
 		}
 		break;
 	case '2': /* Moderators */
-		initsmtp(&sockfd, relay);
+		initsmtp(&sockfd, relay, smtpport);
 		if(send_mail_many_fd(sockfd, bounceaddr, NULL, mailmap,
 				     st.st_size, subfd, NULL, NULL, listdir,
 				     NULL, hdrs, hdrslen, body, bodylen))
@@ -919,7 +922,7 @@
 			endsmtp(&sockfd);
 		break;
 	case '3': /* resending earlier failed mails */
-		initsmtp(&sockfd, relay);
+		initsmtp(&sockfd, relay, smtpport);
 		if(send_mail_many_fd(sockfd, NULL, NULL, mailmap, st.st_size,
 				subfd, listaddr, mailfilename, listdir,
 				mlmmjbounce, hdrs, hdrslen, body, bodylen))
@@ -929,7 +932,7 @@
 		unlink(subfilename);
 		break;
 	case '4': /* send mails to owner */
-		initsmtp(&sockfd, relay);
+		initsmtp(&sockfd, relay, smtpport);
 		if(send_mail_many_fd(sockfd, bounceaddr, NULL, mailmap,
 				st.st_size, subfd, listaddr, mailfilename,
 				listdir, mlmmjbounce, hdrs, hdrslen, body,
@@ -939,7 +942,7 @@
 			endsmtp(&sockfd);
 		break;
 	case '5': /* bounceprobe - handle relayhost local users bouncing*/
-		initsmtp(&sockfd, relay);
+		initsmtp(&sockfd, relay, smtpport);
 		sendres = send_mail(sockfd, bounceaddr, to_addr, replyto,
 				mailmap, st.st_size, listdir, NULL,
 				hdrs, hdrslen, body, bodylen);
@@ -999,7 +1002,7 @@
 		}
 		
 		if(verp) {
-			initsmtp(&sockfd, relay);
+			initsmtp(&sockfd, relay, smtpport);
 			if(write_mail_from(sockfd, verpfrom, verp)) {
 				log_error(LOG_ARGS,
 						"Could not write MAIL FROM\n");
@@ -1034,7 +1037,7 @@
 				res = getaddrsfromfd(&stl, subfd,
 						maxverprecips);
 				if(stl.count = maxverprecips) {
-					initsmtp(&sockfd, relay);
+					initsmtp(&sockfd, relay, smtpport);
 					if(verp) {
 						sendres = send_mail_verp(
 								sockfd, &stl,
@@ -1072,7 +1075,7 @@
 
 		}
 		if(stl.count) {
-			initsmtp(&sockfd, relay);
+			initsmtp(&sockfd, relay, smtpport);
 			if(verp) {
 				sendres = send_mail_verp(sockfd, &stl, mailmap,
 						st.st_size, verpfrom, listdir,

-- 
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.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: mlmmj-1.2.3 released. Features added and bugs squashed.
  2005-02-08  9:54 mlmmj-1.2.3 released. Features added and bugs squashed Mads Martin Joergensen
                   ` (7 preceding siblings ...)
  2005-02-08 16:19 ` Mads Martin Joergensen
@ 2005-02-08 16:20 ` Mads Martin Joergensen
  2005-02-08 16:22 ` Mads Martin Joergensen
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Mads Martin Joergensen @ 2005-02-08 16:20 UTC (permalink / raw)
  To: mlmmj

* Mads Martin Joergensen <mmj@mmj.dk> [Feb 08. 2005 17:19]:
> * Allan Joergensen <allan@nowhere.dk> [Feb 08. 2005 17:02]:
> > > The ChangeLog has the glory details, I can recommend an upgrade:
> > > 1.2.3
> > 
> > I would like to request a feature. It's been on my wishlist for quite
> > some time; I would like the port of the outgoing relay server to be
> > configurable (just changing init_socket.c works i know).
> 
> Allan, could you try this patch. It'll make the port configurable with
> LISTDIR/control/smtpport.

No, wait, there's a bit missing.

-- 
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.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: mlmmj-1.2.3 released. Features added and bugs squashed.
  2005-02-08  9:54 mlmmj-1.2.3 released. Features added and bugs squashed Mads Martin Joergensen
                   ` (8 preceding siblings ...)
  2005-02-08 16:20 ` Mads Martin Joergensen
@ 2005-02-08 16:22 ` Mads Martin Joergensen
  2005-02-08 17:57 ` Morten K. Poulsen
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Mads Martin Joergensen @ 2005-02-08 16:22 UTC (permalink / raw)
  To: mlmmj

* Mads Martin Joergensen <mmj@mmj.dk> [Feb 08. 2005 17:20]:
> > > I would like to request a feature. It's been on my wishlist for quite
> > > some time; I would like the port of the outgoing relay server to be
> > > configurable (just changing init_socket.c works i know).
> > 
> > Allan, could you try this patch. It'll make the port configurable with
> > LISTDIR/control/smtpport.
> 
> No, wait, there's a bit missing.

Now it also defaults to 25 ;-))

--- include/init_sockfd.h
+++ include/init_sockfd.h
@@ -24,6 +24,6 @@
 #ifndef INIT_SOCKFD_H
 #define INIT_SOCKFD_H
 
-void init_sockfd(int *sockfd, const char *relayhost);
+void init_sockfd(int *sockfd, const char *relayhost, unsigned short port);
 
 #endif /* INIT_SOCKFD_H */
--- include/mlmmj-send.h	16 Jan 2005 18:43:48 -0000	1.10
+++ include/mlmmj-send.h	8 Feb 2005 16:21:10 -0000
@@ -45,7 +45,7 @@
 		   size_t mailsize, const char *from, const char *listdir,
 		   const char *hdrs, size_t hdrslen, const char *body,
 		   size_t bodylen, const char *extra);
-int initsmtp(int *sockfd, const char *relayhost);
+int initsmtp(int *sockfd, const char *relayhost, unsigned short port);
 int endsmtp(int *sockfd);
 
 #endif /* MMJML_SEND_H */
--- src/init_sockfd.c
+++ src/init_sockfd.c
@@ -32,11 +32,10 @@
 #include "init_sockfd.h"
 #include "log_error.h"
 
-void init_sockfd(int *sockfd, const char *relayhost)
+void init_sockfd(int *sockfd, const char *relayhost, unsigned short port)
 {
 	int len;
 	struct sockaddr_in addr;
-	u_short port = 25;
 
 	if (getenv("MLMMJ_TESTING")) {
 		relayhost = "127.0.0.1";
--- src/mlmmj-send.c
+++ src/mlmmj-send.c
@@ -290,13 +290,13 @@
 	return 0;
 }
 
-int initsmtp(int *sockfd, const char *relayhost)
+int initsmtp(int *sockfd, const char *relayhost, unsigned short port)
 {
 	int retval = 0;
 	char *reply = NULL;
 	char *myhostname = hostnamestr();
 	
-	init_sockfd(sockfd, relayhost);
+	init_sockfd(sockfd, relayhost, port);
 	
 	if((reply = checkwait_smtpreply(*sockfd, MLMMJ_CONNECT)) != NULL) {
 		log_error(LOG_ARGS, "No proper greeting to our connect"
@@ -600,7 +600,7 @@
 	char *mlmmjbounce = NULL, *bindir, *mailmap, *probefile, *a;
 	char *body = NULL, *hdrs = NULL, *memmailsizestr = NULL, *verp = NULL;
 	char relay[16], *listname, *listfqdn, *verpfrom, *maxverprecipsstr;
-	char strindex[32], *reply;
+	char strindex[32], *reply, *strport;
 	ssize_t memmailsize = 0;
 	DIR *subddir;
 	struct dirent *dp;
@@ -608,6 +608,7 @@
 	struct hostent *relayent;
 	uid_t uid;
 	struct strlist stl;
+	unsigned short smtpport = 25;
 
 	CHECKFULLPATH(argv[0]);
 	
@@ -863,11 +864,14 @@
 				strncpy(relay, RELAYHOST, sizeof(relay));
 		}
 	}
+	strport = ctrlvalue(listdir, "smtpport");
+	if(strport)
+		smtpport = (unsigned short)atol(strport);
 
 	switch(listctrl[0]) {
 	case '1': /* A single mail is to be sent */
 	case '6':
-		initsmtp(&sockfd, relay);
+		initsmtp(&sockfd, relay, smtpport);
 		sendres = send_mail(sockfd, bounceaddr, to_addr, replyto,
 				mailmap, st.st_size, listdir, NULL,
 				hdrs, hdrslen, body, bodylen);
@@ -910,7 +914,7 @@
 		}
 		break;
 	case '2': /* Moderators */
-		initsmtp(&sockfd, relay);
+		initsmtp(&sockfd, relay, smtpport);
 		if(send_mail_many_fd(sockfd, bounceaddr, NULL, mailmap,
 				     st.st_size, subfd, NULL, NULL, listdir,
 				     NULL, hdrs, hdrslen, body, bodylen))
@@ -919,7 +923,7 @@
 			endsmtp(&sockfd);
 		break;
 	case '3': /* resending earlier failed mails */
-		initsmtp(&sockfd, relay);
+		initsmtp(&sockfd, relay, smtpport);
 		if(send_mail_many_fd(sockfd, NULL, NULL, mailmap, st.st_size,
 				subfd, listaddr, mailfilename, listdir,
 				mlmmjbounce, hdrs, hdrslen, body, bodylen))
@@ -929,7 +933,7 @@
 		unlink(subfilename);
 		break;
 	case '4': /* send mails to owner */
-		initsmtp(&sockfd, relay);
+		initsmtp(&sockfd, relay, smtpport);
 		if(send_mail_many_fd(sockfd, bounceaddr, NULL, mailmap,
 				st.st_size, subfd, listaddr, mailfilename,
 				listdir, mlmmjbounce, hdrs, hdrslen, body,
@@ -939,7 +943,7 @@
 			endsmtp(&sockfd);
 		break;
 	case '5': /* bounceprobe - handle relayhost local users bouncing*/
-		initsmtp(&sockfd, relay);
+		initsmtp(&sockfd, relay, smtpport);
 		sendres = send_mail(sockfd, bounceaddr, to_addr, replyto,
 				mailmap, st.st_size, listdir, NULL,
 				hdrs, hdrslen, body, bodylen);
@@ -999,7 +1003,7 @@
 		}
 		
 		if(verp) {
-			initsmtp(&sockfd, relay);
+			initsmtp(&sockfd, relay, smtpport);
 			if(write_mail_from(sockfd, verpfrom, verp)) {
 				log_error(LOG_ARGS,
 						"Could not write MAIL FROM\n");
@@ -1034,7 +1038,7 @@
 				res = getaddrsfromfd(&stl, subfd,
 						maxverprecips);
 				if(stl.count = maxverprecips) {
-					initsmtp(&sockfd, relay);
+					initsmtp(&sockfd, relay, smtpport);
 					if(verp) {
 						sendres = send_mail_verp(
 								sockfd, &stl,
@@ -1072,7 +1076,7 @@
 
 		}
 		if(stl.count) {
-			initsmtp(&sockfd, relay);
+			initsmtp(&sockfd, relay, smtpport);
 			if(verp) {
 				sendres = send_mail_verp(sockfd, &stl, mailmap,
 						st.st_size, verpfrom, listdir,

-- 
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.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: mlmmj-1.2.3 released. Features added and bugs squashed.
  2005-02-08  9:54 mlmmj-1.2.3 released. Features added and bugs squashed Mads Martin Joergensen
                   ` (9 preceding siblings ...)
  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
  12 siblings, 0 replies; 14+ messages in thread
From: Morten K. Poulsen @ 2005-02-08 17:57 UTC (permalink / raw)
  To: mlmmj

Hi Wolf,

On Tue, Feb 08, 2005 at 02:56:32PM +0200, Wolf Bergenheim wrote:
> ahem.. it is a production server... I'd rather not put untested code there...
> I hope you understand... /:
> 
> But thanks for jumping up and doing it. It's not that much of a rush.. the
> new domains are going live 1.3 (:

If you want to support two addresses for the same list, you could create two
lists with symlinks for the common files. Eg.:

$ ls -l /var/spool/mlmmj/list-386596/
drwxr-xr-x  2 nobody  wheel   240 Dec  3 12:49 archive
drwxr-xr-x  2 nobody  wheel   632 Aug 26 19:59 bounce
drwxr-xr-x  2 nobody  wheel   288 Aug  3  2004 control
drwxr-xr-x  2 nobody  wheel  2224 Dec  3 13:51 incoming
-rw-r--r--  1 nobody  wheel     2 Dec  3 12:48 index
drwxr-xr-x  2 nobody  wheel   368 Dec  3 12:48 log
drwxr-xr-x  2 nobody  wheel    48 Aug  3  2004 moderation
drwxr-xr-x  3 nobody  wheel    80 Aug 26 19:59 queue
drwxr-xr-x  6 nobody  wheel   144 Sep  3 15:20 requeue
drwxr-xr-x  2 nobody  wheel    48 May  5  2004 subconf
drwxr-xr-x  2 nobody  wheel    72 Dec  3 12:48 subscribers.d
drwxr-xr-x  2 nobody  wheel   216 May 12  2004 text
drwxr-xr-x  2 nobody  wheel    48 May  6  2004 unsubconf

$ ls -l /var/spool/mlmmj/list-386596-alias
lrwxrwxrwx  1 nobody  wheel    23 Feb  8 18:52 archive -> ../list-386596/archive/
lrwxrwxrwx  1 nobody  wheel    22 Feb  8 18:52 bounce -> ../list-386596/bounce/
drwxr-xr-x  2 nobody  wheel    48 Feb  8 18:53 control
lrwxrwxrwx  1 nobody  wheel    24 Feb  8 18:53 incoming -> ../list-386596/incoming/
lrwxrwxrwx  1 nobody  wheel    20 Feb  8 18:53 index -> ../list-386596/index
lrwxrwxrwx  1 nobody  wheel    19 Feb  8 18:53 log -> ../list-386596/log/
lrwxrwxrwx  1 nobody  wheel    26 Feb  8 18:53 moderation -> ../list-386596/moderation/
lrwxrwxrwx  1 nobody  wheel    21 Feb  8 18:53 queue -> ../list-386596/queue/
lrwxrwxrwx  1 nobody  wheel    23 Feb  8 18:53 requeue -> ../list-386596/requeue/
lrwxrwxrwx  1 nobody  wheel    23 Feb  8 18:53 subconf -> ../list-386596/subconf/
lrwxrwxrwx  1 nobody  wheel    29 Feb  8 18:53 subscribers.d -> ../list-386596/subscribers.d/
lrwxrwxrwx  1 nobody  wheel    20 Feb  8 18:53 text -> ../list-386596/text/
lrwxrwxrwx  1 nobody  wheel    25 Feb  8 18:53 unsubconf -> ../list-386596/unsubconf/

OBS! This is not tested, but it should "solve" your problem without any change
to the code.

Morten

-- 
Morten K. Poulsen <morten@afdelingp.dk>
http://www.afdelingp.dk/

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: mlmmj-1.2.3 released. Features added and bugs squashed.
  2005-02-08  9:54 mlmmj-1.2.3 released. Features added and bugs squashed Mads Martin Joergensen
                   ` (10 preceding siblings ...)
  2005-02-08 17:57 ` Morten K. Poulsen
@ 2005-02-08 18:08 ` Allan Joergensen
  2005-02-08 18:33 ` Mads Martin Joergensen
  12 siblings, 0 replies; 14+ messages in thread
From: Allan Joergensen @ 2005-02-08 18:08 UTC (permalink / raw)
  To: mlmmj

On 08-Feb-2005, Mads Martin Joergensen wrote:

> > > Allan, could you try this patch. It'll make the port configurable with
> > > LISTDIR/control/smtpport.
> > No, wait, there's a bit missing.
> Now it also defaults to 25 ;-))

It's workings, thanks :)

mvh
-- 
Allan Joergensen

"Even you couldn't give that much blood, Spock" McCoy

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: mlmmj-1.2.3 released. Features added and bugs squashed.
  2005-02-08  9:54 mlmmj-1.2.3 released. Features added and bugs squashed Mads Martin Joergensen
                   ` (11 preceding siblings ...)
  2005-02-08 18:08 ` Allan Joergensen
@ 2005-02-08 18:33 ` Mads Martin Joergensen
  12 siblings, 0 replies; 14+ messages in thread
From: Mads Martin Joergensen @ 2005-02-08 18:33 UTC (permalink / raw)
  To: mlmmj

* Mads Martin Joergensen <mmj@mmj.dk> [Feb 08. 2005 13:17]:
> 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.

It works, except for a missing closing parenthesis.

> +	for(i = 0; i < alternates->count; i++)
> +		myfree(alternates->strs[i];

This should be.

myfree(alternates->strs[i]);

I've committed it to CVS.

-- 
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.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2005-02-08 18:33 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.