LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-23-2017, 12:50 PM   #1
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,732

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
majordomo and DMARC


I have a production server using majordomo for mailing lists. Recently, I've noticed that email from subscribed list members at AOL is being rejected because of failing AOL's DMARC checks. This happens on deliveries to AOL, Yahoo!, Hotmail, MSN, and a few others.

The failure messages suggest that the From: header needs to NOT be aol if the mail is not being delivered by an AOL server, which of course, it is not. The "fix" is to set the From: to be the list address, and the Reply-to: to have the aol address.

Unfortunately, changing the From: is not readily configurable in majordomo. I have figured out a patch to majordomo's resend script and will be happy to share it if there is any interest here.

I have started another thread to discuss DMARC-compliant mailing list managers.
 
Old 07-10-2017, 12:35 AM   #2
quilliw
LQ Newbie
 
Registered: Jul 2017
Posts: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
I have figured out a patch to majordomo's resend script and will be happy to share it if there is any interest here.
Yes, please do.
 
Old 07-10-2017, 05:18 PM   #3
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,732

Original Poster
Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Sorry, I know how to apply patches, but not how to create one.
These changes will
1) Capture the To: address (the list address) and
2) Change the From: address to be the list address prior to sending the email.

This prevents AOL, Yahoo, and ?? from rejecting the message because the From says aol.com, but the email is not coming from AOL.

Add the blue lines to resend at the indicate places.
Code:
in resend after line 353... 
#
# Message parsing starts here
#
## First get the "To: and capture the address... DMARC adds
print STDERR "$0: find To:.\n" if $DEBUG;
while (<IN>) {
	## added to capture the list address for use as From; 'cause of DMARC stuff.
	if (/^To:\s*(.*)/i) {
		$newfrom = $_;
		print STDERR "$0: New From Before $newfrom\n" if $DEBUG;
		$newfrom =~ s/^To: //;
		print STDERR "$0: New From After  $newfrom\n" if $DEBUG;
	}
}	
close(IN);

open(IN, "$TMPDIR/resend.$$.in") || 
    die("resend: Can't open $TMPDIR/resend.$$.tmp: $!");
###  end of DMARC changes


print STDERR "$0: parsing header.\n" if $DEBUG;

# parse the header for bad lines, etc.  We'll bounce in a moment.
Code:
in resend after line 512
# spit it out!
#
while (<MAILIN>) {

	## Change From to value of To (in $newfrom) 'cause of DMARC 
	if (/^from:\s*(.+)/i) {
		### change from to value of To: 'cause of DMARC...
		print STDERR "$0: before From: $_\n" if $DEBUG;
		$_ = "From: $newfrom";
		print STDERR "$0: after From: $_\n" if $DEBUG;
	}



    print MAILOUT $_;
}

# cleanup
#
Then go to the config for each list and set the reply_to to $SENDER, because the From address will no longer show who sent the email.
I'm open to any cleaner solution or a DMARC compliant mailing list manager.

Let me know of any questions/concerns.
 
Old 07-11-2017, 11:03 AM   #4
quilliw
LQ Newbie
 
Registered: Jul 2017
Posts: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
Sorry, I know how to apply patches, but not how to create one.
That's easy, really: You use the "diff" command, I like using options "-pub" which will give you, in order, the function/block the change happens, unified diff format, and ignore whitespace changes. The attached patch has been created with
Code:
diff -pub /usr/lib/majordomo/resend resend > patch.txt
Quote:
Originally Posted by scasey View Post
Then go to the config for each list and set the reply_to to $SENDER, because the From address will no longer show who sent the email.
I'm open to any cleaner solution or a DMARC compliant mailing list manager.

Let me know of any questions/concerns.
It's perl so there will be more ways to do it. I might add another option to resend so I can enable it per list. I'll update here if and when.
Attached Files
File Type: txt patch.txt (1.2 KB, 39 views)
 
Old 07-11-2017, 01:05 PM   #5
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,732

Original Poster
Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Cool, thanks for the lesson! I did use diff to find/remember where I'd made the changes, but didn't know that was how patch files got built.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
majordomo paul_mat Linux - Newbie 0 06-06-2005 06:59 PM
majordomo ????? pudhiyavan Linux - General 0 02-19-2004 06:52 AM
Majordomo on RH7.1 Dave VanHorn Linux - General 0 10-09-2001 06:27 PM
majordomo!! katana Linux - General 8 09-23-2001 06:44 AM
Majordomo Help! markma Linux - General 2 12-18-2000 08:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration