Linux学习篇第三章之~postfix & mariadb
来源:互联网 发布:企业网络推广方法 编辑:程序博客网 时间:2024/06/06 11:17
1.重新配置postfix
[root@westos-mail postfix]# mv /etc/postfix/main.cf /mnt
[root@westos-mail postfix]# yum install postfix -y[root@westos-mail postfix]# vim /etc/postfix/main.cf
[root@westos-mail postfix]# systemctl restart postfix
2.安装数据库
[root@westos-mail postfix]# systemctl restart mariadb
[root@westos-mail postfix]# vim /etc/my.cnf
[root@westos-mail postfix]# systemctl restart mariadb.service
[root@westos-mail postfix]# mysql_secure_installation
[root@westos-mail postfix]# cd /var/www/html
tar jxf phpMyAdmin-3.4.0-all-languages.tar.bz2
rm -fr *.bz2
[root@westos-mail html]# mv phpMyAdmin-3.4.0-all-languages/ myadmin
[root@westos-mail html]# cd myadmin
[root@westos-mail myadmin]# cp config.sample.inc.php config.inc.php
[root@westos-mail myadmin]# vim config.inc.php
[root@westos-mail myadmin]# systemctl restart httpd
3.测试
访问172.25.254.143/myadmin
写入数据
4.vim /etc/postfix/mailuser.cf ##用户名称查询
hosts = localhost ##数据库所在主机user = postuser ##登陆数据库的用户
password = postuser ##登陆数据库的密码
dbname = email ##postfix要查询的名称
table = emailuser ##postfix要查询的表的名称
select_field = username ##postfix要查询的子段
where_field = username ##用户给定postfix的查询条件
测试:
5.vim /etc/postfix/maildomain.cf ##用户域名查询
测试:
6.vim /etc/postfix/mailbox.cf ##用户邮箱位置查询
测试:
----------------------------------------------------------------配置Postfix--------------------------------------------------------------------
groupadd -g 666 vmail
useradd -s /sbin/nologin -u 666 vmail -g 666
postconf -e "virtual_mailbox_base = /home/vmail" ##设定虚拟用户的邮件目录
postconf -e "virtual_uid_maps = static:666" ##虚拟用户建立文件的uid
postconf -e "virtual_gid_maps = static:666" ##虚拟用户建立文件的gid
postconf -e "virtual_alias_maps = mysql:/etc/postfix/mailiuser.cf"
postconf -e "virtual_mailbox_domains = myaql:/etc/postfix/maildomain.cf"
postconf -e "virtual_mailbox_maps = mysql:/etc/postfix/mailbox.cf"
systemctl restart postfix
主配置文件:
- Linux学习篇第三章之~postfix & mariadb
- Linux学习篇第三章之~mariadb
- linux学习之mariadb
- Liunx学习篇第三章之~配置电子邮件传输(postfix)
- linux学习第三十六篇:MariaDB安装,Apache安装
- postfix + mariadb
- postfix + mariadb
- mail postfix postfix+mariadb
- Linux学习篇第三章之~apache
- Linux学习篇第三章之~squid
- Linux学习篇第三章之~防火墙
- Linux学习篇第三章之~samba
- Linux学习篇第三章之~nfs
- Linux学习篇第三章之~iscsi
- POSTFIX+MARIADB postfix空壳邮件
- Linux学习之第三章
- linux服务之postfix
- linux学习之邮件服务管理,postfix,dovecot,thunderbird,mysql
- USACO-Section1.1 Friday the Thirteenth [日期]
- mybatis配置一四引入映射器的方法
- System类--Java基础061
- 移动端(安卓、IOS)请求Java服务器时的接受数据问题
- Android Media (Audio) Framework Analyse
- Linux学习篇第三章之~postfix & mariadb
- 用你的 ESP32 做一个音乐电台
- 服务
- poj3467(维护前缀长度)
- LeetCoder 26. Remove Duplicates from Sorted Array
- Spring返回xml或json
- Spring返回xml或json
- 使用Imagenet VGG-19模型进行图片识别
- 字节,字符,Unicode,utf-32,utf-16,utf-8,ASCII的含义