|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Jack Healy (jackh
iol.ie)Date: Wed Apr 11 2001 - 04:11:32 CDT
Devin L. Ganger wrote:
>If you're using a hash, btree, or dbm file, you should not have to
>re-load Postfix; it will notice that the file has changed.
>Also check out the manpage for postmap -- it can be told to add an entry
>to an existing map, so you can call it from a script.
These two factlets on their own have solved my problem! I had overlooked
the second due to my ignorance of the first.
Now, I can easily include calls to postmap into my script to
insert/remove/query the entries in my .db file.
Just in case it's of any interest to anyone, here are the relevant commands,
they just need tweaking for your alias/filename:
(with apologies to the owners of qwerty.com)
Converting an alias pattern to its result
postmap -q newalias
qwerty.com /etc/postfix/qwerty.com.virtual
Removing an alias
postmap -d newalias
qwerty.com /etc/postfix/qwerty.com.virtual
Adding an alias
echo "newalias
qwerty.com jack" | postmap -i
/etc/postfix/qwerty.com.virtual
So, these commands just need to be passed to the OS from the cgi
application.
And, if my understanding is correct, this will even cover the locking
required for
multiple simultaneous updates.
Thanks to everyone for your help!
Jack
-
To unsubscribe, send mail to majordomo
postfix.org with content
(not subject): unsubscribe postfix-users
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]