summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorbwarsaw2001-11-20 17:26:50 +0000
committerbwarsaw2001-11-20 17:26:50 +0000
commit1f84aaac8e30c46cf78e46ce9707b8cc33d4f311 (patch)
tree51cd677d7011803eace28cd27caf6dd8d61ca1a5 /scripts
parent395ccd7e30179e48c31f931e87b78bb76d6822ea (diff)
downloadmailman-1f84aaac8e30c46cf78e46ce9707b8cc33d4f311.tar.gz
mailman-1f84aaac8e30c46cf78e46ce9707b8cc33d4f311.tar.zst
mailman-1f84aaac8e30c46cf78e46ce9707b8cc33d4f311.zip
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mailowner37
-rwxr-xr-xscripts/owner37
2 files changed, 40 insertions, 34 deletions
diff --git a/scripts/mailowner b/scripts/mailowner
index be95261b0..d018d0c71 100755
--- a/scripts/mailowner
+++ b/scripts/mailowner
@@ -18,12 +18,11 @@
"""Send a message to the mailing list owner.
-The -owner address for alist should be filtered to this program, through the
-mail wrapper. E.g. for list `test@yourdomain.com', the `test-owner' alias
-would deliver to this script.
+All messages to a list's -owner address should be piped through this script.
+The -owner address is defined to be delivered directly to the list owners plus
+the list moderators, with no intervention for bounce processing.
Stdin is the mail message, and argv[1] is the name of the target mailing list.
-
"""
import sys
@@ -37,6 +36,13 @@ from Mailman.Logging.Utils import LogStdErr
LogStdErr('error', 'mailowner')
+OWNER_PIPELINE = [
+ 'SpamDetect',
+ 'Replybot',
+ 'OwnerRecips',
+ 'ToOutgoing',
+ ]
+
def main():
@@ -50,19 +56,16 @@ def main():
print >> sys.stderr, _(
'mailowner script, list not found: %(listname)s')
sys.exit(1)
- # Immediately queue the message for the bounce/cmd qrunner to process.
- # The advantage to this approach is that messages should never get lost --
- # some MTAs have a hard limit to the time a filter prog can run. Postfix
- # is a good example; if the limit is hit, the proc is SIGKILL'd giving us
- # no chance to save the message.
- #
- # BAW: This script can receive both -owner and -admin messages. This is
- # bogus because there /is/ a distinction: -admin messages do bounce
- # processing while -owner messages do not. However, it's too expensive to
- # make this determination here, so we defer it to the CommandRunner.
- cmdq = get_switchboard(mm_cfg.CMDQUEUE_DIR)
- cmdq.enqueue(sys.stdin.read(), listname=listname, toauthoritah=1,
- _plaintext=1)
+ # Queue the message for the owners. We will send them through the
+ # incoming queue because we need some processing done on the message. The
+ # processing is minimal though, so craft our own pipeline, expressly for
+ # the purpose of delivering to the list owners.
+ inq = get_switchboard(mm_cfg.INQUEUE_DIR)
+ inq.enqueue(sys.stdin.read(),
+ listname=listname,
+ _plaintext=1,
+ envsender=Utils.get_site_email(extra='bounces'),
+ pipeline=OWNER_PIPELINE)
diff --git a/scripts/owner b/scripts/owner
index be95261b0..d018d0c71 100755
--- a/scripts/owner
+++ b/scripts/owner
@@ -18,12 +18,11 @@
"""Send a message to the mailing list owner.
-The -owner address for alist should be filtered to this program, through the
-mail wrapper. E.g. for list `test@yourdomain.com', the `test-owner' alias
-would deliver to this script.
+All messages to a list's -owner address should be piped through this script.
+The -owner address is defined to be delivered directly to the list owners plus
+the list moderators, with no intervention for bounce processing.
Stdin is the mail message, and argv[1] is the name of the target mailing list.
-
"""
import sys
@@ -37,6 +36,13 @@ from Mailman.Logging.Utils import LogStdErr
LogStdErr('error', 'mailowner')
+OWNER_PIPELINE = [
+ 'SpamDetect',
+ 'Replybot',
+ 'OwnerRecips',
+ 'ToOutgoing',
+ ]
+
def main():
@@ -50,19 +56,16 @@ def main():
print >> sys.stderr, _(
'mailowner script, list not found: %(listname)s')
sys.exit(1)
- # Immediately queue the message for the bounce/cmd qrunner to process.
- # The advantage to this approach is that messages should never get lost --
- # some MTAs have a hard limit to the time a filter prog can run. Postfix
- # is a good example; if the limit is hit, the proc is SIGKILL'd giving us
- # no chance to save the message.
- #
- # BAW: This script can receive both -owner and -admin messages. This is
- # bogus because there /is/ a distinction: -admin messages do bounce
- # processing while -owner messages do not. However, it's too expensive to
- # make this determination here, so we defer it to the CommandRunner.
- cmdq = get_switchboard(mm_cfg.CMDQUEUE_DIR)
- cmdq.enqueue(sys.stdin.read(), listname=listname, toauthoritah=1,
- _plaintext=1)
+ # Queue the message for the owners. We will send them through the
+ # incoming queue because we need some processing done on the message. The
+ # processing is minimal though, so craft our own pipeline, expressly for
+ # the purpose of delivering to the list owners.
+ inq = get_switchboard(mm_cfg.INQUEUE_DIR)
+ inq.enqueue(sys.stdin.read(),
+ listname=listname,
+ _plaintext=1,
+ envsender=Utils.get_site_email(extra='bounces'),
+ pipeline=OWNER_PIPELINE)