doc/FAQ.txt
changeset 2 b3afb9f1e801
parent 0 6f7a81934006
equal deleted inserted replaced
1:30113bfbe723 2:b3afb9f1e801
     1   VMailMgr FAQ
     1    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
     2   Bruce Guenter  <mailto:bruceg@em.ca>, Dan Kuykendall
     2    ? ]
     3   <mailto:dan@kuykendall.org>
     3 
     4   v1.0, 23 April 2000
     4    Copyright (C) 1998 Bruce Guenter
     5 
     5 
     6   VMailMgr Frequently Asked Questions.
     6    VMailMgr Frequently Asked Questions.
     7   ______________________________________________________________________
     7 
     8 
     8                           1. Building and Installing
     9   Table of Contents
     9      _________________________________________________________________
    10 
    10 
    11 
    11    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
    12   1. Building and Installing
    12    ? ]
    13 
    13 
    14      1.1 What compiler and libraries do I need to build vmailmgr?
    14 1.1 What compiler and libraries do I need to build vmailmgr?
    15      1.2 Does vmailmgr work with shadow passwords?
    15 
    16      1.3 Does vmailmgr support IMAP?
    16    You will need a working C and C++ compiler and linker. You will not
    17 
    17    need any C++ libraries. The package is being developed under Linux
    18   2. Setup and Configuration
    18    using egcs and glibc version 2, and may rely on some gcc/g++
    19 
    19    extensions.
    20      2.1 What other software is needed to run vmailmgr?
    20      _________________________________________________________________
    21      2.2 How do I record the output of vmailmgrd with syslog?
    21 
    22      2.3 How do I record the output of vmailmgrd with multilog?
    22    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
    23      2.4 How do I setup VMmailMgr IMAP support?
    23    ? ]
    24      2.5 Upgrading from Previous Versions
    24 
    25      2.6 How do I configure qmail+patches to use vmailmgr for POP?
    25 1.2 Does vmailmgr work with shadow passwords?
    26      2.7 How do I allow clients to relay SMTP through me?
    26 
    27 
    27    This package should work without changes both with and without shadow
    28   3. Usage
    28    passwords as long as the shadow password libraries are present when
    29 
    29    this package is built. The configure script will detect what method of
    30      3.1 I can only use one IP address. How do I log in as a virtual user?
    30    shadow passwords are being used and the programs will be built
    31      3.2 How do I get all misdirected mail sent to me?
    31    accordingly.
    32 
    32      _________________________________________________________________
    33   4. Troubleshooting
    33 
    34 
    34    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
    35      4.1 Bind error message from vmailmgrd.
    35    ? ]
    36      4.2 Error sending to an alias: qmail-queue exited with an error!
    36 
    37      4.3 Running vmailmgrd fails.
    37 1.3 Does vmailmgr support IMAP?
    38      4.4 POP3 or IMAP logins take 30 seconds or longer.
    38 
    39 
    39    Yes, vmailmgr supports Courier-IMAP. Some minor steps are needed to
    40   5. Miscellaneous
    40    make them work, the steps are in the next section of this file.
    41 
    41      _________________________________________________________________
    42      5.1 How do I get in contact with other users?
    42 
    43      5.2 Are development version of vmailmgr available anywhere?
    43    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
    44      5.3 How does incoming email get handled?
    44    ? ]
    45      5.4 How does outgoing email get handled?
    45 
    46      5.5 What about security of CGI and PHP functions?
    46                           2. Setup and Configuration
    47      5.6 What are the differences between vmailmgr and vpopmail?
    47      _________________________________________________________________
    48 
    48 
    49 
    49    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
    50   ______________________________________________________________________
    50    ? ]
    51 
    51 
    52   11..  BBuuiillddiinngg aanndd IInnssttaalllliinngg
    52 2.1 What other software is needed to run vmailmgr?
    53 
    53 
    54   11..11..  WWhhaatt ccoommppiilleerr aanndd lliibbrraarriieess ddoo II nneeeedd ttoo bbuuiilldd vvmmaaiillmmggrr??
    54    VMailMgr is based around qmail's handling of virtual users, and as
    55 
    55    such requires qmail for its operation. If you wish to use the init
    56   You will need a working C and C++ compiler and linker. You will not
    56    file to start/stop vmailmgrd or are installing the RPM package,
    57   need any C++ libraries.  The package is being developed under Linux
    57    supervise-scripts version 2.2 (or later, available at
    58   using egcs and glibc version 2, and may rely on some gcc/g++
    58    http://untroubled.org/supervise-scripts/) and daemontools 0.60 (or
    59   extensions.
    59    later, available at http://untroubled.org/rpms/daemontools/) packages
    60 
    60    are required. If you need to use the vmailmgrd daemon, you will also
    61   11..22..  DDooeess vvmmaaiillmmggrr wwoorrkk wwiitthh sshhaaddooww ppaasssswwoorrddss??
    61    need the unixserver program, from the ucspi-unix package, available at
    62 
    62    http://untroubled.org/ucspi-unix/.
    63   This package should work without changes both with and without shadow
    63 
    64   passwords as long as the shadow password libraries are present when
    64    If you want to use the autoresponse feature, I recommend the use of my
    65   this package is built. The `configure' script will detect what method
    65    own autoresponder program, qmail-autoresponder available at
    66   of shadow passwords are being used and the programs will be built
    66    http://untroubled.org/qmail-autoresponder/.
    67   accordingly.
    67      _________________________________________________________________
    68 
    68 
    69   11..33..  DDooeess vvmmaaiillmmggrr ssuuppppoorrtt IIMMAAPP??
    69    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
    70 
    70    ? ]
    71   Yes, vmailmgr supports Courier-IMAP.  Some minor steps are needed to
    71 
    72   make them work, the steps are in the next section of this file.
    72 2.2 How do I record the output of vmailmgrd with syslog?
    73 
    73 
    74   22..  SSeettuupp aanndd CCoonnffiigguurraattiioonn
    74    Output from vmailmgrd can be recorded by either splogger (part of
    75 
    75    qmail) or with the logger that comes with several flavours of UNIX. To
    76   22..11..  WWhhaatt ootthheerr ssooffttwwaarree iiss nneeeeddeedd ttoo rruunn vvmmaaiillmmggrr??
    76    use splogger, pipe the output of vmailmgrd into the command `splogger
    77 
    77    vmailmgrd'. This will timestamp each entry and tag them with the word
    78   VMailMgr is based around qmail's handling of virtual users, and as
    78    `vmailmgrd'. By default, splogger logs to facility 2 (mail). To use
    79   such requires qmail for its operation. If you wish to use the `init'
    79    logger, pipe the output of vmailmgrd into the command `logger -t
    80   file to start/stop vmailmgrd or are installing the RPM package,
    80    vmailmgrd -p mail.notice'. See the respective man pages of these two
    81   supervise-scripts version 2.2 (or later, available at
    81    programs for more information.
    82   <http://em.ca/~bruceg/supervise-scripts/>) and daemontools 0.60 (or
    82 
    83   later, available at  <http://em.ca/~bruceg/rpms/daemontools/>)
    83    Note: The use of syslog for logging messages is strongly discouraged
    84   packages are required.  If you need to use the vmailmgrd daemon, you
    84    due to problems with inefficent and buggy implementation of syslog.
    85   will also need the unixserver program, from the ucspi-unix package,
    85      _________________________________________________________________
    86   available at  <http://em.ca/~bruceg/ucspi-unix/>.
    86 
    87 
    87    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
    88   If you want to use the autoresponse feature, I recommend the use of my
    88    ? ]
    89   own autoresponder program, qmail-autoresponder available at
    89 
    90   <http://em.ca/~bruceg/qmail-autoresponder/>.
    90 2.3 How do I record the output of vmailmgrd with multilog?
    91 
    91 
    92   22..22..  HHooww ddoo II rreeccoorrdd tthhee oouuttppuutt ooff vvmmaaiillmmggrrdd wwiitthh ssyysslloogg??
    92    Make a directory into which the output will go, for example
    93 
    93    `/var/log/vmailmgrd'. Pipe the output of vmailmgrd into the command
    94   Output from vmailmgrd can be recorded by either splogger (part of
    94    `multilog t /var/log/vmailmgrd'. See the documentation for multilog
    95   qmail) or with the logger that comes with several flavours of UNIX. To
    95    for more information on how to adjust its output.
    96   use splogger, pipe the output of vmailmgrd into the command `splogger
    96      _________________________________________________________________
    97   vmailmgrd'. This will timestamp each entry and tag them with the word
    97 
    98   `vmailmgrd'. By default, splogger logs to facility 2 (mail). To use
    98    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
    99   logger, pipe the output of vmailmgrd into the comamand `logger -t
    99    ? ]
   100   vmailmgrd -p mail.notice'. See the respective man pages of these two
   100 
   101   programs for more information.
   101 2.4 How do I setup VMmailMgr IMAP support?
   102 
   102 
   103   Note: The use of syslog for logging messages is strongly discouraged
   103    VMailMgr supports Courier-IMAP, but Courier-IMAP does not auto detect
   104   due to problems with inefficent and buggy implementation of syslog.
   104    VMailMgr. This means that some minor work is required for making the
   105 
   105    two work together.
   106   22..33..  HHooww ddoo II rreeccoorrdd tthhee oouuttppuutt ooff vvmmaaiillmmggrrdd wwiitthh mmuullttiilloogg??
   106 
   107 
   107      * You must copy `/usr/local/bin/authvmailmgr' to
   108   Make a directory into which the output will go, for example
   108        `/usr/lib/courier-imap/libexec/authlib/authvmailmgr'.
   109   `/var/log/vmailmgrd'. Pipe the output of vmailmgrd into the command
   109      * Then modify the AUTHMODULES statement in
   110   `multilog t /var/log/vmailmgrd'. See the documentation for multilog
   110        `/usr/lib/courier-imap/etc/imapd.config' and add authvmailmgr as
   111   for more information on how to adjust its output.
   111        the first authentication module.
   112 
   112      _________________________________________________________________
   113   22..44..  HHooww ddoo II sseettuupp VVMMmmaaiillMMggrr IIMMAAPP ssuuppppoorrtt??
   113 
   114 
   114    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
   115   VMailMgr supports Courier-IMAP, but Courier-IMAP does not auto detect
   115    ? ]
   116   VMailMgr.  This means that some minor work is required for making the
   116 
   117   two work together.
   117 2.5 Upgrading from Previous Versions
   118 
   118 
   119   +o  You must copy `/usr/local/bin/authvmailmgr` to `/usr/lib/courier-
   119    If you are upgrading from an older version, you may need to make some
   120      imap/libexec/authlib/authvmailmgr`.
   120    changes to your system before or after doing the upgrade. The
   121 
   121    following table outlines the necessary changes. Note that you need to
   122   +o  Then modify the `AUTHMODULES` statement in `/usr/lib/courier-
   122    follow the instructions for all later versions of the software.
   123      imap/etc/imapd.config` and add `authvmailmgr` as the first
   123      _________________________________________________________________
   124      authentication module.
   124 
   125 
   125    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
   126   22..55..  UUppggrraaddiinngg ffrroomm PPrreevviioouuss VVeerrssiioonnss
   126    ? ]
   127 
   127 
   128   If you are upgrading from an older version, you may need to make some
   128   2.5.1 Upgrading from version 0.96.6 or earlier
   129   changes to your system before or after doing the upgrade. The
   129 
   130   following table outlines the necessary changes. Note that you need to
   130    The vmailmgrd daemon needs to be run by unixserver, as opposed to
   131   follow the instructions for all later versions of the software.
   131    being a stand-alone program previously.
   132 
   132      _________________________________________________________________
   133   If you are upgrading from version:
   133 
   134 
   134    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
   135      00..9966..66 oorr eeaarrlliieerr
   135    ? ]
   136         The `vmailmgrd' daemon needs to be run by unixserver, as opposed
   136 
   137         to being a stand-alone program previously.
   137   2.5.2 Upgrading from version 0.96.2 or earlier
   138 
   138 
   139      00..9966..22 oorr eeaarrlliieerr
   139    Make sure the vmailmgrd daemon and vmailmgr CGIs are disabled before
   140         Make sure the `vmailmgrd' daemon and vmailmgr CGIs are disabled
   140    upgrading, and upgrade them along with the main package. Changes were
   141         before upgrading, and upgrade them along with the main package.
   141    made to the daemon interface that will cause adding users and aliases
   142         Changes were made to the daemon interface that will cause adding
   142    to flake out. As well, the listdomain interface was completely redone.
   143         users and aliases to flake out. As well, the listdomain
   143      _________________________________________________________________
   144         interface was completely redone.
   144 
   145 
   145    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
   146 
   146    ? ]
   147      00..9944 oorr eeaarrlliieerr,, uussiinngg tthhee PPOOPP bbuulllleettiinn ffaacciilliittyy
   147 
   148         The POP bulletin facility has been moved into a stand-alone
   148   2.5.3 Upgrading from version 0.94 or earlier, using the POP bulletin facility
   149         program that needs to be executed through `checkvpw-postsetuid'.
   149 
   150 
   150    The POP bulletin facility has been moved into a stand-alone program
   151 
   151    that needs to be executed through checkvpw-postsetuid.
   152      00..9933 oorr eeaarrlliieerr
   152      _________________________________________________________________
   153         If you do not use the CGIs, you no longer need to run the
   153 
   154         `vmailmgrd' daemon.
   154    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
   155 
   155    ? ]
   156 
   156 
   157      00..9922..22 oorr eeaarrlliieerr
   157   2.5.4 Upgrading from version 0.93 or earlier
   158         The configuration changed from reading a single file to reading
   158 
   159         a set of files in a directory. Read the configuration
   159    If you do not use the CGIs, you no longer need to run the vmailmgrd
   160         documentation and run the program `vconf2dir'.
   160    daemon.
   161 
   161      _________________________________________________________________
   162 
   162 
   163      00..9900..22 oorr eeaarrlliieerr
   163    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
   164         The name of the user to which mail to an unknown user is
   164    ? ]
   165         delivered changed from `*' to `+'. If you were using this
   165 
   166         feature, either change all your domains to accomodate this
   166   2.5.5 Upgrading from version 0.92.2 or earlier
   167         change, or set the `default-username' config file to contain
   167 
   168         `*'.
   168    The configuration changed from reading a single file to reading a set
   169 
   169    of files in a directory. Read the configuration documentation and run
   170 
   170    the program vconf2dir.
   171      00..8888 oorr eeaarrlliieerr
   171      _________________________________________________________________
   172         The file format of the virtual password tables has changed from
   172 
   173         plain text files to CDB tables. You will need to suspend local
   173    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
   174         deliveries before upgrading, and run the program `vpasswd2cdb'
   174    ? ]
   175         as each base user after upgrading, before re-enabling local
   175 
   176         deliveries.
   176   2.5.6 Upgrading from version 0.90.2 or earlier
   177 
   177 
   178   22..66..  HHooww ddoo II ccoonnffiigguurree qqmmaaiill++ppaattcchheess ttoo uussee vvmmaaiillmmggrr ffoorr PPOOPP??
   178    The name of the user to which mail to an unknown user is delivered
   179 
   179    changed from `*' to `+'. If you were using this feature, either change
   180   Put the string `checkvpw' into the file
   180    all your domains to accomodate this change, or set the
   181   `/etc/qmail/control/checkpassword' and restart pop3d by typing
   181    `default-username' config file to contain `*'.
   182   `/etc/rc.d/init.d/pop3d restart'.
   182      _________________________________________________________________
   183 
   183 
   184   22..77..  HHooww ddoo II aallllooww cclliieennttss ttoo rreellaayy SSMMTTPP tthhrroouugghh mmee??
   184    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
   185 
   185    ? ]
   186   Download and install relay-ctrl from  <http://em.ca/~bruceg/relay-
   186 
   187   ctrl/>.  It works with vmailmgr, for both POP3 and IMAP clients.
   187   2.5.7 Upgrading from version 0.88 or earlier
   188 
   188 
   189   33..  UUssaaggee
   189    The file format of the virtual password tables has changed from plain
   190 
   190    text files to CDB tables. You will need to suspend local deliveries
   191   33..11..  II ccaann oonnllyy uussee oonnee IIPP aaddddrreessss.. HHooww ddoo II lloogg iinn aass aa vviirrttuuaall
   191    before upgrading, and run the program vpasswd2cdb as each base user
   192   uusseerr??
   192    after upgrading, before re-enabling local deliveries.
   193 
   193      _________________________________________________________________
   194   There are two ways to log in without using multiple IP addresses.
   194 
   195 
   195    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
   196   The first way is to log in as `userSEPvirtual.domain.org', where
   196    ? ]
   197   `user' is the mailbox name of the virtual user, SEP is one of `@' or
   197 
   198   `:' (by default, this is configurable in the `/etc/vmailmgr/'
   198 2.6 How do I configure qmail+patches to use vmailmgr for POP?
   199   directory), and `virtual.domain.org' is the virtual domain's name, as
   199 
   200   listed in `/var/qmail/control/virtualdomains'.
   200    Put the string checkvpw into the file
   201 
   201    `/etc/qmail/control/checkpassword' and restart qmail-pop3d by typing
   202   The second way is to use the internal form of the mailbox name -- that
   202    `/etc/rc.d/init.d/pop3d restart'.
   203   is, `baseuser-user', where `user' is the same as above, and `baseuser'
   203      _________________________________________________________________
   204   is the username of the managing user.
   204 
   205 
   205    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
   206   Example: `/var/qmail/control/virtualdomains' contains
   206    ? ]
   207 
   207 
   208     testdomain.org:testuser
   208 2.7 How do I allow clients to relay SMTP through me?
   209 
   209 
   210 
   210    Download and install relay-ctrl from
   211   User `testuser' exists, and has set up a virtual mailbox with the name
   211    http://untroubled.org/relay-ctrl/. It works with vmailmgr, for both
   212   `v'. The `separators' variable in `/etc/vmailmgr/' contains `@:'. This
   212    POP3 and IMAP clients.
   213   virtual user could log in as `v@testdomain.org', `v:testdomain.org',
   213      _________________________________________________________________
   214   or `testuser-v'.
   214 
   215 
   215    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
   216 
   216    ? ]
   217 
   217 
   218   33..22..  HHooww ddoo II ggeett aallll mmiissddiirreecctteedd mmaaiill sseenntt ttoo mmee??
   218                                    3. Usage
   219 
   219      _________________________________________________________________
   220   In the `vmailmgr/' configuration directory, there is an entry called
   220 
   221   `default-username'. If mail to a virtual domain does not match any
   221    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
   222   users or aliases in that domain, it is delivered to the name listed in
   222    ? ]
   223   this configuration item if it exists (which defaults to `+'). To make
   223 
   224   this deliver to you, simply type:
   224 3.1 I can only use one IP address. How do I log in as a virtual user?
   225 
   225 
   226     vaddalias + me
   226    There are two ways to log in without using multiple IP addresses.
   227 
   227 
   228 
   228      * The first way is to log in as `userSEPvirtual.domain.org', where
   229 
   229        `user' is the mailbox name of the virtual user, SEP is one of `@'
   230   44..  TTrroouubblleesshhoooottiinngg
   230        or `:' (by default, this is configurable in the `/etc/vmailmgr/'
   231 
   231        directory), and `virtual.domain.org' is the virtual domain's name,
   232   44..11..  BBiinndd eerrrroorr mmeessssaaggee ffrroomm vvmmaaiillmmggrrdd..
   232        as listed in `/var/qmail/control/virtualdomains'.
   233 
   233      * The second way is to use the internal form of the mailbox name --
   234   If vmailmgrd reports `vmailmgrd: bind: no such file or directory' when
   234        that is, `baseuser-user', where `user' is the same as above, and
   235   you start it up, it means that can't create its socket file.  By
   235        `baseuser' is the username of the managing user.
   236   default, it will try to create the socket file `/tmp/.vmailmgrd'. You
   236        For example, `/var/qmail/control/virtualdomains' contains
   237   must ensure that `/tmp' is writable, or that the socket is created in
   237        `testdomain.org:testuser', user `testuser' exists, and has set up
   238   some other place by setting `socket-file' in the configuration.
   238        a virtual mailbox with the name `v'. The separators variable in
   239 
   239        `/etc/vmailmgr/' contains `@:'. This virtual user could log in as
   240   44..22..  EErrrroorr sseennddiinngg ttoo aann aalliiaass:: qqmmaaiill--qquueeuuee eexxiitteedd wwiitthh aann eerrrroorr!!
   240        `v@testdomain.org', `v:testdomain.org', or `testuser-v'.
   241 
   241      _________________________________________________________________
   242   If qmail reports "deferral: vdeliver: qmail-queue exited with an
   242 
   243   error!", check where your qmail is installed.  On Debian systems, you
   243    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
   244   will need to type "ls -s /usr/sbin /var/qmail/bin", since they've
   244    ? ]
   245   installed the qmail binaries into /usr/sbin.
   245 
   246 
   246 3.2 How do I get all misdirected mail sent to me?
   247   44..33..  RRuunnnniinngg vvmmaaiillmmggrrdd ffaaiillss..
   247 
   248 
   248    In the `vmailmgr/' configuration directory, there is an entry called
   249   When run by itself, vmailmgrd will report "Timed out waiting for
   249    `default-username'. If mail to a virtual domain does not match any
   250   remote".  vmailmgrd needs to be run from unixserver, part of the
   250    users or aliases in that domain, it is delivered to the name listed in
   251   ucspi-unix package available at  <http://em.ca/~bruceg/ucspi-unix/>.
   251    this configuration item if it exists (which defaults to `+'). To make
   252 
   252    this deliver to you, simply type:
   253   44..44..  PPOOPP33 oorr IIMMAAPP llooggiinnss ttaakkee 3300 sseeccoonnddss oorr lloonnggeerr..
   253 
   254 
   254 
   255   This is almost certainly a DNS lookup problem.  Make sure that DNS
   255 vaddalias + me
   256   lookups aren't timing out, that lookups on all your IP addresses
   256      _________________________________________________________________
   257   aren't failing, and that you can lookup remote addresses as well.
   257 
   258 
   258    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
   259   If you are using 'tcpserver' for the head end to qmail-pop3d, then you
   259    ? ]
   260   may want to the following 2 switches to the command line: -R and -H.
   260 
   261   The former prevents tcpserver from attempting to obtain TCPREMOTEINFO
   261 3.3 How can I put system accounts in a virtual domain?
   262   from the remote host.  This eliminates an "ident" lookup that may be
   262 
   263   being blocked or silently dropped by a firewall.  The latter prevents
   263    System accounts are those listed in `/etc/password' (or
   264   tcpserver from doing a DNS lookup on the remote IP.
   264    `/var/qmail/users/cdb'). The system accounts are accessable, either
   265   55..  MMiisscceellllaanneeoouuss
   265    though SMTP or POP3 or IMAP, as `name@DOMAIN', where DOMAIN is listed
   266 
   266    in `/var/qmail/control/locals'.
   267   55..11..  HHooww ddoo II ggeett iinn ccoonnttaacctt wwiitthh ootthheerr uusseerrss??
   267 
   268 
   268    Virtual accounts exist only as an artifact of vmailmgr management.
   269   There is a mailing list run by the author. To subscribe, send an e-
   269    They are accessable as `name@DOMAIN', where DOMAIN is listed in
   270   mail (content and subject line is ignored) to  <mailto:vmailmgr-
   270    `/var/qmail/control/virtualdomains'.
   271   subscribe@lists.em.ca>.
   271 
   272 
   272    You cannot mix accounts within a domain between system and virtual
   273   Remember that if you have a problem that you want us to diagnose, we
   273    domains. If the domain is in `control/locals', all accounts for that
   274   need to know the following important details:
   274    domain must be system accounts. If it is in `control/virtualdomains',
   275 
   275    all accounts for that domain must be virtual accounts. Also,
   276   1. The output of `qmail-showctl`
   276    `control/locals' overrides `control/virtualdomains': if the domain is
   277 
   277    in `locals', `virtualdomains' is ignored.
   278   2. The contents of the vmailmgrd log for the attempt you are trying to
   278 
   279      diagnose
   279    As an aside, if the domain is neither in `locals' nor in
   280 
   280    `virtualdomains', qmail will reject incoming messages, and vmailmgr
   281   3. The contents of the qmail and smtpd logs for a failed delivery
   281    will treat it as local.
   282      attempt
   282      _________________________________________________________________
   283 
   283 
   284   4. The contents of the pop3d logs for a failed login attempt
   284    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
   285 
   285    ? ]
   286   5. The complete command line with which vmailmgrd and qmail-pop3d was
   286 
   287      invoked
   287                               4. Troubleshooting
   288 
   288      _________________________________________________________________
   289      Please do not contact the author directly with vmailmgr questions.
   289 
   290 
   290    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
   291   55..22..  AArree ddeevveellooppmmeenntt vveerrssiioonn ooff vvmmaaiillmmggrr aavvaaiillaabbllee aannyywwhheerree??
   291    ? ]
   292 
   292 
   293   Yes, they are available through anonymous CVS.  To access the CVS
   293 4.1 Bind error message from vmailmgrd.
   294   server, set your CVSROOT to :pserver:cvs@bruce-
   294 
   295   guenter.dyndns.org:/CVS, log in with an empty password, and check out
   295    If vmailmgrd reports
   296   the vmailmgr module.
   296 
   297 
   297      vmailmgrd: bind: no such file or directory
   298   55..33..  HHooww ddooeess iinnccoommiinngg eemmaaiill ggeett hhaannddlleedd??
   298 
   299 
   299    when you start it up, it means that can't create its socket file. By
   300   Incoming email is first received by the qmail SMTP daemon and inserted
   300    default, it will try to create the socket file `/tmp/.vmailmgrd'. You
   301   into the qmail queue. Then `qmail-send' examines the email envelope
   301    must ensure that `/tmp/' is writable, or that the socket is created in
   302   (which details the recipient address or addresses) to determine how to
   302    some other place by setting socket-file in the configuration.
   303   dispatch the message. It looks up the domain name of each recipient in
   303      _________________________________________________________________
   304   `/var/qmail/control/virtualdomains', and prefixes the user name with
   304 
   305   the string that it finds. It then looks up the resulting user name in
   305    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
   306   the system password table (or in `/var/qmail/users/cdb' if it exists)
   306    ? ]
   307   to find the base user name and home directory (which I will call
   307 
   308   `$HOME'). It then looks for the file `$HOME/.qmail-VIRTUAL'. If that's
   308 4.2 Error sending to an alias: qmail-queue exited with an error!
   309   not found, it looks for the file `$HOME/.qmail-default', which will
   309 
   310   contain an instruction to pipe the message to `vdeliver'.
   310    If qmail reports
   311 
   311 
   312   This is where vmailmgr first enters the picture. The virtual user name
   312      deferral: vdeliver: qmail-queue exited with an error!
   313   is sent to `vdeliver' through environment variables. It looks in the
   313 
   314   configuration files (in `$HOME/.vmailmgr' and then in `/etc/vmailmgr')
   314    check where your qmail is installed. On Debian systems, you will need
   315   to determine the location of the password table, and looks up the
   315    to type `ls -s /usr/sbin /var/qmail/bin', since they've installed the
   316   virtual user name in the table to determine delivery instructions. If
   316    qmail binaries into `/usr/sbin'.
   317   the name is not found, the message is bounced and delivery ends.
   317      _________________________________________________________________
   318   Otherwise, it then looks for the `vdeliver-predeliver' script in the
   318 
   319   configuration directories (in reverse order) and executes any that are
   319    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
   320   found. It then delivers the message to all the listed destinations --
   320    ? ]
   321   an optional mailbox directory and zero or more forwarding addresses.
   321 
   322   Finally, it looks for the `vdeliver-postdeliver' script and executes
   322 4.3 Running vmailmgrd fails.
   323   any that are found.
   323 
   324 
   324    When run by itself, vmailmgrd will report
   325   55..44..  HHooww ddooeess oouuttggooiinngg eemmaaiill ggeett hhaannddlleedd??
   325 
   326 
   326      Timed out waiting for remote
   327   Outgoing email is not handled by vmailmgr. For details on outgoing
   327 
   328   email handling, check the qmail documentation.
   328    vmailmgrd needs to be run from unixserver, part of the ucspi-unix
   329 
   329    package available at http://untroubled.org/ucspi-unix/.
   330 
   330      _________________________________________________________________
   331   55..55..  WWhhaatt aabboouutt sseeccuurriittyy ooff CCGGII aanndd PPHHPP ffuunnccttiioonnss??
   331 
   332 
   332    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
   333   The socket used by the daemon is a UNIX-domain socket (as opposed to
   333    ? ]
   334   Internet-domain), meaning you need local access on the computer to
   334 
   335   open up a connection.  The path for this socket is run-time
   335 4.4 POP3 or IMAP logins take 30 seconds or longer.
   336   configurable.
   336 
   337 
   337    This is almost certainly a DNS lookup problem. Make sure that DNS
   338   The daemon forks a new connection for each connection, up to a
   338    lookups aren't timing out, that lookups on all your IP addresses
   339   configurable maximum (at which point it stops listening, IIRC, I
   339    aren't failing, and that you can lookup remote addresses as well.
   340   should verify this).  The idea of threading has been completely
   340 
   341   discarded to avoid a bug in a command creeping in and makeing the
   341    If you are using tcpserver for the head end to qmail-pop3d, then you
   342   whole server break.
   342    may want to add the following 2 switches to the command line: `-R' and
   343 
   343    `-H'. The former prevents tcpserver from attempting to obtain
   344   The protocol spoken over the socket is explicitly bounded to at most
   344    TCPREMOTEINFO from the remote host. This eliminates an ident lookup
   345   64kB of data, and all data is prefixed by a size.  Static-sized
   345    that may be being blocked or silently dropped by a firewall. The
   346   buffers are only used with static-sized reads, and therefore can't be
   346    latter prevents tcpserver from doing a DNS lookup on the remote IP.
   347   overflowed with stack-smashing tricks.
   347      _________________________________________________________________
   348 
   348 
   349   The daemon commands setuid to the appropriate user as soon as the base
   349    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
   350   user has been verified, to avoid doing any more than necessary as
   350    ? ]
   351   root, as well as to avoid the possibility of tricking the daemon into
   351 
   352   reading a file another user wouldn't normally have access to.
   352                                5. Miscellaneous
   353 
   353      _________________________________________________________________
   354   To help avoid DoS on the local computer, a 1-second alarm is set as
   354 
   355   soon as the connection is received, and is only cleared once all the
   355    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
   356   data has been read.  If it takes longer than 1 second to read the data
   356    ? ]
   357   from the socket, the server process exits.
   357 
   358 
   358 5.1 How do I get in contact with other users?
   359   55..66..  WWhhaatt aarree tthhee ddiiffffeerreenncceess bbeettwweeeenn vvmmaaiillmmggrr aanndd vvppooppmmaaiill??
   359 
   360 
   360    There is a mailing list run by the author. To subscribe, send an
   361   The primary difference between vmailmgr and vpopmail is the use of
   361    e-mail (content and subject line is ignored) to
   362   base users.  With vmailmgr there is one base user for each virtual
   362    vmailmgr-subscribe@lists.untroubled.org.
   363   domain.  With vpopmail, there is one base user for the entire virtual
   363 
   364   domain system.
   364    Remember that if you have a problem that you want us to diagnose, we
   365 
   365    need to know the following important details:
   366 
   366     1. The output of qmail-showctl
   367 
   367     2. The contents of the vmailmgrd log for the attempt you are trying
   368 
   368        to diagnose
   369 
   369     3. The contents of the qmail and smtpd logs for a failed delivery
   370 
   370        attempt
   371 
   371     4. The contents of the pop3d logs for a failed login attempt
   372 
   372     5. The complete command line with which vmailmgrd and qmail-pop3d was
   373 
   373        invoked
   374 
   374 
   375 
   375    Please do not contact the author directly with vmailmgr questions.
   376 
   376      _________________________________________________________________
   377 
   377 
   378 
   378    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
   379 
   379    ? ]
   380 
   380 
   381 
   381 5.2 Are development version of vmailmgr available anywhere?
   382 
   382 
   383 
   383    Yes, they are available through anonymous CVS. To access the CVS
   384 
   384    server, set your CVSROOT to
   385 
   385    :pserver:cvs@bruce-guenter.dyndns.org:/CVS, log in with an empty
   386 
   386    password, and check out the vmailmgr module.
   387 
   387      _________________________________________________________________
   388 
   388 
   389 
   389    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
   390 
   390    ? ]
   391 
   391 
   392 
   392 5.3 How does incoming email get handled?
   393 
   393 
   394 
   394    Incoming email is first received by the qmail SMTP daemon and inserted
   395 
   395    into the qmail queue. Then qmail-send examines the email envelope
   396 
   396    (which details the recipient address or addresses) to determine how to
       
   397    dispatch the message. It looks up the domain name of each recipient in
       
   398    `/var/qmail/control/virtualdomains', and prefixes the user name with
       
   399    the string that it finds. It then looks up the resulting user name in
       
   400    the system password table (or in `/var/qmail/users/cdb' if it exists)
       
   401    to find the base user name and home directory (which I will call
       
   402    $HOME). It then looks for the file `$HOME/.qmail-VIRTUAL'. If that's
       
   403    not found, it looks for the file `$HOME/.qmail-default', which will
       
   404    contain an instruction to pipe the message to vdeliver.
       
   405 
       
   406    This is where vmailmgr first enters the picture. The virtual user name
       
   407    is sent to vdeliver through environment variables. It looks in the
       
   408    configuration files (in `$HOME/.vmailmgr' and then in `/etc/vmailmgr')
       
   409    to determine the location of the password table, and looks up the
       
   410    virtual user name in the table to determine delivery instructions. If
       
   411    the name is not found, the message is bounced and delivery ends.
       
   412    Otherwise, it then looks for the vdeliver-predeliver script in the
       
   413    configuration directories (in reverse order) and executes any that are
       
   414    found. It then delivers the message to all the listed destinations --
       
   415    an optional mailbox directory and zero or more forwarding addresses.
       
   416    Finally, it looks for the vdeliver-postdeliver script and executes any
       
   417    that are found.
       
   418      _________________________________________________________________
       
   419 
       
   420    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
       
   421    ? ]
       
   422 
       
   423 5.4 How does outgoing email get handled?
       
   424 
       
   425    Outgoing email is not handled by vmailmgr. For details on outgoing
       
   426    email handling, check the qmail documentation.
       
   427      _________________________________________________________________
       
   428 
       
   429    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
       
   430    ? ]
       
   431 
       
   432 5.5 What about security of CGI and PHP functions?
       
   433 
       
   434    The socket used by the daemon is a UNIX-domain socket (as opposed to
       
   435    Internet-domain), meaning you need local access on the computer to
       
   436    open up a connection. The path for this socket is run-time
       
   437    configurable.
       
   438 
       
   439    The daemon forks a new connection for each connection, up to a
       
   440    configurable maximum (at which point it stops listening, IIRC, I
       
   441    should verify this). The idea of threading has been completely
       
   442    discarded to avoid a bug in a command creeping in and making the whole
       
   443    server break.
       
   444 
       
   445    The protocol spoken over the socket is explicitly bounded to at most
       
   446    64kB of data, and all data is prefixed by a size. Static-sized buffers
       
   447    are only used with static-sized reads, and therefore can't be
       
   448    overflowed with stack-smashing tricks.
       
   449 
       
   450    The daemon commands setuid to the appropriate user as soon as the base
       
   451    user has been verified, to avoid doing any more than necessary as
       
   452    root, as well as to avoid the possibility of tricking the daemon into
       
   453    reading a file another user wouldn't normally have access to.
       
   454 
       
   455    To help avoid DoS on the local computer, a 1-second alarm is set as
       
   456    soon as the connection is received, and is only cleared once all the
       
   457    data has been read. If it takes longer than 1 second to read the data
       
   458    from the socket, the server process exits.
       
   459      _________________________________________________________________
       
   460 
       
   461    [ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [
       
   462    ? ]
       
   463 
       
   464 5.6 What are the differences between vmailmgr and vpopmail?
       
   465 
       
   466    The primary difference between vmailmgr and vpopmail is the use of
       
   467    base users. With vmailmgr there is one base user for each virtual
       
   468    domain. With vpopmail, there is one base user for the entire virtual
       
   469    domain system.
       
   470      _________________________________________________________________
       
   471 
       
   472    [Top] [Contents] [Index] [ ? ]
       
   473 
       
   474                                Table of Contents
       
   475 
       
   476    1. Building and Installing
       
   477 
       
   478    1.1 What compiler and libraries do I need to build vmailmgr?
       
   479        1.2 Does vmailmgr work with shadow passwords?
       
   480        1.3 Does vmailmgr support IMAP?
       
   481 
       
   482    2. Setup and Configuration
       
   483    2.1 What other software is needed to run vmailmgr?
       
   484        2.2 How do I record the output of vmailmgrd with syslog?
       
   485        2.3 How do I record the output of vmailmgrd with multilog?
       
   486        2.4 How do I setup VMmailMgr IMAP support?
       
   487        2.5 Upgrading from Previous Versions
       
   488 
       
   489    2.5.1 Upgrading from version 0.96.6 or earlier
       
   490        2.5.2 Upgrading from version 0.96.2 or earlier
       
   491        2.5.3 Upgrading from version 0.94 or earlier, using the POP
       
   492        bulletin facility
       
   493        2.5.4 Upgrading from version 0.93 or earlier
       
   494        2.5.5 Upgrading from version 0.92.2 or earlier
       
   495        2.5.6 Upgrading from version 0.90.2 or earlier
       
   496        2.5.7 Upgrading from version 0.88 or earlier
       
   497 
       
   498    2.6 How do I configure qmail+patches to use vmailmgr for POP?
       
   499    2.7 How do I allow clients to relay SMTP through me?
       
   500    3. Usage
       
   501    3.1 I can only use one IP address. How do I log in as a virtual user?
       
   502        3.2 How do I get all misdirected mail sent to me?
       
   503        3.3 How can I put system accounts in a virtual domain?
       
   504 
       
   505    4. Troubleshooting
       
   506    4.1 Bind error message from vmailmgrd.
       
   507        4.2 Error sending to an alias: qmail-queue exited with an error!
       
   508        4.3 Running vmailmgrd fails.
       
   509        4.4 POP3 or IMAP logins take 30 seconds or longer.
       
   510 
       
   511    5. Miscellaneous
       
   512    5.1 How do I get in contact with other users?
       
   513        5.2 Are development version of vmailmgr available anywhere?
       
   514        5.3 How does incoming email get handled?
       
   515        5.4 How does outgoing email get handled?
       
   516        5.5 What about security of CGI and PHP functions?
       
   517        5.6 What are the differences between vmailmgr and vpopmail?
       
   518      _________________________________________________________________
       
   519 
       
   520    [Top] [Contents] [Index] [ ? ]
       
   521 
       
   522                             Short Table of Contents
       
   523 
       
   524      1. Building and Installing
       
   525      2. Setup and Configuration
       
   526      3. Usage
       
   527      4. Troubleshooting
       
   528      5. Miscellaneous
       
   529      _________________________________________________________________
       
   530 
       
   531    [Top] [Contents] [Index] [ ? ]
       
   532 
       
   533                               About this document
       
   534 
       
   535    This document was generated by Bruce.Guenter.dyndns.org on December,
       
   536    29 2004 using texi2html
       
   537 
       
   538    The buttons in the navigation panels have the following meaning:
       
   539 
       
   540      Button      Name                    Go to                From 1.2.3 go to
       
   541      [ < ]       Back     previous section in reading order   1.2.2
       
   542      [ > ]      Forward   next section in reading order       1.2.4
       
   543      [ << ]    FastBack   previous or up-and-previous section 1.1
       
   544      [ Up ]       Up      up section                          1.2
       
   545      [ >> ]   FastForward next or up-and-next section         1.3
       
   546      [Top]        Top     cover (top) of document            
       
   547    [Contents]  Contents   table of contents                  
       
   548     [Index]      Index    concept index                      
       
   549      [ ? ]       About    this page                          
       
   550 
       
   551    where the Example assumes that the current position is at
       
   552    Subsubsection One-Two-Three of a document of the following structure:
       
   553      * 1. Section One
       
   554 
       
   555      * 1.1 Subsection One-One
       
   556 
       
   557      * ...
       
   558 
       
   559      1.2 Subsection One-Two
       
   560      * 1.2.1 Subsubsection One-Two-One
       
   561      * 1.2.2 Subsubsection One-Two-Two
       
   562      * 1.2.3 Subsubsection One-Two-Three     <== Current Position
       
   563      * 1.2.4 Subsubsection One-Two-Four
       
   564 
       
   565      1.3 Subsection One-Three
       
   566      * ...
       
   567 
       
   568      1.4 Subsection One-Four
       
   569      _________________________________________________________________
       
   570 
       
   571    This document was generated by Bruce.Guenter.dyndns.org on December,
       
   572    29 2004 using texi2html