Farzy / cyrus-user-map
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (1)
- Wiki (1)
- Graphs
-
Branch:
master
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Mon Mar 09 07:18:53 -0700 2009 | |
| |
LICENSE | Mon Mar 09 07:18:53 -0700 2009 | |
| |
README.md | Mon Mar 09 10:42:41 -0700 2009 | |
| |
cron/ | Mon Mar 09 07:45:26 -0700 2009 | |
| |
cyrus_create_usermap.rb | Mon Mar 09 10:42:41 -0700 2009 |
Cyrus user map for Postfix
This program creates a Postfix map table listing all valid email Cyrus Imap user accounts available in the Cyrus Imap database.
This script works both with or without Cyrus Imap's Virtual Domain feature.
The map uses the Postfix hash format by default.
USAGE
Execute this script periodically with cron, under the root user. It will create a user map of all the valid Cyrus Imap accounts. There is not need to restart Postfix.
PREREQUISITES
Both Postfix and Cyrus Imap must be running locally.
CONFIGURATION
1) Edit the configuration section of the script:
- Set
USERS_MAPFILEto the map's full path, usually in/etc/postfix. - Set
CYRUS_CMDto Cyrus'ctl_mboxlistcommand's full path (/usr/sbin/ctl_mboxliston Debian Linux). - Set
POSTMAP_CMDto Postfix'spostmapcommand's full path (/usr/sbin/postmapon Debian Linux).
2) Copy the script into the server's PATH.
3) Add or modify the following line in Postfix's /etc/postfix/main.cf:
local_recipient_maps = hash:/etc/postfix/cyrus_usermap $alias_maps
and reload the postfix configuration :
postfix reload
3) Periodically execute the script via cron.
- If you're running a modern cron, like Linux's cron, copy the file
cron/create_cyrus_user_mapto/etc/cron.d. - Otherwise adapt the cron file to you system in order to run the script periodically.
- Don't forget to change the script's path if you're not installing it in
/usr/local/sbin.
4) Enjoy.
BUGS
None known.
And yes, this is really a Ruby script for a sysadmin task, it's not a bug, it's a feature.
AUTHOR
- Copyright (C) 2009 Farzad FARID, Pragmatic Source
Contact me if you have questions to ask or bug reports to make.
REFERENCES
LICENSE
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Please check the LICENSE file for a full copy of the GPL 3 license.
