This is a discussion on Re: [AMaViS-user] Amavis + Postfix within the Amavis User forums, part of the Anti-Spam and Anti-Virus Related Forums category; Colin Viebrock wrote: > On 29-Apr-07, at 7:41 AM, mouss wrote: > > >>> Some ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Colin Viebrock wrote:
> On 29-Apr-07, at 7:41 AM, mouss wrote: > > >>> Some of the aliases in the MySQL table are wildcards, yes. >>> >>> I suppose the "right way" to handle this would be to duplicate all >>> the "domain1.tld" aliases as "domain2.tld", instead of wildcards? >>> >>> >> yes. with mysql, you can avoid duplication if you only have "1 >> recursion depth" aliases (or 2. but high recursion depths >> complicate the >> query). make the query return a value only if the target address >> exists. >> > > Actually I just checked, since I'm using PostfixAdmin to manage > theses virtual domain aliases. The table has entries like: > > +---------------------+-------------------+ > | address | goto | > +---------------------+-------------------+ > | @anewpark.org | @anewpark.ca | > | @anewpark.net | @anewpark.ca | > | @anewpark.com | @anewpark.ca | > +---------------------+-------------------+ > > I suppose these would still be considered "wildcards", even though > they don't have asterisks? > yes, they are. and this is horrible because you don't need such things in mysql. the general rule is: if you put structure in your fields, then you misdesigned your tables. alias domains can be implemented with "simple" (not composite) field like this: query = select concat (user, '@', domain) from User, Alias_Domain where user = '%u' and domain = target_domaina and alias_domain = '%d' with a User table that contains {user, domain} fields (you can add more and adjust the query above) and an Alias_Domain table that contains {alias_domain, target_domain} fields. you can of course have a Domain table with many fields if you prefer... ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ 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/ |