diff options
| author | Barry Warsaw | 2009-11-24 23:36:14 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2009-11-24 23:36:14 -0500 |
| commit | a26ed5b02a76dd26a72eb8acad819be47dca3049 (patch) | |
| tree | 916a3a0cacd895519e891cef83930e01c6f3503c /src/mailman/mta/connection.py | |
| parent | 79d9e36a0b824548a0f2bc83cb948fc5ce668151 (diff) | |
| download | mailman-a26ed5b02a76dd26a72eb8acad819be47dca3049.tar.gz mailman-a26ed5b02a76dd26a72eb8acad819be47dca3049.tar.zst mailman-a26ed5b02a76dd26a72eb8acad819be47dca3049.zip | |
Diffstat (limited to 'src/mailman/mta/connection.py')
| -rw-r--r-- | src/mailman/mta/connection.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mailman/mta/connection.py b/src/mailman/mta/connection.py index 105d25afb..36af7a06e 100644 --- a/src/mailman/mta/connection.py +++ b/src/mailman/mta/connection.py @@ -28,6 +28,7 @@ __all__ = [ import logging import smtplib +from lazr.config import as_boolean from mailman.config import config @@ -66,6 +67,10 @@ class Connection: def sendmail(self, envsender, recips, msgtext): """Mimic `smtplib.SMTP.sendmail`.""" + if as_boolean(config.mailman.devmode): + # Force the recipients to the specified address, but still deliver + # to the same number of recipients. + recips = [config.mta.devmode_recipient] * len(recips) if self._connection is None: self._connect() try: |
