Set up your own mail server on Fedora (1)

Source: Internet
Author: User
Tags date end imap key sql mysql domain mysql database

First, the preparation of software

A. Check that your system has the following software installed

1.pam

2.pam-devel

3.mysql

4.mysql-servel

5.mysql-devel

6.imap-devel

7.sharutils

B. Download the following software

1.metamail*.i386.rpm

2.pam-mysql

3.cyrus-sasl-2.1.15

4.postfix-2.0.16

5.courier-imap

C. Description

Mysql-devel on the 3rd disk. I forgot to install, the result pam-mysql and postfix compiles not to have passed. Metamail and sharutils are used for authentication codes.

Second, MySQL database and the establishment of tables

The following are the referenced contents:

A.[root@localhost root]# MySQL

Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 3 to server version:3.23.58
 
Type ' help, ' or ' \h ' for help. Type ' \c ' to clear the buffer.
 
mysql> use MySQL
Reading table information for completion of table and column names
You can turn off the feature to get a quicker startup with-a
 
Database changed
Mysql> INSERT into db (Host,db,user,select_priv) VALUES (' localhost ', ' postfix ', ' postfix ', ' Y ');
Query OK, 1 row Affected (0.00 sec)
 
mysql> CREATE DATABASE postfix;
Query OK, 1 row Affected (0.00 sec)
 
Mysql> GRANT all on postfix.* to Postfix@localhost
-> identified by "Postfix";
Query OK, 0 rows Affected (0.00 sec)
 
mysql> FLUSH privileges;
Query OK, 0 rows Affected (0.00 sec)
 
Mysql> quit
Bye
  

B. Copy the following text as Postfix.sql

####### #potfix_sql ####### #bigin ##################
CREATE TABLE alias (
Username varchar (255) Not NULL default ',
Goto text Not NULL,
Domain varchar (255) Not NULL default ',
PRIMARY KEY (username)
) Type=myisam;
CREATE TABLE Domain (
Domain varchar (255) Not NULL default ',
Description varchar (255) Not NULL default ',
PRIMARY KEY (domain)
) Type=myisam;

CREATE TABLE Mailbox (
UserID char (m) binary not NULL default ',
Username varchar (255) Not NULL default ',
Password varchar (255) Not NULL default ',
Home varchar (255) Not NULL default ',
Maildir varchar (255) Not NULL default ',
Name varchar (255) Not NULL default ',
UID smallint (5) unsigned not NULL default ' 12345 ',
GID smallint (5) unsigned not NULL default ' 12345 ',
Quota varchar (255) Not NULL default ',
Domain varchar (255) Not NULL default ',
Create_date date not NULL default ' 0000-00-00 ',
Create_time time is not NULL default ' 00:00:00 ',
Change_date date not NULL default ' 0000-00-00 ',
Change_time time is not NULL default ' 00:00:00 ',
last_access Int (a) unsigned not NULL default ' 0 ',
passwd_lastchanged Int (a) unsigned not NULL default ' 0 ',
Status tinyint (4) Not NULL default ' 1 ',
PRIMARY KEY (username),
KEY Status (status)
) Type=myisam;
#################### #end ########################

[root@localhost root]# mysql postfix </work/postfix.sql




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.