On 2025-03-10 9:35 p.m., Kyle Lahnakoski wrote:
On 2025-03-10 12:22 a.m., Stephen J. Turnbull wrote:
Alternatively, using the 'LMTP' class from 'smtplib' your Python
script is almost a one-liner.  You get the intended recipient from
'Delivered-To' (if it exists, if not life is considerably more
complex), the sender from 'Sender' or 'From', and just pass that on to
the LMTP object's send method to send to localhost:8024 (assuming the
default port).

Thank you, I will try that next.  It seems simple injection of the *-request@... emails into the mailist has no effect.

... and that WORKED!  thank you!

def send(file): content = file.read() recipient_email, sender_email = get_emails(content) if not recipient_email: return with smtplib.LMTP(config.lmtp.host, config.lmtp.port) as lmtp: lmtp.sendmail(sender_email, [recipient_email], content)
_______________________________________________
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/BJVBGFMFZ6QE6MO2RK6A2OSB6WQ7K23Y/

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

Reply via email to