Jo,

> I have asked repeatedly on the list about how to query SQL for
> local_domains_maps.  To first some answers which didn't seem to relate,
> then resounding silence.
>
> After taking some time to read the code today, I believe I have figured
> out the answer.  Will someone please tell me if I'm right or wrong?
>
> 1. There is no way to query SQL for local_domains

Yes, kind of.  The locality flag is just one of the fields in users table.

> *HOWEVER*
>
> 2. When a recipient lookup is done in SQL, if the local column evaluates
> (is not undefined) then the recipient is considered local.

More exact: if the field evaluates to true, recipient is considered local.
If it evaluates to false, recipient is not considered local.
If the field value is NULL (=undef), the lookup falls back to
static settings.

If there is no field 'local', then a default applies:
a matching 'users' record suffices to consider recipient local,
UNLESS the matching record has '@.' in its users.email field.

> *AND*
>
> 3. A wildcard entry of '@{domain}' will evaluate the entire domain to be
> local (unless you set $sql_lookups_no_at_means_domain in which case drop
> the @ sign)

Yes.

> Therefore, the right answer for hosting environments is to make sure
> that every domain you are receiving mail for exists in the users database.

Exactly.

> Questions:
>
> Is this analysis correct?

Yes.

> Would it be too much trouble to allow a SQL query to populate
> local_domains_maps, just like the hash lookup.

That would require another kind of a SQL lookup mechanism,
not in use for any other setting. Currently I think the
unified SQL lookups mechanism is general enough and suffices
for all present needs.

  Mark

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to