欢迎来到天天文库
浏览记录
ID:40557730
大小:39.50 KB
页数:3页
时间:2019-08-04
《linux下Mail Server的配置》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、MailServer一、简要信息:1.Linux邮件系统分为两种:Sendmail和Postfix。2.安装包裹:sendmail、postfix、system-switch-mail、dovecot。3.用户邮件列表位置:/etc/aliases生效命令:newaliases4.配置文件:Sendmail主配置文件:/etc/mail/sendmail.mcPostfix主配置文件:/etc/postfix/main.cfDovecot主配置文件:/etc/dovecot.conf编辑后需执行命令方可生效,生效命令:Sendmail:m4sendma
2、il.mc>sendmail.cfPostfix:postmanmain5.切换服务,执行命令:system-switch-mail二、主要配置:㈠Sendmail:1.出站地重写:主配置文件中加入命令:FEATURE(genericstable)dnlFEATURE(`always_add_domain')dnlGENERICS_DOMAIN_FILE(`/etc/mail/local-host-names')dnl编辑文件:genericstable,格式:真实地址更改后地址执行makemap命令生效,命令格式如下:makemaphashgener
3、icstable.db4、下:虚拟真实2.用户控制:启用generic文件,需要在主配置文件中加入:smtp_generic_maps=hash:/etc/postfix/generic启用用户控制,主配置文件中加入命令:smtpd_client_restrictions=check_client_accesshash:/etc/postfix/accesssmtpd_recipient_restrictions=check_recipient_accesshash:/etc/postfix/recipient,permit_mynetworks,reject_unauth_d5、estinationsmtpd_sender_restrictions=check_sender_accesshash:/etc/postfix/sender则可生效,注意文件名一致。文件内格式:MailAddressok/REJECT完毕后使用postmanXXX使其生效主配置中加入命令:always_bcc=地址对该地址用户所发收邮件备份,监控。㈢DOVECOT1.编辑主配置文件,让Dovecot支持邮件协议服务:protocols=imapimapspop3pop3s2.主配置文件中,打开此选项,开启安全协议:ssl_cert_file=/etc6、/pki/dovecot/certs/dovecot.pemssl_key_file=/etc/pki/dovecot/private/dovecot.pem之后在/etc/pki/tls/certs下执行命令:makedovecot.pem可以创建Dovecot安全证书,将证书copy至地址:/etc/pki/dovecot/certs/etc/pki/dovecot/private使安全证书生效。一、邮件的收发:1.telnet命令:telnetlocalhost110userUserNamepassUserPasswordmailfrom:设置发7、件人rcptto:设置收件人2.命令方式发送:发送:echo‘’8、mail-vtest接受者清空邮件命令:echo>/var/spool/mail/root
4、下:虚拟真实2.用户控制:启用generic文件,需要在主配置文件中加入:smtp_generic_maps=hash:/etc/postfix/generic启用用户控制,主配置文件中加入命令:smtpd_client_restrictions=check_client_accesshash:/etc/postfix/accesssmtpd_recipient_restrictions=check_recipient_accesshash:/etc/postfix/recipient,permit_mynetworks,reject_unauth_d
5、estinationsmtpd_sender_restrictions=check_sender_accesshash:/etc/postfix/sender则可生效,注意文件名一致。文件内格式:MailAddressok/REJECT完毕后使用postmanXXX使其生效主配置中加入命令:always_bcc=地址对该地址用户所发收邮件备份,监控。㈢DOVECOT1.编辑主配置文件,让Dovecot支持邮件协议服务:protocols=imapimapspop3pop3s2.主配置文件中,打开此选项,开启安全协议:ssl_cert_file=/etc
6、/pki/dovecot/certs/dovecot.pemssl_key_file=/etc/pki/dovecot/private/dovecot.pem之后在/etc/pki/tls/certs下执行命令:makedovecot.pem可以创建Dovecot安全证书,将证书copy至地址:/etc/pki/dovecot/certs/etc/pki/dovecot/private使安全证书生效。一、邮件的收发:1.telnet命令:telnetlocalhost110userUserNamepassUserPasswordmailfrom:设置发
7、件人rcptto:设置收件人2.命令方式发送:发送:echo‘’
8、mail-vtest接受者清空邮件命令:echo>/var/spool/mail/root
此文档下载收益归作者所有