[Vmail-discuss] Forwarding mail for all local_parts that don't have a popbox

Paul Warren pdw@xxxxxxxxxxxxx
Tue, 14 Aug 2001 18:14:38 +0100

On Tue, Aug 14, 2001 at 06:06:18PM +0100, Wayne Pascoe wrote:
> I would like to setup vmail-sql to send all mail for all users that
> don't have a local part to a designated user per domain.

What version of vmail are you using?  Version 0.4 supports exactly what
you require, although if you are not using the web front end then there
is no real need to upgrade - all you need is an alteration to exim.conf.
Add the following director, after the other virtual email directors:

  	driver = aliasfile
  	search_type = mysql
	query = "select remote_name from forwarder where local_part = '_default_' and domain_name = '$domain'"
	forbid_file = true
	forbid_pipe = true

This will forward all undelivered email to the alias specified by the
local_part '_default_'.  There was a suggestion that we should switch to
using '*' as the local_part for undefined users, and this will probably
happen in the next release.  The 0.4 web scripts are configured to use
_default_ for undefined users.