| Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-23-2017, 12:50 PM
|
#1
|
|
LQ Veteran
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: Rocky Linux 9.8 w/Cinnamon 5.8.4 (except on the headless production server)
Posts: 6,001
|
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.
|
|
|
|
07-10-2017, 12:35 AM
|
#2
|
|
LQ Newbie
Registered: Jul 2017
Posts: 2
Rep: 
|
Quote:
Originally Posted by scasey
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.
|
|
|
|
07-10-2017, 05:18 PM
|
#3
|
|
LQ Veteran
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: Rocky Linux 9.8 w/Cinnamon 5.8.4 (except on the headless production server)
Posts: 6,001
Original Poster
|
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.
|
|
|
|
07-11-2017, 11:03 AM
|
#4
|
|
LQ Newbie
Registered: Jul 2017
Posts: 2
Rep: 
|
Quote:
Originally Posted by scasey
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
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.
|
|
|
|
07-11-2017, 01:05 PM
|
#5
|
|
LQ Veteran
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: Rocky Linux 9.8 w/Cinnamon 5.8.4 (except on the headless production server)
Posts: 6,001
Original Poster
|
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.
|
|
|
|
All times are GMT -5. The time now is 06:13 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|