On 10/17/24 12:47, Alex I wrote:
Thanks, but no luck. Trying option 1, added custom_header.py file:

The below is incomplete.  Additions inline.

import logging

from mailman.interfaces.handler import IHandler
from public import public
from zope.interface import implementer


logger = logging.getLogger('mailman.smtp') # or some other
@public
@implementer(IHandler)
class AddCustomHeader:
    """A doc string is nice"

    name = 'custom-header'
    description = 'Some description'

     def process(self, mlist, message, msgdata):
         """Add a custom email header."""
         message['X-Custom-Header-1'] = 'ABCD'
         logger.info('Custom header added to message for list: %s', 
mlist.fqdn_listname)

to /opt/mailman/venv/lib/python3.9/site-packages/mailman/handlers/

--
Mark Sapiro <m...@msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

_______________________________________________
Mailman-users mailing list -- mailman-users@mailman3.org
To unsubscribe send an email to mailman-users-le...@mailman3.org
https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Archived at: 
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/GMXX6QALQ6VM6USMCHRNCX3EZXRCWGKU/

This message sent to arch...@mail-archive.com

Reply via email to