After three installation times, I finally sorted out my own installation documents based on the official website: 1. install the required software. freebsd2.php + mysql3.ExtMan & ndash; & gt; Web account management background 4. courier-imap & ndash; & gt; Courier-IMAP is a program that provides POP3 and IMAP services and can be conveniently configured
After three installation times, I finally sorted out my own installation documents based on the official website:
1. install the software to use
1. freebsd
2. php + mysql
3. ExtMan-> Web account management background
4. courier-imap-> Courier-IMAP is a program that provides POP3 and IMAP services. it can be easily configured to support encryption protocols POP3s and IMAPs.
5. Postfix-> MTA is very important in the mail system. it is responsible for receiving emails from other people and forwarding your emails to your destination.
6. Maildrop-> MDA-mail distribution agent. He gets the message from MTA, saves it to your mailbox, and filters it out.
7. apache configuration
8. Extmail-> supports multiple languages and all templates. the functions are complete.
Extmail software-> graphic logs
Cd/usr/ports/databases/rrdtool & make install clean
Cd/usr/ports/devel/p5-File-Tail & make install clean
Cd/usr/ports/devel/p5-Time-HiRes & make install clean
9. worry about amavisd-new-> Content/virus
10. clamav-> Clamav is a good anti-virus program. it is called by amavisd to detect and kill all common viruses.
11. mailman-> Mailman is a good mail list program with powerful functions. It provides a perfect Web client and can be managed in a decentralized manner.
2. preparations before installation
1. update ports
2. Compile the kernel
3. add an account and group (vmail) for storing emails)
Run the following command:
Pw group add vmail-g 1000
Pw user add vmail-u 1000-g 1000-s/sbin/nologin-d/dev/null
4. to create a path for the test user, you need a test account test@extmail.org, you need to prepare the path for this account
Mkdir-p/maildata/domains/extmail.org/test/Maildir/new
Mkdir-p/maildata/domains/extmail.org/test/Maildir/cur
Mkdir-p/maildata/domains/extmail.org/test/Maildir/tmp
Chown-R vmail: vmail/maildata/domains/
Chmod-R 700/maildata/domains/
3. install ExtMan
Because the files included in ExtMan need to be used during the installation process, install ExtMan first. Select MySQL as needed during installation
Cd/usr/ports/mail/extman/& make config & make install clean
4. install and configure courier-imap POP3/IMAP
Cd/usr/ports/mail/courier-imap/& make config & make install clean
Select during installation (if you use MySQL authentication, select AUTH_MYSQL): TRASHQUOTA AUTH_MYSQL
1. Authlib configuration
Start authdaemond:/usr/local/etc/rc. d/courier-authdaemond start
After the authdaemond is started, check whether socket files are generated under/var/run/authdaemond.
Copy a configuration file cp/usr/local/etc/authlib/authdaemonrc. bak
(1) edit the ee/usr/local/etc/authlib/authdaemonrc file. the content is similar to the following:
Authmodulelist = "authmysql"
Authmodulelistorig = "authmysql"
Version = "authdaemond. mysql"
Daemons = 5
Authdaemonvar =/var/run/authdaemond
Subsystem = mail
DEBUG_LOGIN = 0
DEFAULTOPTIONS = "wbnodsn = 1 ″
LOGGEROPTS = ""
Add the execution permission of/var/run/authdaemond: chmod + x/var/run/authdaemond
Copy a configuration file cp/usr/local/etc/authlib/authmysqlrc. bak
(2) edit the ee/usr/local/etc/authlib/authmysqlrc file. the content is similar to the following:
MYSQL_SERVER localhost
MYSQL_USERNAME extmail
MYSQL_PASSWORD extmail
MYSQL_PORT 0
MYSQL_OPT 0
MYSQL_DATABASE extmail
MYSQL_SELECT_CLAUSE SELECT username, password, "", uidnumber, gidnumber,
CONCAT ('/maildata/domains/', homedir ),
CONCAT ('/maildata/domains/', maildir ),
Quota,
Name
FROM mailbox
WHERE username = '$ (local_part) @ $ (domain )'
2. the configuration supports POP3s.
Copy a configuration file cp/usr/local/etc/courier-imap/pop3d. cnf. dist/usr/local/etc/courier-imap/pop3d. cnf
Edit the ee/usr/local/etc/courier-imap/pop3d. cnf file. the content is similar to the following:
RANDFILE =/usr/local/share/courier-imap/pop3d. rand
[Req]
Default_bit = 1024
Encrypt_key = yes
Distinguished_name = req_dn
X509_extensions = cert_type
Prompt = no
[Req_dn]
C = CN
ST = BJ
L = Bei Jing
O = BeingLAN Mail Server
OU = BeingLAN
CN = beinglan
EmailAddress = entere@126.com