On Sun, Feb 15, 2026 at 08:57:44AM +0100, Fabian Groffen wrote:
On 15-02-2026 10:00:37 +0800, Kevin J. McCarthy wrote:
Well, that didn't work.  Apparently, OSUOSL set "munge from" as the
default in their config.  When I try to change it, via the web
interface, to "accept" I get the error:

Error: dmarc_moderation_action must be >= the configured default value.

Yes, but what was the expected result?

Yeah it was just to test. I made the change myself a few years ago from Accept to Munge, so thought I could change it back, just to see how it worked now that they are filtering DKIM headers. But it looks like they nailed the option on. :-)

Perhaps you can share your "hacky macros" that you used in Mutt to deal
with submissions via the list?

I have macros to copy the messages I want to apply to a different mailbox, and to quickly switch to that mailbox. Those are just standard "<copy-message>~/temp/foo<enter>" macros.

The new macro invokes a script via <edit>:

macro index,pager ,pum \
"<enter-command>set my_old_editor=\$editor 
editor='~/.mutt/bin/unmunge-patch.rb'<enter>\
<edit>\
<enter-command>set editor=\$my_old_editor<enter>"     "Unmunge patch From addr"

I noticed that when the list server munges the From address, it always moves the new From address down, immediately followed by a Reply-To set to the original address.

So the unmunge script simply drops the From: header if it matches "XXXXX via Mutt-dev" and then renames the Reply-To: header to From:.

I'm attaching the script, but please spare me any thrown tomatoes... I hacked it together quickly, and it's not designed to be bullet-proof. :-P If it fails, I can always <edit> the message manually and fix it.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA
#!/usr/bin/ruby
#
# This is meant to unmunge mutt-dev mailing list patches by simply renaming
# the Reply-To header to the From header if the from header looks like
#   From: XXX XXXX via Mutt-dev <[email protected]>
#
# Right now this script is pretty dumb.  It assumes the from header name part
# will be on the first line and it's not encoded.
#

require 'tempfile'
require 'fileutils'

path = ARGV[0]
temp_file = Tempfile.new('unmunge-patch')

state = :in_headers

drop_header = false
rename_reply_to = false

begin
  File.open(path, 'r') do |file|
    file.each_line do |line|
      case state
      when :in_headers
        case line
        when /^from:\s*.*via mutt-dev/i
          drop_header = true
          rename_reply_to = true
        when /^reply-to:/i
          drop_header = false
          if rename_reply_to
            line.sub!(/^reply-to:/i, "From:")
          end
        when /^[ \t]+/
          # continuation line.
          # continue dropping or not dropping.
        when "\n"
          drop_header = false
          state = :in_body
        else
          drop_header = false
        end
      end

      if !drop_header
        temp_file.puts line
      end
    end
  end

  temp_file.close
  FileUtils.mv(temp_file.path, path)
ensure
  temp_file.close unless temp_file.closed?
  temp_file.unlink # deletes the temp file
end

Attachment: signature.asc
Description: PGP signature

Reply via email to