one mysql database per domain with amavisd-new while having multiple domains

Indunil Jayasooriya indunil75 at gmail.com
Fri Oct 30 08:30:52 CET 2020


Hi,

Thanks a lot for your quick answer.
 Then, in  this case, one admin can see all other domains records.

How can I grant  admin at example.com to view only his own domain records and
admin at client1.com to view only his own domain records?

how can I grant permission? all tables have all hosted domain records.

How can I reach my goal with mysql while having one database?

Can you explain it to me?









On Fri, Oct 30, 2020 at 12:44 PM Damian <amavis at arcsin.de> wrote:

> > I need *one mysql database per domain with amavisd-new while having
> multiple domains*. Is it possible?
> >
> > Let's say i have a domain called *example.com*. I want everything for
> that domain to be stored in mysql database called *db_example*.
> > Now, Let's say I have another domain called *client1.com*.  I want
> everything for that domain to be stored in mysql database
> > called *db_client1*.
> >
> > in  amavisd.conf, Will  these lines reach my goal?
> >
> > @lookup_sql_dsn =  (
> ['DBI:mysql:database=db_example;host=127.0.0.1;port=3306',
> 'admin_db_example', 'secret'],
> >
> ['DBI:mysql:database=db_client1;host=127.0.0.1;port=3306',
> 'admin_db_client1', 'secret']);
> > @storage_sql_dsn = @lookup_sql_dsn;
>
> README.sql says:
>
> > - a list can contain one or more triples: [dsn,user,passw]; more than one
> >   triple may be specified to specify multiple (backup) SQL servers - the
> first
> >   that responds will be used as long as it works, then search is retried
> Additionally @*_sql_dsn are global confvars, so one cannot use different
> values in different policy banks.
>
> So, no.
>


-- 
cat /etc/motd

Thank you
Indunil Jayasooriya
http://www.theravadanet.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.amavis.org/pipermail/amavis-users/attachments/20201030/27ecca49/attachment.htm>


More information about the amavis-users mailing list