您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 销售管理 > Sendmail配置方法
Sendmail简单配置RHEL5.3基本网络配置一、1、RHEL5U3:如图1(如图1)2、#hostname//查看当前主机的主机名:如图2(如图2)3、#vi/etc/sysconfig/network-scripts/ifcfg-eth0编辑指定网络接口配置文件:如图3(如图3)4、#vi/etc/sysconfig/network通过配置文件修改主机名:如图4(如图4)5、在终端字符界面修改其字体和中文字体大小:如图5(如图5)6、挂载光盘:如图6(如图6)7、查看OpenSSH是否安装:如图7(如图7)8、#vi/etc/hosts设置本地DNS解析文件:如图8(如图8)9、#vi/etc/resolv.conf指定当前主机的DNS服务器,最多可指定三个:如图9(如图9)10、关闭iptables防火墙:如图10(如图10)二、DNS简单配置1、vim/etc/named.conf2、vim/var/named/benet.com.zone3、vim/var/named/1.168.192.in-addr.arpa.zone4、nslookup查看三、sendmail简单配置1、安装sendmailroot@dns~]#mount/dev/hdc/mnt/dvd/mount:blockdevice/dev/hdciswrite-protected,mountingread-only[root@dns~]#cd/mnt/dvd/Server/[root@dnsServer]#rpm-qa|grepsendmailsendmail-8.13.8-2.el5[root@dnsServer]#lssendmail*sendmail-8.13.8-2.el5.i386.rpmsendmail-devel-8.13.8-2.el5.i386.rpmsendmail-cf-8.13.8-2.el5.i386.rpmsendmail-doc-8.13.8-2.el5.i386.rpm[root@dnsServer]#rpm-ivh--aidsendmail-cf-8.13.8-2.el5.i386.rpmwarning:sendmail-cf-8.13.8-2.el5.i386.rpm:HeaderV3DSAsignature:NOKEY,keyID37017186Preparing...###########################################[100%]1:sendmail-cf###########################################[100%][root@dnsServer]#rpm-ivh--aidsendmail-devel-8.13.8-2.el5.i386.rpmwarning:sendmail-devel-8.13.8-2.el5.i386.rpm:HeaderV3DSAsignature:NOKEY,keyID37017186Preparing...###########################################[100%]1:sendmail-devel###########################################[100%][root@dnsServer]#rpm-ivh--aidsendmail-doc-8.13.8-2.el5.i386.rpmwarning:sendmail-doc-8.13.8-2.el5.i386.rpm:HeaderV3DSAsignature:NOKEY,keyID37017186Preparing...###########################################[100%]1:sendmail-doc###########################################[100%][root@dnsServer]#[root@dnsServer]#rpm-qa|grepsendmailsendmail-devel-8.13.8-2.el5sendmail-doc-8.13.8-2.el5sendmail-cf-8.13.8-2.el5sendmail-8.13.8-2.el5[root@dnsServer]#rpm-qa|grepm4m4-1.4.5-3.el5.12、修改vim/etc/mail/sendmail.mc第116行将smtp侦听范围从127.0.0.1改为0.0.0.0第155行修改成自己域:LOCAL_DOMAIN(`benet.com')dnl3、使用m4命令生成sendmail.cf文件m4/etc/mail/sendmail.mc>/etc/mail/sendmail.cf4、修改local-host-names文件添加域名及主机名vim/etc/mail/local-host-names[root@dnsServer]#m4/etc/mail/sendmail.mc>/etc/mail/sendmail.cf[root@dnsServer]#vim/etc/mail/local-host-names#local-host-names-includeallaliasesforyourmachinehere.benet.com.mail.benet.com.~~~/etc/mail/local-host-names3L,91C已写入[root@dnsServer]#5、安装Dovecot软件包(POP3和IMAP)[root@dnsServer]#rpm-ivh--aidmysql-5.0.45-7.el5.i386.rpmwarning:mysql-5.0.45-7.el5.i386.rpm:HeaderV3DSAsignature:NOKEY,keyID37017186error:Faileddependencies:perl(DBI)isneededbymysql-5.0.45-7.el5.i386[root@dnsServer]#rpm-ivh--aidperl-DBI-1.52-2.el5.i386.rpmwarning:perl-DBI-1.52-2.el5.i386.rpm:HeaderV3DSAsignature:NOKEY,keyID37017186Preparing...###########################################[100%]1:perl-DBI###########################################[100%][root@dnsServer]#rpm-ivh--aidmysql-5.0.45-7.el5.i386.rpmwarning:mysql-5.0.45-7.el5.i386.rpm:HeaderV3DSAsignature:NOKEY,keyID37017186Preparing...###########################################[100%]1:mysql###########################################[100%][root@dnsServer]#rpm-ivh--aiddovecot-1.0.7-7.el5.i386.rpmwarning:dovecot-1.0.7-7.el5.i386.rpm:HeaderV3DSAsignature:NOKEY,keyID37017186Preparing...###########################################[100%]1:dovecot###########################################[100%]6、启动sendmail和dovecot服务[root@dnsServer]#servicesendmailrestart关闭sm-client:[确定]关闭sendmail:[确定]启动sendmail:[确定]启动sm-client:[确定][root@dnsServer]#servicedovecotrestart停止DovecotImap:[确定]启动DovecotImap:[确定][root@dnsServer]#7、查看端口netstat[root@dnsServer]#netstat-ntlActiveInternetconnections(onlyservers)ProtoRecv-QSend-QLocalAddressForeignAddressStatetcp00127.0.0.1:22080.0.0.0:*LISTENtcp000.0.0.0:1110.0.0.0:*LISTENtcp000.0.0.0:6880.0.0.0:*LISTENtcp00192.168.1.200:530.0.0.0:*LISTENtcp00127.0.0.1:530.0.0.0:*LISTENtcp00127.0.0.1:6310.0.0.0:*LISTENtcp000.0.0.0:250.0.0.0:*LISTENtcp00127.0.0.1:9530.0.0.0:*LISTENtcp00127.0.0.1:22070.0.0.0:*LISTENtcp00:::993:::*LISTENtcp00:::995:::*LISTENtcp00:::110LISTENtcp00:::143:::*LISTENtcp00:::22:::*LISTENtcp00::1:953:::*LISTEN[root@dnsServer]#netstat-an|grep25tcp000.0.0.0:250.0.0.0:*LISTENudp000.0.0.0:525460.0.0.0:*unix2[]DGRAM8925[root@dnsServer]#netstat-an|grep110tcp00:::110LISTEN[root@dnsServer]#netstat-an|grep143tcp00:::143:::*LISTENunix2[]STREAMCONNECTED10143/var/run/setrans/.setrans-unix8、验证Sendmail的SMTP认证功能telnetlocalhost25[root@dnsServer]#telnetlocalhost25Trying127.0.0.1...Connectedtolocalhost.localdomain(127.0.0.1).Escapecharacteris'^]'.220dns.benet.comESMTPSendmail8.13.8/8.13.8;Sat,10Oct200922:15:28+0800ehlolocalhost250-dns.benet.comHellolocalhost.localdomain[127.0.0.1],pleasedtomeetyou250-ENHANCEDSTATUSCODES250-PIPELINING250-8BITMIME250-SIZE250-DSN250-ETRN250-DELIVERBY250HELPquit2212.0.0dns.benet.comclosingconnectionConnectionclosedbyforeignhost.[root@dnsServer]#telnetlocalhost110Trying127.0.0.1...Connectedtolocalhost.localdomain(127.0.0.1).Escapecharacteris'^]'.+OKDovecotready.quit+OKLoggingoutConnectionclosedbyforeignho
本文标题:Sendmail配置方法
链接地址:https://www.777doc.com/doc-4054169 .html