日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux 邮件日志,linux下如何建立邮件日志

發布時間:2024/7/23 linux 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux 邮件日志,linux下如何建立邮件日志 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

先關閉sendmail

service sendmail stop

chkconfig sendmail off

安裝DNS

mount /dev/cdrom /mnt

yum install bind-*

配置主DNS服務器

vim /var/named/chroot/etc/named.conf

options {

directory "/var/named";

};

zone ? ?"daijingjie.com" {

type ?master;

file ?"daijingjie.com.zone";

};

:wq!

cp /usr/share/doc/bind-9.3.6/sample/var/named/localhost.zone /var/named/chroot/var/named/daijingjie.com.zone

vim /var/named/chroot/var/named/daijingjie.com.zone

$TTL ? ?86400

@ ? ? ? ? ? ? ? IN SOA ?@ ? ? ? root (

42 ? ? ? ? ? ? ?; serial (d. adams)

3H ? ? ? ? ? ? ?; refresh

15M ? ? ? ? ? ? ; retry

1W ? ? ? ? ? ? ?; expiry

1D ) ? ? ? ? ? ?; minimum

daijingjie.com. ? ? ? ? ? IN NS ? ? ? ? ?mail.daijingjie.com.

mail.daijingjie.com. ? IN A ? ? ? ? ? ?192.168.18.35

daijingjie.com. ? ? ? ? ? IN MX 10 ? ?mail.daijingjie.com.

:wq!

重啟named

service named restart

echo "" > /etc/resolv.conf

host mail.daijingjie.com

顯示:mail.daijingjie.com has address 192.168.18.35 ?//表示成功

安裝postfix

yum install postfix -y

vim /etc/postfix/main.cf

69 myhostname = mail.daijingjie.com

77 mydomain = daijingjie.com

92 myorigin = $mydomain

107 inet_interfaces = all

110 #inet_interfaces = localhost

155 mydestination = $myhostname,$mydomain

255 mynetworks = 192.168.18.0/24, 127.0.0.0/8

287 relay_domains = daijingjie.com

:wq!

查看是否安裝cyrus-sasl

rpm -qa | grep cyrus-sasl

顯示:cyrus-sasl-lib-2.1.22-5.el5_4.3

cyrus-sasl-2.1.22-5.el5_4.3

cyrus-sasl-plain-2.1.22-5.el5_4.3 ? ?//已經安裝

vim /etc/sysconfig/saslauthd

修改 ?MECH=shadow

創建一個用戶

useradd daijingjie

passwd daijingjie

重啟saslauthd

/etc/init.d/saslauthd restart

chkconfig saslauthd on

測試用戶

testsaslauthd -u daijingjie -p'123456.'

顯示: 0: OK "Success." ?//成功

修改postfix配置文件

vim /etc/postfix/main.cf

在最后加上:

smtpd_sasl_auth_enable = yes

smtpd_sasl_local_domain = ''

smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination

broken_sasl_auth_clients = yes

smtpd_client_restrictions = permit_sasl_authenticated

smtpd_sasl_security_options = noanonymous

:wq!

重啟postfix

service postfix restart

安裝dovecot

yum install dovecot -y

修改dovecot配置文件

vim /etc/dovecot.conf

20 protocols = pop3 pop3s

35 protocol pop3 {

36 ? ? ?listen = *:10100

37 # ? ? ..

38 }

:wq!

/etc/init.d/dovecot restart

chkconfig dovecot on

安裝imap

yum install cyrus-imapd cyrus-imapd-devel -y

vim /etc/postfix/main.cf

456 mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp

:wq!

passwd cyrus

/etc/init.d/cyrus-imapd restart

chkconfig cyrus-imapd on

測試:

cyradm -u cyrus localhost

IMAP Password:

localhost.localdomain> cm user.daijingjie

localhost.localdomain> quit

安裝squirrelmail

yum install squirrelmail -y

/usr/share/squirrelmail/config/conf.pl

Command >>d -- cyrus -- 2 -- 1-- daijingjie.com -- 3 -- 2 -- r -- 4 -- 5 -- y -- r -- 10 -- 1 -- zh_CN -- 2 -- gb2312 -- r -- s -- q

重啟postfix

service postfix restart

總結

以上是生活随笔為你收集整理的linux 邮件日志,linux下如何建立邮件日志的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。