/docs/MyDocs

To get this branch, use:
bzr branch http://darksoft.org/webbzr/docs/MyDocs

« back to all changes in this revision

Viewing changes to Administration/Linux/daemons/mail/vmail

  • Committer: Suren A. Chilingaryan
  • Date: 2009-04-09 03:21:08 UTC
  • Revision ID: csa@dside.dyndns.org-20090409032108-w4edamdh4adrgdu3
import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
  33..  SSeettuupp
 
2
 
 
3
  In the following setup examples, it is assumed that your binaries are
 
4
  installed in `/usr/bin`, and configuration is in `/etc/vmailmgr`, as
 
5
  is the case if you installed from the RPMs.  If you installed from
 
6
  source, configure puts the binaries into `/usr/local/bin` and the
 
7
  configuration into `/usr/local/etc/vmailmgr` by default.
 
8
 
 
9
  33..11..  SSeettttiinngg UUpp aa VViirrttuuaall DDoommaaiinn
 
10
 
 
11
  The following steps are necessary to set up a virtual domain with
 
12
  vmailmgr (assuming vmailmgr has been compiled and installed). As an
 
13
  example, we'll set up a virtual user `me@mydomain.org`, with aliases
 
14
  of `myself@mydomain.org` and `myname@mydomain.org`.
 
15
 
 
16
  1. Set up a DNS entry for the domain. This is not covered here, as it
 
17
     is dependant on far too many other things.  I will mention that to
 
18
     make IP based virtual domains work a PTR record which matches an
 
19
     entry in virtualdomains is nessesary, for example, if nslookup
 
20
     10.56.33.122 returns mail.mydomain.com, `virtualdomains` needs an
 
21
     entry like `mail.mydomain.com:myuser' For the example, we'll assume
 
22
     that the mail exchanger for mydomain.org is already set up to point
 
23
     to your computer.
 
24
 
 
25
  2. Set up a base user for the domain. Create a user, with a name of
 
26
     your choosing.  Since the maildirs for all the users in the virtual
 
27
     domain will be stored under this user's home directory, make sure
 
28
     you set the user up in a partition or disk that is appropriate for
 
29
     such storage. The tools that you should use to accomplish this step
 
30
     vary greatly between different systems. For our example, I'll add a
 
31
     user `myuser`.
 
32
 
 
33
  3. Configure qmail to recognize the domain. To do this, you need to
 
34
     modify two of qmail's configuration files in `/var/qmail/control`
 
35
     `rcpthosts` and `virtualdomains`.
 
36
 
 
37
  +o  To `rcpthosts` : add the line `mydomain.org`.
 
38
 
 
39
  +o  To `virtualdomains` : add the line `mydomain.org:myuser`.
 
40
 
 
41
     If you wish to have mail to `anything.mydomain.org` be delivered in
 
42
     the same way, add the following
 
43
 
 
44
  +o  To `rcpthosts` : add the line `.mydomain.org`.
 
45
 
 
46
  +o  To `virtualdomains` : add the line `.mydomain.org:myuser`.
 
47
 
 
48
  4. Configure qmail-popup/qmail-pop3d to use `checkvpw` as the password
 
49
     checker. This step is dependant on how you have installed qmail.
 
50
 
 
51
  +o  Replace `checkpassword` in the command you use to invoke qmail-
 
52
     popup/qmail-pop3d (either in `/etc/inet.conf` or in a `tcpserver`
 
53
     command) with `checkvpw`.
 
54
 
 
55
  +o  And/Or at the prompt type: `echo checkvpw >
 
56
     /var/qmail/control/checkpassword`
 
57
 
 
58
  5. Set up the vmailmgr files:
 
59
 
 
60
  +o  Either change user to the user you just created (for example, type
 
61
     `su - myuser`) or log in (with either telnet or at the console) as
 
62
     the new user.
 
63
 
 
64
  +o  Set up the base vmailmgr files by running `vsetup`.
 
65
 
 
66
  +o  Use the included programs to add users and aliases.  For our
 
67
     example, we would type the following commands:
 
68
 
 
69
       vadduser me
 
70
       vaddalias myself me
 
71
       vaddalias myname me
 
72
 
 
73
 
 
74
 
 
75
  After you have completed all these steps, you will need to kill and
 
76
  restart `qmail-send` to make it read the new `virtualdomains` table.
 
77
 
 
78
  If you are using `inetd` to launch `qmail-popup`, `kill -HUP` the
 
79
  `inetd` process as well.
 
80
 
 
81
  33..44..  VVMMaaiillMMggrr IIMMAAPP ssuuppppoorrtt
 
82
 
 
83
  This way don't work for authdaemon, must be called instead of authdaemon.
 
84
  
 
85
  VMailMgr supports Courier-IMAP, but Courier-IMAP does not come with an
 
86
  authentication module for VMailMgr.  This means that some minor work
 
87
  is required for making the two work together.
 
88
 
 
89
  +o  You must copy `/usr/bin/authvmailmgr` to `/usr/lib/courier-
 
90
     imap/libexec/authlib/authvmailmgr`.
 
91
 
 
92
  +o  Then modify the `AUTHMODULES` statement in `/usr/lib/courier-
 
93
     imap/etc/imapd.config` and add `authvmailmgr` as the first
 
94
     authentication module.
 
95
 
 
96
 
 
97
  And this seems OK
 
98
    
 
99
    userdb "john@example.com" set home=/home/vmail/users/john \
 
100
                                mail=/home/vmail/users/john \
 
101
                                uid=UUU gid=GGG
 
102
    userdbpw | userdb "john@example.com" set imappw
 
103
    makeuserdb
 
104