A BUGNOTE has been added to this bug.
======================================================================
http://www.dbmail.org/mantis/bug_view_advanced_page.php?bug_id=0000105
======================================================================
Reported By: MicahS
Assigned To:
======================================================================
Project: DBMail
Bug ID: 105
Category: General
Reproducibility: N/A
Severity: feature
Priority: normal
Status: feedback
======================================================================
Date Submitted: 19-Oct-04 19:01 CEST
Last Modified: 27-Dec-04 11:08 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 CET
----------------------------------------------------------------------
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 CET
----------------------------------------------------------------------
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 CET
----------------------------------------------------------------------
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.
Bug History
Date Modified Username Field Change
======================================================================
19-Oct-04 19:01MicahS New Bug
02-Nov-04 04:32aaron Bugnote Added: 0000331
02-Nov-04 06:27MicahS Bugnote Added: 0000337
29-Nov-04 11:34ilja Status new => feedback
27-Dec-04 11:08paul Bugnote Added: 0000465
======================================================================