diff options
| author | bwarsaw | 2000-06-02 22:33:42 +0000 |
|---|---|---|
| committer | bwarsaw | 2000-06-02 22:33:42 +0000 |
| commit | aa9f6f0933641714142fcd6007322db52961f8a3 (patch) | |
| tree | 79d9db4eef72cb515c1b8c6b53cbfbba07086ab2 /Mailman | |
| parent | 682e2ef252d38d43a560ce8923b72d1c48503ad2 (diff) | |
| download | mailman-aa9f6f0933641714142fcd6007322db52961f8a3.tar.gz mailman-aa9f6f0933641714142fcd6007322db52961f8a3.tar.zst mailman-aa9f6f0933641714142fcd6007322db52961f8a3.zip | |
Convert all uses of mlist.LogMsg() to the new syslog() interface.
process(): The argument to GetSender() is `use_envelope'.
Diffstat (limited to 'Mailman')
| -rw-r--r-- | Mailman/Handlers/Hold.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Mailman/Handlers/Hold.py b/Mailman/Handlers/Hold.py index c896a5351..50a4393a7 100644 --- a/Mailman/Handlers/Hold.py +++ b/Mailman/Handlers/Hold.py @@ -43,8 +43,10 @@ import HandlerAPI from Mailman import Message from Mailman import mm_cfg from Mailman import Utils +from Mailman.Logging.Syslog import syslog + class ForbiddenPoster(HandlerAPI.MessageHeld): "Sender is explicitly forbidden" pass @@ -99,7 +101,7 @@ def process(mlist, msg, msgdata): # sendmail will change the envelope sender of the message to "bar" before # delivering. This feature does not appear to be configurable. *Boggle*. if not sender or sender[:len(listname)+6] == adminaddr: - sender = msg.GetSender(envelope=0) + sender = msg.GetSender(use_envelope=0) # # is the poster in the list of explicitly forbidden posters? if len(mlist.forbidden_posters): @@ -221,8 +223,7 @@ def hold_for_approval(mlist, msg, msgdata, exc): msg = Message.UserNotification(sender, adminaddr, subject, text) HandlerAPI.DeliverToUser(mlist, msg) # Log the held message - mlist.LogMsg('vette', '%s post from %s held: %s' % - (listname, sender, reason)) + syslog('vette', '%s post from %s held: %s' % (listname, sender, reason)) # raise the specific MessageHeld exception to exit out of the message # delivery pipeline raise exc |
