[Mailman-Developers] running 2.1.9 completely from crontab

Maximilian Mehnert maximilian.mehnert at googlemail.com
Tue Oct 9 12:58:52 CEST 2007


I had a little problem because my provider does not allow running daemons.
However, crontab is fine.

Since setting up aliases does not work either and I did not want to
change .procmailrc all the time, I'm using a catchall user and Maildir
delivery.

In order to make this work, I changed two things.

diff -ur mailman-2.1.9/Mailman/Queue/MaildirRunner.py mailman-2.1.9-mod/Mailman/Queue/MaildirRunner.py
--- mailman-2.1.9/Mailman/Queue/MaildirRunner.py	2005-08-27 01:40:17.000000000 +0000
+++ mailman-2.1.9-mod/Mailman/Queue/MaildirRunner.py	2007-10-06 16:08:29.000000000 +0000
@@ -123,7 +123,7 @@
                 # message was destined for.  See verp_bounce() in
                 # BounceRunner.py for why we do things this way.
                 vals = []
-                for header in ('delivered-to', 'envelope-to', 'apparently-to'):
+                for header in ('x-original-to','delivered-to', 'envelope-to', 'apparently-to'):
                     vals.extend(msg.get_all(header, []))
                 for field in vals:
                     to = parseaddr(field)[1]
diff -ur mailman-2.1.9/bin/qrunner mailman-2.1.9-mod/bin/qrunner
--- mailman-2.1.9/bin/qrunner	2006-01-19 01:07:40.000000000 +0000
+++ mailman-2.1.9-mod/bin/qrunner	2007-10-09 10:33:11.000000000 +0000
@@ -119,7 +119,8 @@
         # Subclass to hack in the setting of the stop flag in _doperiodic()
         class Once(qrclass):
             def _doperiodic(self):
-                self.stop()
+                if self._oneloop()<1:
+                    self.stop()
         qrunner = Once(slice, range)
     else:
         qrunner = qrclass(slice, range)



First I added the x-original-to field since some mails got stuck.

The second change in qrunner is the short hack to get all pending
stuff done with one run from crontab:
qrunner -v -r All -o

Would that be something that could be included in future releases
maybe as a separate option?

Regards,

Maximilian


More information about the Mailman-Developers mailing list