diff options
| author | Barry Warsaw | 2011-05-13 16:16:11 +0200 |
|---|---|---|
| committer | Barry Warsaw | 2011-05-13 16:16:11 +0200 |
| commit | 2cf1012747a2553b030f3c435b12701ea4441afc (patch) | |
| tree | 6a053f0aad7e50da2d9453ae93d222549e000bdb /src/mailman/model/docs | |
| parent | e116cfac469673fad8446d93cddecdfdf6344039 (diff) | |
| download | mailman-2cf1012747a2553b030f3c435b12701ea4441afc.tar.gz mailman-2cf1012747a2553b030f3c435b12701ea4441afc.tar.zst mailman-2cf1012747a2553b030f3c435b12701ea4441afc.zip | |
* BounceEvent.where -> BounceEvent.context
* Add BounceContext enum
Diffstat (limited to 'src/mailman/model/docs')
| -rw-r--r-- | src/mailman/model/docs/bounce.rst | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/mailman/model/docs/bounce.rst b/src/mailman/model/docs/bounce.rst index 6c59a68ee..41784cd9c 100644 --- a/src/mailman/model/docs/bounce.rst +++ b/src/mailman/model/docs/bounce.rst @@ -56,21 +56,29 @@ Bounce events have a flag indicating whether they've been processed or not. >>> event.processed False -When a bounce is registered, you can also include an informative string which -indicates where the bounce was detected. This is essentially a semantics-free -field. -:: +When a bounce is registered, you can indicate the bounce context. >>> msg = message_from_string("""\ ... From: mail-daemon@example.org ... To: test-bounces@example.com ... Message-ID: <second> - ... + ... ... """) +If no context is given, then a default one is used. + + >>> event = processor.register(mlist, 'bart@example.com', msg) + >>> print event.message_id + <second> + >>> print event.context + BounceContext.normal + +A probe bounce carries more weight than just a normal bounce. + + >>> from mailman.interfaces.bounce import BounceContext >>> event = processor.register( - ... mlist, 'bart@example.com', msg, 'Some place') + ... mlist, 'bart@example.com', msg, BounceContext.probe) >>> print event.message_id <second> - >>> print event.where - Some place + >>> print event.context + BounceContext.probe |
