[Mailman-Users] run script when virtual-mailman is updated
mark at msapiro.net
Tue Feb 21 18:10:10 CET 2012
On 2/21/2012 12:25 AM, Peter Sørensen wrote:
> Thanks Mark - exactly what I needed. Not quite sure on the $1.
> This I could'nt make work.
Mailman invokes the POSTFIX_MAP_CMD command with one argument equal to
the path to the virtual-mailman file. The intent is that this will run
which will update virtual-mailman.db with the changed virtual-mailman.
Presumably, when you replace /usr/sbin/postmap with
/path/to/your/script, you still want virtual-mailman.db to be updated so
somewhere in your script so when Mailman invokes
The $1 inside the script is replaced with the first argument and the
You could of course hard code the path to virtual-mailman in the postmap
command in your script instead of using $1 to get it from the invoking
command, but the $1 is more general.
If it failed when you tested your script by hand, that is because you
didn't invoke the script with the /path/to/data/virtual-mailman argument
as Mailman does.
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