2.2.17 Description

The sql statement configures access credentials to SQL database and the queries for authentication and authorization.

GNU Mailutils supports three types of SQL interfaces: MySQL, PostgreSQL and ODBC. The latter is a standard API for using database management systems, which can be used to communicate with a wide variety of DBMS.

Configuration: interface type

Configures type of DBMS interface. Allowed values for type are:

mysql

Interface with a MySQL server (http://www.mysql.org).

odbc

Use ODBC interface. See http://www.unixodbc.org, for a detailed description of ODBC configuration.

postgres

Interface with a PostgreSQL server (http://www.postgres.org).

The database and database access credentials are configured using the following statements:

Configuration: host arg

The host running the SQL server. The value can be either a host name or an IP address in dotted-quad notation, in which case an INET connection is used, or a full pathname to a file, in which case a connection to UNIX socket is used.

Configuration: port arg

TCP port the server is listening on (for INET connections). This parameter is optional. Its default value depends on the type of database being used.

Configuration: db arg;

Name of the database.

Configuration: user arg

SQL user name.

Configuration: passwd arg;

Password to access the database.