Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
howtos:network_services:postfix_dovecot_mysql:database [2015/06/10 15:46 (UTC)]
tim [Creating Mail Database Tables] added commands to actual create the tables shown.
howtos:network_services:postfix_dovecot_mysql:database [2015/06/11 14:42 (UTC)]
tim [Creating Mail Database Tables]
Line 59: Line 59:
   * virtual_users - Contains an entry for each virtual mail box served   * virtual_users - Contains an entry for each virtual mail box served
   * virtual_aliases - Maps aliases (source) to actual mail boxes (destination)   * virtual_aliases - Maps aliases (source) to actual mail boxes (destination)
-to actually ​create these tables, type+to create these tables, type
 <​code>​mysql --user="​mailuser"​ -p -e "​CREATE TABLE virtual_domains( id INT NOT NULL AUTO_INCREMENT,​ name VARCHAR(50) NOT NULL, PRIMARY KEY ( id ) );" mailserver <​code>​mysql --user="​mailuser"​ -p -e "​CREATE TABLE virtual_domains( id INT NOT NULL AUTO_INCREMENT,​ name VARCHAR(50) NOT NULL, PRIMARY KEY ( id ) );" mailserver
  
-mysql --user="​mailuser"​ -p -e "​CREATE TABLE virtual_users( id INT NOT NULL AUTO_INCREMENT,​ domain_id INT NOT NULL references virtual_domains(id), password VARCHAR(106) NOT NULL, email VARCHAR(100) NOT NULL, PRIMARY KEY ( id ) );" mailserver+mysql --user="​mailuser"​ -p -e "​CREATE TABLE virtual_users( id INT NOT NULL AUTO_INCREMENT,​ domain_id INT NOT NULL , password VARCHAR(106) NOT NULL, email VARCHAR(100) NOT NULL, PRIMARY KEY ( id ) ,FOREIGN KEY (domain_id) REFERENCES virtual_domains(id));"​ mailserver
  
-mysql --user="​mailuser"​ -p -e "​CREATE TABLE virtual_aliases( id INT NOT NULL AUTO_INCREMENT,​ domain_id INT NOT NULL references virtual_domains(id), source VARCHAR(100) NOT NULL, destination VARCHAR(100) NOT NULL, PRIMARY KEY ( id ) );" mailserver+mysql --user="​mailuser"​ -p -e "​CREATE TABLE virtual_aliases( id INT NOT NULL AUTO_INCREMENT,​ domain_id INT NOT NULL, source VARCHAR(100) NOT NULL, destination VARCHAR(100) NOT NULL, PRIMARY KEY ( id ),FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) );" mailserver
 </​code>​ each time supplying the password you gave for the mysql mailuser user. </​code>​ each time supplying the password you gave for the mysql mailuser user.
 ==== Adding Domain Entries ==== ==== Adding Domain Entries ====

In Other Languages
QR Code
QR Code howtos:network_services:postfix_dovecot_mysql:database (generated for current page)