On Mon, Feb 07, 2000 at 05:05:20PM -0600, Mike Borowiec wrote:
> Greetings -
> I'm trying to configure QMail to accept and locally deliver mail (using
> /bin/mail on a Solaris 2.6 machine) for only one specific e-mail address,
> and forward ALL other e-mail messages to the Corporate mail hub.
> 
> I'm sure there is probably an easy way to do this, but I cannot seem to
> get it to work. Can anyone offer any suggestions? Thanks!


Local domains

The definition of a "local" maildomain is that all local users (i.e. default
those in /etc/passwd) has a mailadress on the form <user>@<domain>. This
will NOT be overridden by any virtual domain with the same name.

As soon as one wants to not deliver all mail for a domain locally it's often
much wiser to make it virtual. The alternative is to divert the mail from
within the users home directories (their .qmail-files).

For doing efficient mail hosting that is easy to maintain and debug, it's
always best to have local delivery of mail to the mailhost. I.e. if your
mailhost is called gandalf.foobar.net, then that very host accepts mail for
that local domain. When splitting domain delivery, it's always easiest to
take advantage of that local mailhost domain delivery. 


One local user, the rest to somewhere else
==========================================

  1. Domain handling

  Put the all the domains in /var/qmail/control/rcpthosts like this:

  foobar.net
  gandalf.foobar.net


  2. Put the domain in /var/qmail/control/virtualdomains:

  foobar.net:alias-foobar

  DO NOT domains in locals if you have them in virtualdomains!


  3. Put the HOSTNAME of the mailhost in /var/qmail/control/locals:

  gandalf.foobar.net


  4. Create local delivering alias

  Now all mail to foobar.net is handled by ~alias/.qmail-foobar-*
  which means that you can create a ~alias/.qmail-foobar-joe and put

  &[EMAIL PROTECTED]

  in this file. This will locally deliver joes mail.
  Repeat this step if you have more aliases that should be delivered
  locally.

  5. Create forwarding alias
  
  You want to forward all other mail to the central mailhub. 
  (Let's assume that host is called biffo.foobar.net)

  Then create a ~alias/.qmail-foobar-default that will handle mail to
  ~alias/.qmail-foobar-* where * is a username.

  Put this line into the file:

  |forward "${DEFAULT}@biffo.foobar.net"

  This will forward [EMAIL PROTECTED] to the central mailhub
  [EMAIL PROTECTED]
  
  

/magnus

--
http://x42.com/


  











> - Mike
> -- 
> --------------------------------------------------------------------------
> Michael Borowiec  -  [EMAIL PROTECTED]  - Tellabs Operations, Inc.
> Lead Engineer, Engineering Software Tools         4951 Indiana Ave., MS 57
> 630-512-8019  FAX: 630-512-7010                   Lisle, IL  60532  USA
> --------------------------------------------------------------------------

-- 
http://x42.com/

  \ /  ASCII Ribbon Campaign - Say NO to HTML in email and news       
   x

Reply via email to