mlmmj.mlmmj.org archive mirror
 help / color / mirror / Atom feed
From: "Robin H. Johnson" <robbat2@gentoo.org>
To: mlmmj@mlmmj.org
Subject: [mlmmj] Adding customheaders & footer to mlmmj list-control mails message
Date: Wed, 04 May 2016 20:59:38 +0000	[thread overview]
Message-ID: <robbat2-20160504T203222-118504689Z@orbis-terrarum.net> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1241 bytes --]

Hi,

We recently ran into a not-nice RBL situation with SORBS, where a
spamtrap address was forged as the source for an initial confirmation
message, as well as several help requests.

There was no way to know that the spamtrap address was forged, as it
came from a domain without any SPF, DKIM or DMARC, and the source IP
wasn't on any RBLs, nor was it a dialup/broadband system.

None of the list-control messages include the customheaders, so the
outgoing mail did not include the RFC2369 headers. The spamtrap was set
up to ignore mails containing such headers, but since they were missing,
our listserver got blacklisted :-(.

The source of the problem seems to be the second call to
do_all_the_voodoo_here in src/mlmmj-process.c, where both hdrfd and
footfd are passed as -1.

Attached is a quick patch that includes customheaders and footer in list
control messages.

The list control messages also don't respect the delheaders file, but
that's not an issue for our list usage, so I'm leaving that for somebody
else to fix.

-- 
Robin Hugh Johnson
Gentoo Linux: Developer, Infrastructure Lead, Foundation Trustee
E-Mail     : robbat2@gentoo.org
GnuPG FP   : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85

[-- Attachment #1.2: mlmmj-1.2.19.0-listcontrol-customheaders.patch --]
[-- Type: text/x-diff, Size: 1231 bytes --]

List control emails do not include customheaders, and can lead to RBL issues
for forged senders.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

diff -Nuar --exclude '*~' mlmmj-1.2.19.0.orig/src/mlmmj-process.c mlmmj-1.2.19.0/src/mlmmj-process.c
--- mlmmj-1.2.19.0.orig/src/mlmmj-process.c	2014-03-23 17:57:24.000000000 -0700
+++ mlmmj-1.2.19.0/src/mlmmj-process.c	2016-05-04 13:50:26.034174788 -0700
@@ -702,8 +702,19 @@
 						    "output mail file");
 				exit(EXIT_FAILURE);
 			}
-			if(do_all_the_voodoo_here(rawmailfd, donemailfd, -1,
-					-1, delheaders,
+			/* hdrfd is checked in do_all_the_voodoo_here(), because the
+			 * customheaders file might not exist */
+			headerfilename = concatstr(2, listdir, "/control/customheaders");
+			hdrfd = open(headerfilename, O_RDONLY);
+			myfree(headerfilename);
+
+			/* footfd is checked in do_all_the_voodoo_here(), see above */
+			footerfilename = concatstr(2, listdir, "/control/footer");
+			footfd = open(footerfilename, O_RDONLY);
+			myfree(footerfilename);
+
+			if(do_all_the_voodoo_here(rawmailfd, donemailfd, hdrfd,
+					footfd, delheaders,
 					NULL, &allheaders, NULL) < 0) {
 				log_error(LOG_ARGS, "do_all_the_voodoo_here");
 				exit(EXIT_FAILURE);

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 445 bytes --]

             reply	other threads:[~2016-05-04 20:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-04 20:59 Robin H. Johnson [this message]
2016-05-04 23:30 ` [mlmmj] Adding customheaders & footer to mlmmj list-control mails message Ben Schmidt
2016-05-17  1:37 ` Robin H. Johnson
2016-05-17  7:57 ` Gavin Henry
2016-05-17 16:16 ` Robin H. Johnson
2016-05-20  1:30 ` Eric Wong
2016-05-20  6:50 ` Robin H. Johnson
2016-05-20 21:55 ` Eric Wong

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=robbat2-20160504T203222-118504689Z@orbis-terrarum.net \
    --to=robbat2@gentoo.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).