accf_http_load="YES"
apache22_enable="YES"
apache22_http_accept_enable="YES"
DirectoryIndex index.html
</IfModule>
DirectoryIndex index.html index.php
</IfModule>
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php-source .phps
shell $> mysql_install_db --user=mysql ###初始化数据库
MYSQL_USERNAME root
MYSQL_PASSWORD 123456
MYSQL_DATABASE postfix
log_level:3
mech_list:PLAIN LOGIN
authdaemond_path:/var/run/authdaemond/socket
8. 安装 postfix
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
command_directory = /usr/local/sbin
config_directory = /usr/local/etc/postfix
daemon_directory = /usr/local/libexec/postfix
debug_peer_level = 2
html_directory = no
mail_owner = postfix
mailq_path = /usr/local/bin/mailq
manpage_directory = /usr/local/man
mynetworks_style = host
newaliases_path = /usr/local/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
sample_directory = /usr/local/etc/postfix
sendmail_path = /usr/local/sbin/sendmail
setgid_group = maildrop
unknown_local_recipient_reject_code = 550
mydomain = ludy.com
home_mailbox = Maildir/
mydestination = $myhostname
local_recipient_maps =
message_size_limit = 14680064
#################MySQL################
virtual_alias_maps =mysql:/usr/local/etc/postfix/mysql/mysql_virtual_alias_maps.cf
virtual_uid_maps = static:80
virtual_gid_maps = static:80
virtual_mailbox_base = /var/mailbox/
virtual_mailbox_domains = mysql:/usr/local/etc/postfix/mysql/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/usr/local/etc/postfix/mysql/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 80
virtual_transport = virtual
maildrop_destination_recipient_limit = 1
################Quota################
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/usr/local/etc/postfix/mysql/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Sorry,the user's Maildir has overdrawn his diskspace quota ,please tray again later.
virtual_overquota_bounce = yes
##############SASL####################
smtpd_sasl_auth_enable = yes
smtpd_sasl2_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated,
reject_invalid_hostname,
reject_non_fqdn_hostname,
reject_unknown_sender_domain,
reject_non_fqdn_sender,
reject_non_fqdn_recipient,
reject_unknown_recipient_domain,
reject_unauth_pipelining,
reject_unauth_destination,
reject_rbl_client cblless.antispam.org.cn
smtpd_client_restrictions = permit_mynetworks,
permit_sasl_authenticated
password = 123456
hosts = localhost
dbname = postfix
table = alias
select_field = goto
where_field = address
shell $> ee mysql_virtual_domains_maps.cf
password = 123456
dbname = postfix
table = domain
select_field = description
password = 123456
dbname = postfix
table = mailbox
select_field = quota
where_field = username
shell $> ee mysql_virtual_mailbox_maps.cf
password = 123456
hosts = localhost
dbname = postfix
table = mailbox
select_field = maildir
where_field = username
10. 安装 POSTFIXADMIN
$CONF['database_host'] = 'localhost';
$CONF['database_user'] = 'root';
$CONF['database_password'] = '123456';
$CONF['database_name'] = 'postfix';
$CONF['database_prefix'] = '';
$CONF['domain_in_mailbox'] = 'NO';
$CONF['footer_text'] = 'Return to Host';
$CONF['footer_link'] = 'http://192.168.6.44/postfixadmin';
# key "rndc-key" {
# algorithm hmac-md5;
# secret "dOESmFjoj6ptokHGi4aJAg==";
# };
#
# controls {
# inet 127.0.0.1 port 953
# allow { 127.0.0.1; } keys { "rndc-key"; };
# };
去掉注释到 named.conf 文件
// Relative to the chroot directory, if any
directory "/etc/namedb";
pid-file "/var/run/named/pid";
dump-file "/var/dump/named_dump.db";
statistics-file "/var/stats/named.stats";
listen-on { 192.168.6.44; };
202.106.0.20;
};
zone "ludy.com" {
type master;
file "dynamic/ludy.com";
};
algorithm hmac-md5;
secret "dOESmFjoj6ptokHGi4aJAg==";
};
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};
$ORIGIN ludy.com.
@ IN SOA ludy.com. root.ludy.com. (
2009072901 ;
68400 ;
86400 ;
3600000; ;
36000 ) ;
IN NS ns.ludy.com.
IN MX 10 mail.ludy.com.
www IN A 192.168.6.44
mail IN A 192.168.6.44
ns IN A 192.168.6.44
named_program="/usr/sbin/named"
named_flags="-c /etc/namedb/named.conf"