diff options
| author | Barry Warsaw | 2008-12-22 23:26:58 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2008-12-22 23:26:58 -0500 |
| commit | fd600d3952393dc9808fefb9be871f78cdbdff39 (patch) | |
| tree | 1c404608ccfbe640a3816859d3257025b0c4b353 /mailman/Message.py | |
| parent | dfccf2b7d2b5749c86267645aaf870f128dab2d8 (diff) | |
| download | mailman-fd600d3952393dc9808fefb9be871f78cdbdff39.tar.gz mailman-fd600d3952393dc9808fefb9be871f78cdbdff39.tar.zst mailman-fd600d3952393dc9808fefb9be871f78cdbdff39.zip | |
Convert more configuration variables to lazr.config.
Add .push() and .pop() methods to the Configuration object.
Put the 'config' object in the globals of doctests.
Add some test layers for setting up the configuration and the SMTP server.
Diffstat (limited to '')
| -rw-r--r-- | mailman/Message.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mailman/Message.py b/mailman/Message.py index e78678dc4..c8fb17f3b 100644 --- a/mailman/Message.py +++ b/mailman/Message.py @@ -118,14 +118,15 @@ class Message(email.message.Message): header value found is returned. However the search order is determined by the following: - - If config.USE_ENVELOPE_SENDER is true, then the search order is - Sender:, From:, unixfrom + - If config.mailman.use_envelope_sender is true, then the search order + is Sender:, From:, unixfrom - Otherwise, the search order is From:, Sender:, unixfrom The optional argument use_envelope, if given overrides the - config.USE_ENVELOPE_SENDER setting. It should be set to either 0 or 1 - (don't use None since that indicates no-override). + config.mailman.use_envelope_sender setting. It should be set to + either True or False (don't use None since that indicates + no-override). unixfrom should never be empty. The return address is always lowercased, unless preserve_case is true. @@ -133,7 +134,7 @@ class Message(email.message.Message): This method differs from get_senders() in that it returns one and only one address, and uses a different search order. """ - senderfirst = config.USE_ENVELOPE_SENDER + senderfirst = config.mailman.use_envelope_sender if use_envelope is not None: senderfirst = use_envelope if senderfirst: |
