qmail sql.8 - indimail/indimail-mta GitHub Wiki

NAME

qmail-sql - prepare data in MySQL for qmail-smtpd(8).

SYNOPSIS

qmail-sql [-Sr] [-s dbserver -u user -p pass -d dbname -t table_name] filename

DESCRIPTION

qmail-sql does a chdir to /etc/indimail/control and prepares filename.sql control file to enable qmail-smtpd to access data from MySQL instead of control files. qmail-sql also prepares data in filename to be inserted into table_name in MySQL.

The below command will create a file badmailfrom.sql in /etc/indimail/control and table bmf in MySQL

 qmail-sql -s localhost -u indimail -p ssh-1.5- -d indimail -t bmf badmailfrom

The below command will replace contents of file badmailfrom in /etc/indimail/control into the the table bmf in MySQL.

 qmail-sql -r badmailfrom

The following control files can also be specified in cdb format or be in MySQL

authdomains, badhelo, badext, badmailfrom, badrcptto, blackholedsender, blackholedrcpt, chkrcptdomains, goodrcptto, relaymailfrom, spamignore, and badip.

OPTIONS

-S
Skip creating MySQL table and subsequent inserting of data into MySQL

-r
Replace the content of data in MySQL with the content in filename

-u user
MySQL username. A user which has privilege to create, insert, delete in MySQL database dbname.

-p pass
Password for MySQL user username

-d dbname
Database name in MySQL

-t table_name
Table in MySQL in which data from plain-text control file will be inserted

SEE ALSO

qmail-cdb(8), qmail-smtpd(8), indimail-control(5),

⚠️ **GitHub.com Fallback** ⚠️