[Mailman-Users] Changing the senders name in the From line in confirmation mails
Mark Sapiro
mark at msapiro.net
Sat Jul 21 14:23:34 EDT 2018
On 7/20/18 10:23 AM, Andre Tann wrote:
>
> The sender's name in the from line of a confirmation mail should be
> changed/inserted. Example:
>
> This line:
>
> From:
> newsletter-confirm+7f07b5deb0843fad9ab40ead51ac7e7541cf22d6 at example.com
>
> should be changed to
>
> From: My-Company
> <newsletter-confirm+7f07b5deb0843fad9ab40ead51ac7e7541cf22d6 at example.com>
This can be done, but without modifying code, not exactly as you
propose. You can make it
From: (My-Company) newsletter-confirm+7... at example.com
I.e. You can include My-Company as a comment, but not as a display name.
There are two default settings:
VERP_CONFIRM_FORMAT = '%(addr)s+%(cookie)s'
VERP_CONFIRM_REGEXP =
r'(?s)^(.*<)?(?P<addr>.+)\+(?P<cookie>[0-9a-f]{40})@.*$'
You can override these in mm_cfg.py with
VERP_CONFIRM_FORMAT = '(My-Company) %(addr)s+%(cookie)s'
VERP_CONFIRM_REGEXP = r'(?s)^\(?My-Company\)?
(.*<)?(?P<addr>.+)\+(?P<cookie>[0-9a-f]{40})@.*$'
(watch out for wrapped lines).
You can't do
VERP_CONFIRM_FORMAT = 'My-Company <%(addr)s+%(cookie)s>'
because the @example.com is appended to that.
--
Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Users
mailing list