Skrevet av Emne: Setting up Qmail virtualhosting with multiple recepiants  (Lest 3039 ganger)

ATC

  • Gjest
Setting up Qmail virtualhosting with multiple recepiants
« på: 27. ſeptember 2008, 18:24 pm »
  • [applaud]0
  • [smite]0
  • This article describes how to set up a virtualhost with qmail to distribute mail for that domain to multiple user accounts.



    ATC

    • Gjest
    [Solved] Setting up Qmail virtualhosting with multiple recepiants
    « Svar #1 på: 27. ſeptember 2008, 18:24 pm »
  • [applaud]0
  • [smite]0
  • 1. Add domain to /var/qmail/control/rcpthosts
    2. Add domain:user-domainhandle to /var/qmail/control/virtualdomains, e.g.
    "exampledomain.org:johndoe-example"
    3. "su -" to the admin user for that domain, in this case "johndoe"
    4. Create a ".qmail-default" file pointing to the default recepiant (see below)
    5. Create a ".qmail-domainhandle-recepiant" file for each recepiant:

    * ".qmail-example-johndoe" will control mail for "johndoe@exampledomain.org"
    * ".qmail-example-janedoe" will control mail for "janedoe@exampledomain.org"
    * ".qmail-example-john:doe" will control mail for "john.doe@exampledomain.org"
    * ".qmail-example-default" will control all other mail for exampledomain.org.

    Each file may contain one or more recepients for each .qmail file:

    * "&john" will cause delivery to a local user called "john"
    * "john" will cause delivery to a local user called "john" (i.e the leading ampersand is optional)
    * "john@otherdomain.org" will cause delivery to a remote mail exchange
    * "| /full/path/to/program" will cause execution of that program, which will receive the full email through STDIN
    * "# comment" is a comment (no duh! ;-)
    * "/full/path/to/Maildir/" will cause delivery to a locally stored mail DIRECTORY (The trailing slash is important)
    * "/full/path/to/Mailbox" will cause delivery to a locally stored mailbox

    Finally, reload qmail to activate changes:
    /etc/rc.d/init.d/qmail reload

    For more information about how to write proper .qmail files: "man dot-qmail"