Skip to content

dbinfo.8

Manvendra Bhangui edited this page Feb 25, 2024 · 3 revisions

NAME

dbinfo - Dbinfo Structure Administration

SYNOPSYS

dbinfo -i -S MySQL_server -p port -D database -U user -P password [-c] -d domain -m mdahost filename

dbinfo -u -S MySQL_server [-p port -D database -U user -P password] [-c] -d domain -m mdahost filename

dbinfo -r -d domain -m mdahost filename

dbinfo -s [-m mdahost] filename

dbinfo -e

DESCRIPTION

dbinfo(8) is a utility for administering the dbinfo structure maintained in MySQL(1). This structure holds information about all MySQL databases corresponding to all mailstores comprising a clustered domain. A clustered domain allows IndiMail to distribute users in a domain across multiple servers called mailstores. These mailstores can be located anywhere geographically on the network. Each mailstore requires its own local MySQL database to store its local users. The dbinfo structure helps IndiMail to connect to the MySQL database of any given mailstore.

The above five different forms of usage allows you to add, modify, delete and display the dbinfo structure. With the '-e' option, the EDITOR environment variable is used to edit the Mail Cluster Definition file. For reliability, this structure is maintained in MySQL as well as a file defined by the MCDFILE environment variable (defaults to @controldir@/mcdinfo). On updation of the dbinfo structure, the entries in the file is synchronized with the entries in MySQL table dbinfo. In addition to the MySQL table dbinfo, dbinfo(8) also uses the qmail assign file (/var/indimail/users/assign) to find domains not listed in the dbinfo table. Domains not listed in Idbinfo table are assumed to be non-clustered domains. The dbinfo structure for this domains is created automatically using the environment variables MYSQL_HOST, MYSQL_USER, MYSQL_PASSWD, MYSQL_DATABASE, MYSQL_VPORT (If MYSQL_HOST is not defined, the control file mysql.host is used).

The dbinfo structure holds the following parameters

- MySQL Server IP addresses - MySQL TCP/IP port - MySQL database which will contain IndiMail's database. - Username to access the MySQL database - Password for the Username - Domain Name which will be served by the MySQL database - Mail Store IP address. - Optional Cluster flag indicating that the mail setup is part of a mail cluster. A clustered domain is a domain extended across multiple servers. - Filename pointing to the path of the Mail Cluster Definition File.

The option '-s' in dbinfo(8) displays the status of all MySQL servers used by IndiMail, listed in the MCD file. If MCD filename is not given on the command line, the environment variable MCDFILE is used. If environment variable is not set, the static definition of MCDFILE in indimail.h is used. The information displayed is as follows.

OPTIONS

-v
Sets Verbose operation

-i
Insert dbinfo Entry. All dbinfo(8) parameters are mandatory for this operation

-u
Update dbinfo Entry. With this option the MySQL parameters pertaining to a mdahost serving a domain can be modified.

-r
Remove dbinfo Entry

-s
Select dbinfo Entries

-d domain
Domain Name

-c
Sets the Domain for Clustered operation.

-S IP
MySQL Server IP

-p port
MySQL TCP/IP Port

-D database
MySQL Database Name

-U user
MySQL User Name

-P password
MySQL Password

-m mailstoreIP
Mail Store IP

-e
Edit Dbinfo using vi

filename
Name of a file containing MySQL, MDA configuration for IndiMail

RETURN VALUE

0 for success, 1 for any failure.

SEE ALSO

vhostid(8), vsmtp(8), ipchange(8), hostcntrl(8),

Clone this wiki locally