OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: forward mail & deliver it locally

From: Magnus Bäck (magnusdsek.lth.se)
Date: Mon Aug 04 2008 - 13:09:44 CDT


On Monday, August 04, 2008 at 15:56 CEST,
     Aaron Bennett <abennettclarku.edu> wrote:

> I need to be able to BOTH forward email and, optionally, deliver it
> locally as well. I think I've gone about this wrong but it's easy to
> change...
>
> Everything is in ldap. I've been using virtual_alias_maps to hold the
> forwarding information. What happens there though is that if it hits
> there it never tries to store the mail locally. What I want is to
> figure out how to get this behavior:
>
> 1. If user has forwarding set, forward the mail
> 2. if user wants local deliver, deliver it locally
>
> These are independent of each other and are easily determined from
> ldap.

Set up an alias on the following form:

userexample.com userexample.com,userexample.net

In your LDAP map configuration this could translate to something like:

query_filter = mail=%s
result_attribute = mail, mailForwardingAddress

Obviously depending on your LDAP schema.

--
Magnus Bäck
magnusdsek.lth.se