-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Edward Roper wrote:
> Thanks for the quick reply. While your proposed
solution would work, I would
> like to avoid having to manage the list delimited
addresses for everyone else.
> My users tend to dream these things up whenever signing
up for some new
> webapp, etc. This would require frequent updating on my
part.
>
> I'm thinking that I could modify the php interface to
support the delimiters
> (strip them when authenticating), thus allowing users
to add the aliases
> themselves, or I could modify the mail-handling portion
of maia to fully
> support recipient delimiters. In terms of the latter,
what functions would I
> need to investigate, or would this be a wider-sweeping
change than would be
> worth it?
Mainly in amavisd-maia you'd want to look at:
maia_recipient_is_local()
maia_get_recipient_id()
maia_autocreate_users()
maia_discard_if_requested()
In general, wherever you see a SQL query like:
SELECT (some column) FROM users WHERE email = ?
you'd need to broaden that WHERE clause to include
delimiters, e.g.
SELECT (some column) FROM users WHERE email = ? OR email
LIKE '%+?'
if the added portion comes before the '+'; if it comes
/after/ the '+'
then you'll need to further separate the user and domain
portions of the
address and pass them as separate parameters, e.g.
SELECT (some column) FROM users WHERE email = ? OR email
LIKE '?+% ?'
Also remember that every '?' is a placeholder that needs to
have a value
supplied for it in the execute() statement.
- --
Robert LeBlanc <rjl renaissoft.com>
Renaissoft, Inc.
Maia Mailguard <http://www.maiamail
guard.com/>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQFGgvRFGmqOER2NHewRAqM6AJwKbapUC37f0j7cMO5WBEs3rUFjQACg
r6bU
MNgWRTvm7lEcx9e8tpNNhB4=
=PO0M
-----END PGP SIGNATURE-----
_______________________________________________
Maia-users mailing list
Maia-users renaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users
|