The following issue has been RESOLVED.
======================================================================
http://www.dbmail.org/mantis/view.php?id=105
======================================================================
Reported By: MicahS
Assigned To: aaron
======================================================================
Project: DBMail
Issue ID: 105
Category: General
Reproducibility: N/A
Severity: feature
Priority: normal
Status: resolved
Resolution: fixed
Fixed in Version: SVN Trunk
======================================================================
Date Submitted: 19-Oct-04 19:01 CEST
Last Modified: 16-Feb-06 17:39 CET
======================================================================
Summary: Global addresses needed
Description:
DBmail already has domain catchalls, in the form [EMAIL PROTECTED], it would
be really nice to have a global address, in the form [EMAIL PROTECTED] that
would
forward mail to a particular mailbox across all domains.
One perfect example for me, is [EMAIL PROTECTED] This way I don't have to
create a postmaster account for every domain that I accept mail for on the
server. To be RFC compliant, this address is needed, but often gets
rejected because I forget to create it.
======================================================================
----------------------------------------------------------------------
aaron - 02-Nov-04 04:32
----------------------------------------------------------------------
After some discussion on the mailing list, and some looking into PostgreSQL
and Oracle, I don't think that we can do regular expression matching
without lots of funky database-specific SQL. Here's what I propose.
Either:
[EMAIL PROTECTED]
[EMAIL PROTECTED]
or
postmaster@
@domaincatchall
The former allows us to use one query, but requires changing entries that
are already in the database. The latter requires two queries (or two
clauses in the same query), but doesn't require any changes to the
database.
We could put the trailing-@ query into 2.0.x, too, since it handles data
already in the database without any changes.
----------------------------------------------------------------------
MicahS - 02-Nov-04 06:27
----------------------------------------------------------------------
I agree regular expressions are probably out.
Why not add the wildcards in the query with concat? It works in mysql, and
should work fine in pg too. As I mentioned in the maillist, something like
this:
select deliver_to from aliases
where alias = '<address>'
or (substring(alias from 1 for 1) = '@' and concat('%', alias) ==
'<address>')
or (substring(alias from (length(alias)-1) for 1) = '@' and concat(alias,
'%') == '<address>')
That's compatible with both postgresql and mysql and should provide all
proper matches in one query. This also should restrict the wildcards to
only aliases that begin or end with a '@' which would be a good thing.
substring is in it's ANSI sql form, concat is not ANSI, length is ANSI
SQL.
----------------------------------------------------------------------
paul - 27-Dec-04 11:08
----------------------------------------------------------------------
The use-case from the original report can easily be satisfied by proper MTA
configuration.
For postfix add to the access table:
/[EMAIL PROTECTED]/ REDIRECT [EMAIL PROTECTED]
to catch ALL postmaster email for all domains.
----------------------------------------------------------------------
aaron - 16-Feb-06 17:39
----------------------------------------------------------------------
Now in 2.1.SVN:
"postmaster@" will catch postmaster for all domains.
"@thisdomain" will call all mail sent to thisdomain.
Issue History
Date Modified Username Field Change
======================================================================
19-Oct-04 19:01 MicahS New Issue
02-Nov-04 04:32 aaron Note Added: 0000331
02-Nov-04 06:27 MicahS Note Added: 0000337
29-Nov-04 11:34 ilja Status new => feedback
27-Dec-04 11:08 paul Note Added: 0000465
16-Feb-06 17:39 aaron Status feedback => resolved
16-Feb-06 17:39 aaron Fixed in Version => SVN Trunk
16-Feb-06 17:39 aaron Resolution open => fixed
16-Feb-06 17:39 aaron Assigned To => aaron
16-Feb-06 17:39 aaron Note Added: 0001013
======================================================================