Christian Laursen | 1 Feb 15:57 2007
Picon

Patch to ignore empty lines in files under /control/

Since empty lines in some of the files in the control dir can result in
suprising behaviour I have made a small patch that makes mlmmj ignore
those.

As far as I can see empty lines doesn't make any sense in any of the
existing tunables, so it should be safe to ignore them.

Unless there are any protests I will probably commit this change
sometime tomorrow.

Index: src/ctrlvalues.c
===================================================================
RCS file: /home/mmj/MMJCVS/mlmmj/src/ctrlvalues.c,v
retrieving revision 1.2
diff -u -w -r1.2 ctrlvalues.c
--- src/ctrlvalues.c	19 Jun 2004 03:44:47 -0000	1.2
+++ src/ctrlvalues.c	1 Feb 2007 10:52:35 -0000
 <at>  <at>  -52,6 +52,8  <at>  <at> 
 	ret->strs = NULL;
 	while((value = mygetline(ctrlfd)) != NULL) {
 		chomp(value);
+		if (*value == '\0')
+			continue;
 		ret->count++;
 		ret->strs = (char **) myrealloc(ret->strs, sizeof(char *) *
 					(ret->count + 1));

--

-- 
Christian Laursen

(Continue reading)

Sven 'Darkman' Michels | 1 Feb 16:00 2007
Picon

Re: Patch to ignore empty lines in files under /control/

Christian Laursen wrote:
> Unless there are any protests I will probably commit this change
> sometime tomorrow.

What about the footer file? ;)

Regards,

Christian Laursen | 1 Feb 16:08 2007
Picon

Re: Patch to ignore empty lines in files under /control/

Sven 'Darkman' Michels <sven@...> writes:

> Christian Laursen wrote:
>> Unless there are any protests I will probably commit this change
>> sometime tomorrow.
>
> What about the footer file? ;)

As far as I can tell the footer file isn't read by ctrlvalues() so it
should remain unaffected.

--

-- 
Christian Laursen

Morten K. Poulsen | 1 Feb 23:06 2007
Picon

Re: Additional Information for FC6/Sendmail problem


Hi Cameron,

"Cameron B. Prince" <cplists@...> wrote:
> /bin/sh: /usr/bin/mlmmj-maintd -F -L /var/spool/mlmmj/tesla/:
> No such file or directory

What is the exact line in your crontab? It looks like you quoted the whole line.

> Jan 23 00:09:04 p2 /usr/bin/mlmmj-send[11378]: mlmmj-send.c:243: Error in
> MAIL FROM. Reply = [553 5.3.0
> <test+bounces-confsub-770e4345edd654b-cameron=mydomain.com@...>...
> User Unknown^M ]: No such file or directory

Ignore the "No such file or directory" part. It appears that your sendmail (which handles domain.com, I
presume) does not know the user "test <at> domain.com" and therefore rejects the mail. Is
test@... the alias for the list?

Morten

--

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

Morten K. Poulsen | 1 Feb 23:18 2007
Picon

Re: Patch to ignore empty lines in files under /control/


Christian Laursen <xi@...> wrote:
> Sven 'Darkman' Michels <sven@...> writes:
>> Christian Laursen wrote:
>>> Unless there are any protests I will probably commit this
>>> change sometime tomorrow.
>>
>> What about the footer file? ;)
> 
> As far as I can tell the footer file isn't read by ctrlvalues()
> so it should remain unaffected.

True. The footer is added with a call to dumpfd2fd().

I think the patch is fine. You might want to add a comment like /* ignore empty lines */ or something :)

Morten

--

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

Morten K. Poulsen | 1 Feb 23:20 2007
Picon

Re: mlmmj maxmailsize patch


"Christoph Wilke" <chris@...> wrote:
> On Tue, January 23, 2007 12:06, Christoph Wilke wrote:
>> Hopefully I can fix this this afternoon, and send a new
>> patch tomorrow.
> 
> Sorry, I helped my girlfriend to TeX some work..

Priorities! ;)

No hurry. I don't plan on a 1.2.14 any time soon.

Morten

--

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

Christoph Wilke | 13 Feb 19:19 2007
Picon

Re: mlmmj maxmailsize patch

Hej!

On Mon, January 22, 2007 21:17, Sven 'Darkman' Michels wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi myself,
>
> Sven 'Darkman' Michels wrote:
>> Would be nice if someone can confirm this, i'd like to test
>> it soon ;-)
>
> well, i just added two unlinks and it seems to work "so far", but:
> the bounce mail generated by mlmmj isn't parsed properly. The reason
> is, that your patch uses "new" macros which are not implemented
> anyway.
> New is: $oldsubject$, $maxmailsize$

I fixed now (at last) the missing macro ($maxmailsize$).
Patch attached.

Ciao
Chris

ps. Sorry for the long delay, but all the time I thought I
had some spare time, I had to do some other work first...
diff -Nru mlmmj-1.2.13.orig/listtexts/de/maxmailsize mlmmj-1.2.13-maxmailsize/listtexts/de/maxmailsize
--- mlmmj-1.2.13.orig/listtexts/de/maxmailsize	1970-01-01 01:00:00.000000000 +0100
+++ mlmmj-1.2.13-maxmailsize/listtexts/de/maxmailsize	2007-02-13 18:55:00.000000000 +0100
(Continue reading)

Sven 'Darkman' Michels | 14 Feb 13:42 2007
Picon

Re: mlmmj maxmailsize patch


Christoph Wilke wrote:
> Hej!

> I fixed now (at last) the missing macro ($maxmailsize$).
> Patch attached.

Whatever you did, the patch doesn't work anymore for me. Maybe
i have some time to check but atm not. The mail just got discarded,
no error mail, nothing in the logs (not in mail log nor in mlmmjs
log). But i see the bounce mail in queue dir - without parsed
macro - horray.

Any ideas?

Thanks!
Sven
Sven 'Darkman' Michels | 14 Feb 16:15 2007
Picon

Re: mlmmj maxmailsize patch


Hi me, again ;-)

Sven 'Darkman' Michels wrote:
> 
> Any ideas?

I got another timeslot to get this sorted. It seems now to work and
i fixed the parse of $maxmailsize$, too. So if anyone is interested,
here is a cleaned patch:
http://www.darkman.de/~sven/mlmmj-1.2.13-maxmailsize-darkman.patch

I still get nothing in the logs, but that may some other problem...

What i changed:

char *maildata[4] = { "posteraddr", NULL, "maildata", NULL };
+ char *maildata[4] = { "posteraddr", NULL, "maxmailsize", NULL };

and removed two free's:
myfree(donemailname);
myfree(mailfile);
after the unlink and moved the free of maxmailsizestr befor the unlink.

Please, someone with more mlmmj knowhow or even more c code knowhow,
take a look if thats okay.

Thanks and regards,
Sven
(Continue reading)

Morten K. Poulsen | 14 Feb 23:23 2007
Picon

Re: mlmmj maxmailsize patch


Sven 'Darkman' Michels <sven@...> wrote:
> I still get nothing in the logs, but that may some other problem...
[snip]
> Please, someone with more mlmmj knowhow or even more c code knowhow,
> take a look if thats okay.

+           if((st.st_size > maxmailsize)) {
+#if 0
+               log_error(LOG_ARGS, "%s is %d bytes too big.\n",
+                       donemailname,
+                       (st.st_size - maxmailsize));
+#endif

The missing log entry might be because of the "#if 0" ;-)

Otherwise, it looks ok. I will review it in depth and commit it "soon."

Morten

--

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


Gmane