PosfixAdmin
Mấy hôm nay uốg thuốc rồi ngủ, chẳng kịp viết cái gì cả. Lại thêm tay trái đau, mới có 2 3 nhát mà đã thế. ( Đang trong quá trình kể khổ). Thiếu máu mà cứ thích hiến cho lưỡi dao lam.
Làm xong Postfix đc mấy hôm rồi, nhưg mà chưa note lại. Mai nghỉ, tay đỡ hơn, nên note tý vậy.
Triển khai multiply domain vs PostfixAdmin. Cái này là để quản lý thôi nhưg mà khá tiện, đỡ pải dùng user hệ thống.
Đầu tiên là down nó về, máy có sẵn mysql + php + apche. Cài nó như bất kỳ code nào.
Ok, h tiến hành cài postfix có mysql. Tìm lại entry trên: http://kendyhikaru.blogspot.com/2010/01/postfix-mailserver-dovecot-mysql.html
Bắt đầu cấu hình nha:
Tạo vmail như trên.
vim /etc/postfix/mysql-domains.cf
host = localhost user = postfix password = _your\_password_ dbname = postfix table = domain select\_field = domain where\_field = domain
vim /etc/postfix/mysql-users.cf
host = localhost
user = postfix
password = _your\_password_
dbname = postfix
table = mailbox
select\_field = maildir
where\_field = username
additional\_conditions = and active = '1'
vim /etc/postfix/mysql-aliases.cf
host = localhost user = postfix password = _your\_password_ dbname = postfix table = alias select\_field = goto where\_field = address
additional\_conditions = and active = '1'
result\_format = %sMaildir/
additional\_conditions = and backupmx = '0' and active = '1'
vim /etc/postfix/main.cf
uncomment mydestination
Add:
virtual\_mailbox\_domains = mysql:/etc/postfix/mysql-domains.cf
virtual\_mailbox\_maps = mysql:/etc/postfix/mysql-users.cf
virtual\_alias\_maps = mysql:/etc/postfix/mysql-aliases.cf
virtual\_mailbox\_base = /home/vmail
virtual\_uid\_maps = static:5000
virtual\_gid\_maps = static:5000
restart postfix. H là dovecot
vim /etc/dovecot-mysql.conf
driver = mysql
connect = host=localhost dbname=postfix user=postfix password=_password_
default\_pass\_scheme = PLAIN
vim /etc/dovecot.conf
auth\_username\_format = %Lu passdb sql { args = /etc/dovecot-mysql.conf } userdb static { args = uid=5000 gid=5000 home=/home/vmail/%d/%n }
password\_query = SELECT password FROM mailbox WHERE username = '%u'
restart dovecot
Test.
Thanks for reading
---------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------
All my Lab:
Linux Lab -- window and Cisco Lab
to be continued - I will update more.
Nam Habach