[Exim] another mysql question...

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: robert rotman
Data:  
Para: exim-users
Asunto: [Exim] another mysql question...
hi,

I've a mailserver with no local users.
the goal is that that the user can set up their mail and aliases (+
vacation. +...) themseve in the users domain.

i'm __NOT__ familar with exim beacuse i'm using sendmail on all other
machines.

so i tried this complex and mabye stupid configuration (mainly to learn
more about exim, which WORKS!! but makes in worst case 5 select
statments ):


in the ROUTERS CONFIGURATION i look if the host is local...
-----------------------------------------------------------
lookuphost_mysql:
driver = lookuphost
mysql{select domain from mail_adm where domain='${domain}'}{$value}fail}
self = local
transport = mysql_delivery


and in the DIRECTORS CONFIGURATION i made a loop to see if in the
"mysql_system_aliases" is am mail-address which is not local:
-------------------------------------------------------------

# normal delivery if there is no aliases;
mysql_user:
   driver = smartuser
   condition = ${lookup mysql{select domain from mail where
               domain='${domain}' and username='${local_part}' and
               is_alias='no'}{$value}fail}
   transport = mysql_delivery



# expansion of the aliases ( the alias-filed is somthing like
name1@???, name2@??? )


mysql_system_aliases:
  driver = aliasfile
  file_transport = address_file
  pipe_transport = address_pipe
  search_type = mysql
  query = "select alias from mail where domain='${domain}' and
           username='${local_part}' and is_alias='yes'"
  user = exim



QUESTIONS:
==========

1.)
is there an easier way to do this?

2.)
are the 5 select statements (
select domain from mail_adm where domain='my.host'
select domain from mail where domain='my.host' and
username='an_alias_username' and is_alias='no'
select alias from mail where domain='my.host' and
username='an_alias_username' and is_alias='yes'
select domain from mail_adm where domain='my.host'
select domain from mail where domain='my.host' and
username='a_local_username' and is_alias='no'
)
a potential performance problem...

my testserver contains about 200 domains and 2000 maildrop's.
the plan is about 1000 domains and 10.000 maildrop's.