17 Oct
2024
17 Oct
'24
9:47 p.m.
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 <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan