| From | Sent On | Attachments |
|---|---|---|
| Anand Buddhdev | Jun 27, 2002 6:01 am | |
| Sam Varshavchik | Jun 27, 2002 6:21 am | |
| Anand Buddhdev | Jun 27, 2002 7:36 am | |
| Sam Varshavchik | Jun 27, 2002 8:04 am | |
| Anand Buddhdev | Jun 28, 2002 3:33 am |
| Subject: | [courier-users] dynamic delivery from .courier not working right | |
|---|---|---|
| From: | Anand Buddhdev (ar...@anand.org) | |
| Date: | Jun 27, 2002 6:01:46 am | |
| List: | net.sourceforge.lists.courier-users | |
I'm trying to make it easy to manage mailing lists on my server. I have created a user called "list" who managed all lists.
In order to avoid creating 3 .courier files for each list created, I decided to create a single .courier-default file as follows:
||./wrapper
The wrapper script is a little program that looks at the environment variables and prints out the appropriate couriermlm command, which courier is then supposed to execute. For example, if I send email to anand-help@, then the wrapper print out:
|/usr/lib/courier/bin/couriermlm ctlmsg anand
But when I try to run this, I get deferrals with the following log entry:
Jun 27 14:51:08 dali courierlocal:
id=000AE704.3D1B0976.00005192,from=<ana...@celtelplus.com>,addr=<list...@dali.celtelplus.com>:
Invalid address.
Jun 27 14:51:08 dali courierlocal:
id=000AE704.3D1B0976.00005192,from=<ana...@celtelplus.com>,addr=<list...@dali.celtelplus.com>,status:
deferred
The wrapper looks like this:
#!/usr/bin/python2.1 import os, string ext = os.environ['EXT'] mlm = '|/usr/lib/courier/bin/couriermlm' sendmail = '|/usr/lib/courier/bin/sendmail' owneraddress = 'post...@celtelplus.com' if os.environ['EXT2'] == 'owner': # dispatch to list owner command = sendmail + ' -f "' + os.environ['SENDER'] + '" ' + owneraddress elif '-' in ext: # dispatch to list controller command = mlm + ' ctlmsg ' + string.split(ext,'-')[0] else: # address has no special actions, so likely a list # dispatch to list command = mlm + ' msg ' + ext print command
-- Anand Buddhdev http://anand.org





