~kaction/config

ad0d0a55170aeaf9d334ce71a5e700ef422d3e1a — Dmitry Bogatov 1 year, 1 month ago 04f9f37
msmtp: allow sending control emails to mailing lists

It is common to have subscription to mailing list foo@example.com to be
controlled by mailing to foo-request@example.com. With algorithm that
derives "from" address from "to" address, it results in control emails
being reject since they are sent from non-subscribed email.

This little hack makes sure that "from" addresses generated for
foo@example.com and foo-request@example.com are the same, so
subscription management works transparently without setting "from"
header manually.
1 files changed, 1 insertions(+), 0 deletions(-)

M universe/msmtp/generator.py
M universe/msmtp/generator.py => universe/msmtp/generator.py +1 -0
@@ 11,6 11,7 @@ with open(config, "w") as config, open(newmail, "w") as newmail:
    msg = parser.parse(stdin)
    (_name, addr) = parseaddr(msg["To"])
    addr = addr.replace("@", "#") + "#v1"
    addr = addr.replace("-request", "")  # solves problem with Mailman
    user = "demigod"

    config.write(f"""