Creating POP accounts with qmail

Created by phil on Sat, 11 Dec 1999

In this example, I'll assume I want to make a pop account for a client named jimbob whose domain is called who wants to get POP3 mail from with password mypassword.

Preliminary Steps:

  1. Install qmail. There's lots of good documentation for doing this in the distribution.

  2. Read this other documentation about enabling non-system POP3 accounts with qmail. I wrote this document to improve the existing documentation for this procedure, but you may find the old docs interesting still.

  3. Add a system account called popuser. You have to be root to do this under most typical situations.

  4. If your system uses inetd, add the following to /etc/inetd.conf and then KILL -HUP inetd:
      pop-3   stream  tcp     nowait  root     /var/qmail/bin/qmail-popup qmail-popup checkpoppasswd /var/qmail/bin/qmail-pop3d Maildir
    Notice the reference to checkpoppasswd in this line. This should be installed in /bin/checkpoppasswd. You can pick the source for that up here

    If you're using xinetd, you should use this instead (thanks to Nitro for providing this):

      service pop3
              disable         = no
              socket_type     = stream
              protocol        = tcp
              wait            = no
              user            = root
              server          = /var/qmail/bin/qmail-popup
              server_args     = /bin/checkpoppasswd /var/qmail/bin/qmail-pop3d Maildir

Steps for adding POP accounts:

  1. Make the appropriate dir under /home/popuser/popboxes/ like this:
      mkdir /home/popuser/popboxes/
  2. Make him a dir for his .qmail file and his mail:
      mkdir /home/popuser/popboxes/
  3. Make him a Maildir/ (technical qmail word - look it up!):
      mkdir /home/popuser/popboxes/
      mkdir /home/popuser/popboxes/
      mkdir /home/popuser/popboxes/
      mkdir /home/popuser/popboxes/
  4. Make him a .qmail file telling qmail where to put his mail:
    /home/popuser/popboxes/ should contain one line:
  5. Chown everything over to popuser and set permissions:
      chown -R popuser.popuser /home/popuser/popboxes/
      chmod -R 700 /home/popuser/popboxes/
      chmod  600 /home/popuser/popboxes/
  6. Edit /var/qmail/control/virtualdomains to contain this line:
  7. Edit /var/qmail/control/rcpthosts to contain this line:
  8. Edit /var/qmail/users/assign to contain this new line (This line is long and does begin with an "equals" sign)
    (Note: The last line of the assign file should be a dot '.' no quotes)

  9. Run this command as root:
  10. Add a password for the user by adding a line to /var/qmail/users/poppasswd:
    Here's a quick command line perl thingy for making a crypt'd password:
      $ perl -e "print crypt('mypassword', 'Sa')";
    The 'Sa' can be any two chars - it's the salt for the crypt function.

  11. Kill -HUP the qmail-send process (as root).


Pay attention to where I have put / forward slash characters in the files.... For instance, jimbob is not the same as jimbob/ in all case.

Valid HTML 4.0!

Converted to HTML by Bart