| View previous topic :: View next topic |
| Author |
Message |
mach.82 Tux's lil' helper

Joined: 30 Oct 2003 Posts: 75 Location: 43°N/79°W
|
Posted: Sun Jul 02, 2006 9:19 pm Post subject: Postfix and Mailman Installation with Virtual Domains |
|
|
If you are following the Virtual Mailhosting System with Postfix Guide while installing mailman, there are a few caveats as follows:
(1) You must create a site wide list called mailman without the quotes:
| Code: | # su mailman
# bin/newlist --urlhost=www.virtual_two.com --emailhost=virtual_two.com mailman admin@virtual_two.com password4mailman |
(1.1) Once you have done that your relevant part of /usr/local/mailman/data/virtual-mailman file should look like this:
# STANZA START: mailman
# CREATED: Sun Jul 2 18:34:23 2006
mailman@virtual_two.com mailman
mailman-admin@virtual_two.com mailman-admin
mailman-bounces@virtual_two.com mailman-bounces
mailman-confirm@virtual_two.com mailman-confirm
mailman-join@virtual_two.com mailman-join
mailman-leave@virtual_two.com mailman-leave
mailman-owner@virtual_two.com mailman-owner
mailman-request@virtual_two.com mailman-request
mailman-subscribe@virtual_two.com mailman-subscribe
mailman-unsubscribe@virtual_two.com mailman-unsubscribe
# STANZA END: mailman
(1.2) Your other relevant part of /usr/local/mailman/data/aliases should like this:
# STANZA START: mailman
# CREATED: Sun Jul 2 18:34:23 2006
mailman: "|/usr/local/mailman/mail/mailman post mailman"
mailman-admin: "|/usr/local/mailman/mail/mailman admin mailman"
mailman-bounces: "|/usr/local/mailman/mail/mailman bounces mailman"
mailman-confirm: "|/usr/local/mailman/mail/mailman confirm mailman"
mailman-join: "|/usr/local/mailman/mail/mailman join mailman"
mailman-leave: "|/usr/local/mailman/mail/mailman leave mailman"
mailman-owner: "|/usr/local/mailman/mail/mailman owner mailman"
mailman-request: "|/usr/local/mailman/mail/mailman request mailman"
mailman-subscribe: "|/usr/local/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe: "|/usr/local/mailman/mail/mailman unsubscribe mailman"
# STANZA END: mailman
(1.3) These two are lookup tables for postfix, meaning that postfix would search for the LHS (left hand side) value and expect the corresponding RHS (right hand side) value returned. To test the two tables, you can use the following commands:
| Code: | # postmap q mailman /usr/local/mailman/data/aliases
"|/usr/local/mailman/mail/mailman post mailman"
# postmap q mailman@virtual_two.com /usr/local/mailman/data/virtual-mailman
mailman |
(1.4) If you dont have the above result, you must issue the following commands:
| Code: | # postmap hash:/usr/local/mailman/data/aliases
# postmap hash:/usr/local/mailman/data/virtual-mailman |
(1.5) You should also make sure the ownership and access rights are correct and they should look like this:
| Code: | # ls l /usr/local/mailman/data/aliases*
-rw-rw---- 1 mailman mailman 2039 Jul 2 18:34 aliases
-rw-r----- 1 mailman mailman 12288 Jul 2 18:34 aliases.db
# ls l /usr/local/mailman/data/virtual-mailman*
-rw-rw---- 1 root mailman 1747 Jul 2 17:40 virtual-mailman
-rw-r----- 1 mailman mailman 12288 Jul 2 18:40 virtual-mailman.db |
(2) The most difficult part comes in when all of your domains are virtual. As an example, I am setting up two virtual domains (a) virtual_one.com and (b) virtual_two.com and that both (a) and (b) had been declared virtual. I also have the following parameters in the /etc/main.cf file:
mydomain = virtual_one.com
myhostname = mail.virtual_one.com
mydestination = $myhostname, localhost.$mydomain localhost
(2.1) The problem arises whereby postfix must rewrite the RHS of the virtual addresses in /usr/local/mailman/data/virtual-mailman to a local address and postfix rely on the parameter myorigin (defaults to $myhostname) and if myorigin is not local then you are in trouble. This is a very important point and I will explain further below and emphasis traps to look for.
(2.2) Since $mydomain is virtual and therefore you cannot include $mydomain on the RHS of $mydestination, otherwise you will get an error.
(2.3) If you declare $myorgin then you must $myorgin local by including $myorgin on the RHS of $mydestination like this:
| Code: | | mydestination = $myhostname, localhost.$mydomain localhost $myorgin |
(2.4) Look for a line like this in your /var/log/mail.log file:
postfix/local[19403]: B1F012DDB7: to=<mailman@mail.virtual_one.com>, orig_to=<mailman@virtual_two.com>, relay=local, delay=0, status=sent (delivered to command: /usr/local/mailman/mail/mailman post mailman)
(2.5) Notice that (a) the address had been rewritten from <mailman@virtual_two.com> to <mailman@mail.virtual_one.com>, (b) the relay is now local, and (c) the email had been delivered to the command: /usr/local/mailman/mail/mailman post mailman for processing. |
|
| Back to top |
|
 |
nixnut Administrator


Joined: 09 Apr 2004 Posts: 10460 Location: the dutch mountains
|
Posted: Mon Jul 03, 2006 1:29 pm Post subject: |
|
|
Moved from Installing Gentoo to Networking & Security. _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
talk is cheap. supply exceeds demand |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|