Re: [AMaViS-user] clarify: SQL lookups for local domains

This is a discussion on Re: [AMaViS-user] clarify: SQL lookups for local domains within the Amavis User forums, part of the Anti-Spam and Anti-Virus Related Forums category; Jo, > I have asked repeatedly on the list about how to query SQL for > local_domains_maps. To first some ...


Go Back   Usenet Forums > Anti-Spam and Anti-Virus Related Forums > Amavis User

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-30-2008
Mark Martinec
 
Posts: n/a
Default Re: [AMaViS-user] clarify: SQL lookups for local domains

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
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/...fo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:32 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0