OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Subject: Virtual local delivery agent
From: Andrew McNamara (andrewmconnect.com.au)
Date: Tue Feb 01 2000 - 19:18:22 CST


I've run out of time to fiddle further at the moment, so I've decided to
post my virtual local delivery agent. Note that this is still a work in
progress, so don't bet your business on it.

I'll repeat what I said last time:

   This code is designed for ISP's who offer virtual mail hosting. It
   looks up the location, uid and gid of user mailboxes via separate maps,
   and the mailbox location map can specify either mailbox or maildir
   delivery (controlled by trailing slash on mailbox name).

   The agent does not support aliases or .forwards (use the virtual table
   instead), and therefore doesn't support file or program aliases. This
   choice was made to simplify and streamline the code (it allowed me to
   dispense with 70% of local's code - mostly the bits that are a security
   headache) - if you need this functionality, this agent isn't for you.

   It also doesn't support writing to a common spool as root and then
   chowning the mailbox to the user - I felt this functionality didn't fit
   with my overall aims.

Some other notes:

- It's still called "virtual" - I had some concerns that this would
  confuse people, but I'll leave that call up to Wietse - if he wants
  to integrate it, he can specify the name.

- I've retained the three separate map lookups at this time. When
  postfix supports maps that return multiple values, we can consider
  changing it then.

- Specify "virtual:" as the target in the transport table for domains
  for which you want this agent used.

- The attached file is a gzipped tar that should be unpacked in the
  base postfix directory (where the INSTALL and HISTORY files live) -
  it adds a "virtual" subdirectory, and a "virtual.patch" file. The
  patch updates the top level Makefile.in to build the new agent, and
  global/mail_params.h to add the new config parameters.

New config options are:

virtual_mailbox_base

    Specifies a path that is prepended to all mailbox paths. This is
    a safety measure to ensure an out of control map doesn't litter the
    filesystem with mailboxes (or worse). While it could be set to "/",
    this isn't recommended.

virtual_mailbox_maps

    Recipients are looked up in this map to determine the path to their
    mailbox. If the returned path ends in a slash ("/"), maildir-style
    delivery is carried out, otherwise the path is assumed to specify a
    mailbox file. Note that virtual_mailbox_base is unconditionally
    prepended to this path.

virtual_minimum_uid

    Specifies a minimum uid that will be accepted as a return from a
    virtual_uid_maps lookup. Returned values less than this will be
    rejected, and the message will be deferred.

virtual_uid_maps

    Recipients are looked up in this map to determine the UID to be
    used when writing to the target mailbox.

virtual_gid_maps

    Recipients are looked up in this map to determine the GID to be
    used when writing to the target mailbox.

virtual_usedotlock

    Use dot-locking when writing to mailboxes - defaults to off.

 ---
Andrew McNamara (System Architect)

connect.com.au Pty Ltd
Lvl 3, 213 Miller St, North Sydney, NSW 2060, Australia
Phone: +61 2 9409 2117, Fax: +61 2 9409 2111