List Info

Thread: Re: Amavis + Postfix w/virtual domains creates largequeue of rejected emails




Re: Amavis + Postfix w/virtual domains creates largequeue of rejected emails
country flaguser name
France
2007-04-30 15:41:36
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://sourcefor
ge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
AMaViS-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user

AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )