diff options
| author | bwarsaw | 1999-04-16 02:51:30 +0000 |
|---|---|---|
| committer | bwarsaw | 1999-04-16 02:51:30 +0000 |
| commit | 35ef518cb0a52a304f5622d54aa899687dd7fb33 (patch) | |
| tree | ffb0ff56cd1a6e565f02998e0af179bd8e3c6ec7 | |
| parent | 10b780ffebd1c9589297a05e8ef7a7b2c11d082a (diff) | |
| download | mailman-35ef518cb0a52a304f5622d54aa899687dd7fb33.tar.gz mailman-35ef518cb0a52a304f5622d54aa899687dd7fb33.tar.zst mailman-35ef518cb0a52a304f5622d54aa899687dd7fb33.zip | |
Post(): When the sender does not want copies of their messages, and
has delivery disabled, they won't be on the recipients list. Catch
and ignore the failure in .remove().
| -rw-r--r-- | Mailman/MailList.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py index 40baffe8d..871560b98 100644 --- a/Mailman/MailList.py +++ b/Mailman/MailList.py @@ -1232,7 +1232,13 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin, if not self.GetUserOption(m, mm_cfg.DisableDelivery): recipients.append(m) if dont_send_to_sender: - recipients.remove(self.GetUserSubscribedAddress(sender)) + try: + recipients.remove(self.GetUserSubscribedAddress(sender)) + except ValueError: + # sender does not want to get copies of their own messages + # (not metoo), but delivery to their address is disabled + # (nomail) + pass self.LogMsg("post", "post to %s from %s size=%d", self._internal_name, msg.GetSender(), len(msg.body)) self.DeliverToList(msg, recipients, |
