[Mailman-Users] run script when virtual-mailman is updated

Peter Sørensen maspsr at sdu.dk
Tue Feb 21 09:25:27 CET 2012


Thanks Mark - exactly what I needed. Not quite sure on the $1.
This I could'nt make work. 

Best regards

Peter
				
		
-----Oprindelig meddelelse-----
Fra: Mark Sapiro [mailto:mark at msapiro.net] 
Sendt: 20. februar 2012 17:19
Til: Peter Sørensen
Cc: mailman-users at python.org
Emne: Re: [Mailman-Users] run script when virtual-mailman is updated

On 2/20/2012 3:29 AM, Peter Sørensen wrote:
> 
> I would like to have this script run whenever the virtual-mailman is updated.


Add

/usr/sbin/postmap $1

to the beginning of your script and put

POSTFIX_MAP_CMD = '/path/to/your script'

in mm_cfg/py. This will invoke your script with argument equal the path to virtual-mailman whenever lists are created or deleted. Your script will then run the default postmap command to update virtual-mailman.db and can then do whatever you do do update relay_recipients.

The FAQ at <http://wiki.list.org/x/ZoCj> has more details on this kind of process.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Users mailing list