Managing Majordomo lists in multiple virtual domains
(known to work with Postfix)
Note: I use md- as a prefix and a domain-specific suffix to ensure that aliases are unique on the system. You may use any prefix and suffix that suits you; just tweak the instructions that follow accordingly.
You will find additional information in the Majordomo FAQ #3.12 (addresses sendmail)
Segregating your domains
You will need a separate majordomo.cf file for each domain. I configure my servers so that each domain has its own subdirectory under the Majordomo directory (/etc/home/majordomo/).I have found that I only need to change $whereami and $listdir. For example:
File | Example configuration |
/etc/home/majordomo/one/majordomo.cf | $whereami = "one.com"; $listdir = "$homedir/one"; |
/etc/home/majordomo/two/majordomo.cf | $whereami = "two.com"; $listdir = "$homedir/two"; |
Majordomo address
Set up the aliases and virtual files so that each domain responds to Majordomo requests
/etc/aliases
majordomo-one: "|/usr/home/majordomo/wrapper majordomo -C /usr/home/majordomo/one/majordomo.cf"majordomo-owner-one: admin-one
majordomo-two: "|/usr/home/majordomo/wrapper majordomo -C /usr/home/majordomo/two/majordomo.cf"
majordomo-owner-two: admin-two
/etc/postfix/virtual
majordomo@one.com majordomo-onemajordomo-owner@one.com majordomo-owner-one
majordomo@two.com majordomo-two
majordomo-owner@two.com majordomo-owner-two
Note: The preceding is necessary because you can only put E-mail addresses in the virtual file.
Individual list configuration
The addresses for each list will appear in the system aliases and virtual address files. (Note: if you use my list administration script, it will take care of all of this for you; well... if youre using Postfix anyway.) If you have a list called list on the domain one.com, the following will be needed:
/etc/aliases
md-list-one: "|/usr/home/majordomo/wrapper resend -C /usr/home/majordomo/one/majordomo.cf \ -l list -h one.com -s md-list-outgoing-one" md-list-outgoing-one: :include:/usr/home/majordomo/one/list md-list-request-one: "|/usr/home/majordomo/wrapper request-answer list \ -C /usr/home/majordomo/one/majordomo.cf"
/etc/postfix/virtual
list@one.com md-list-one list-approval@one.com oneowner list-outgoing@one.com md-list-outgoing-one list-owner@one.com oneowner list-request@one.com md-list-request-one owner-list@one.com oneowner owner-list-outgoing@one.com oneowner owner-list-request@one.com oneowner
Configuring listadmin.pl
If you use my list administration script, you will need to configure it to use multiple virtual domains. For example: Your listadmin.cf file might contain:
############################################################################## # Virtual address processing # If you use virtual addresses (so that list@one.com is not the same as # list@two.com), define the configuration information in this section. # The location of the virtual address file for your system $VIRT = "/etc/postfix/virtual"; # The virtual address file # If the list files for a domain are not in the default $LISTDIR directory. # define the locations here. The domains must be entered using the format # "domain\.com". Separate entries with commas. %VIRT_LIST = ( # Domain Subdirectory of $HOME containing list files # ______ ___________________________________________ # e.g., "domain\.com" => 'domain', "one\.com" => 'one', "two\.com" => 'two' );
Isnt that simple?
If you are not able to get all of that working, feel free to drop me a line at tlewis@exelana.com.Good luck!