Kyle Lahnakoski writes:

 > I am setting up an email list for my local community (just myself
 > right now). Being a nerd, I am using Amazon SES to send and
 > receive emails.

Outgoing SES is full of unpleasant surprises.  In particular, they
restrict use of certain headers (DKIM-Signature is the most important
one from Mailman's point of view) and commandeer Message-ID (which
means archivers and explicit addressees see a different Message-ID
from the one subscribers see).

> I have mailman installed on ec2 (using "pip install mailman") and
> it is working well enough to send an email to the list with
 > 
 > /opt/mailman/venv/bin/mailman inject -f <somefile>a...@mymaillist.org
 > 
 > SES is putting incoming mail into an S3 bucket, one file per
 > email. Using a small python program, I use the above command to
 > send them to the list.

It's not obvious to me how to make this work for administrative
traffic.  As Mark says, it needs to find its way into the 'command'
queue ('-q command'), but you may also need to specify what the
command is (ie, the extension such as '-join' or '-confirm') using
added metadata (the '-m' option, see 'mailman inject -h').  I don't
know offhand what the format of that would be, though.  (I mention
that because 'mailman inject -h' specifies that the target argument is
a LISTSPEC, either the List-ID or the posting address, which would not
include the extension that tells Mailman what to do with the message.
Just putting it in the command queue is probably enough, though.)

As far as I know, SES does no filtering incoming.  If that's true, you
would make life a lot easier by installing an MTA and having it relay
incoming mail to Mailman as usual, rather than queuing the mail in an
S3 bucket (saving the cost of the bucket).  If I'm wrong, you have to
trade off the benefit of filtering vs. simplicity in your operations.

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).

Steve
_______________________________________________
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/UWXLRS4MYN6PAZQMLWXR6KEHT5LYJMU7/

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

Reply via email to