有關mail的問題

這個版面主要討論 debian 在 server 端的應用問題, server 種類繁多..舉凡 Web Server 、 File Server、 DHCP Server..等等。

版主: 阿信

有關mail的問題

文章week » 週三 1月 12, 2005 6:15 pm

各位前輩好:

小弟想請問有關mail的一些問題。如有前輩知曉,請指點一二。

小弟的環境如下:
-------
OS : debian gnu/linux 3.0
keneral : 2.4.18-bf2.4
cpu : intel celeron 300

bind : 8.3.3-2.0 woody2
sendmail : 8.12.3-4
-------


小弟在 http://www.dyndns.org 申請免費的domain,相關資訊如下:
-------
IP in Database/DNS: 220.132.184.121
Enable Wildcard: yes
Mail Exchanger (optional): week.homeip.net
-------


名稱伺服器的組態檔:
-------
zone "week.homeip.net" {
type master;
file "db.week.homeip.net";
};

zone "121.184.132.220.in-addr.arpa" {
type master;
file "db.121.184.132.220";
};
-------


名稱伺候器的轄區資料檔:
-------

;db.week.homeip.net

$TTL 604800
@ IN SOA week.homeip.net. root.week.homeip.net. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
IN NS week.homeip.net.
IN MX 20 mail.week.homeip.net.

IN A 220.132.184.121
debian IN A 220.132.184.121
www IN A 220.132.184.121
mail IN A 220.132.184.121
ftp IN A 220.132.184.121

-------

;db.121.184.132.220

$TTL 604800
@ IN SOA week.homeip.net. root.week.homeip.net. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
IN NS week.homeip.net.
IN MX 20 mail.week.homeip.net.

IN PTR week.homeip.net.
IN PTR debian.week.homeip.net.
IN PTR www.week.homeip.net.
IN PTR mail.week.homeip.net.
IN PTR ftp.week.homeip.net.
-------


/etc/host.conf相關資訊
-------
order hosts,bind
multi on
-------


/etc/hosts相關資訊
-------
127.0.0.1 localhost
220.132.184.121 week.homeip.net debian
192.168.1.1 week.homeip.net debian
-------


/etc/resolv.conf相關資訊
-------
search week.homeip.net
nameserver week.homeip.net
nameserver 168.95.1.1
-------


使用 smtp 傳送郵件:
-------
debian:~# telnet mail.week.homeip.net 25
Trying 220.132.184.121...
Connected to week.homeip.net.
Escape character is '^]'.
220 week.homeip.net ESMTP Sendmail 8.12.3/8.12.3/Debian-7.1; Wed, 12 Jan 2005 10:46:39 +0800; (No UCE/UBE) logging access from: week.homeip.net(OK)-week.homeip.net [220.132.184.121]
helo week.homeip.net
250 week.homeip.net Hello week.homeip.net [220.132.184.121], pleased to meet you
mail from : root@week.homeip.net
250 2.1.0 root@week.homeip.net... Sender ok
rcpt to : week@week.homeip.net
250 2.1.5 week@week.homeip.net... Recipient ok
data
354 Enter mail, end with "." on a line by itself
test test
.
250 2.0.0 j0C2kdJ6000764 Message accepted for delivery
quit
221 2.0.0 week.homeip.net closing connection
Connection closed by foreign host.
-------


使用 pop3 收信:
-------
debian:~# telnet mail.week.homeip.net 110 Trying 220.132.184.121...
Connected to week.homeip.net.
Escape character is '^]'.
+OK POP3 week.homeip.net v2001.78 server ready
user week
+OK User name accepted, password please
pass *******
+OK Mailbox open, 0 messages
-------


syslog 相關訊息:
-------
Jan 12 10:55:23 week sm-mta[826]: j0C2rkJ6000826: from=root@week.homeip.net, size=10, class=0, nrcpts=1, msgid=<200501120255.j0C2rkJ6000826@week.homeip.net>, proto=SMTP, daemon=MTA, relay=week.homeip.net [220.132.184.121]
Jan 12 10:55:24 week sm-mta[828]: j0C2rkJ6000826: SYSERR(root): MX list for none points back to week.homeip.net
Jan 12 10:55:24 week sm-mta[828]: j0C2rkJ6000826: to=week@week.homeip.net, delay=00:00:08, xdelay=00:00:01, mailer=relay, pri=120010, relay=none, dsn=5.3.5, stat=Local configuration error
Jan 12 10:55:24 week sm-mta[828]: j0C2rkJ6000826: j0C2tOJ6000828: DSN: Local configuration error
Jan 12 10:55:24 week sm-mta[828]: j0C2tOJ6000828: to=postmaster,root@week.homeip.net, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=61405, relay=none, dsn=5.3.5, stat=Local configuration error
Jan 12 10:55:24 week sm-mta[828]: j0C2tOJ6000828: j0C2tOJ7000828: return to sender: Local configuration error
Jan 12 10:55:24 week sm-mta[828]: j0C2tOJ7000828: to=postmaster, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32429, relay=none, dsn=5.3.5, stat=Local configuration error
Jan 12 10:55:24 week sm-mta[828]: j0C2tOJ6000828: Saved message in /var/lib/sendmail/dead.letter
-------


nslookup 相關資訊:
-------
debian:/# nslookup
Note: nslookup is deprecated and may be removed from future releases.
Consider using the `dig' or `host' programs instead. Run nslookup with
the `-sil[ent]' option to prevent this message from appearing.
> 220.132.184.121
Server: week.homeip.net
Address: 220.132.184.121#53

121.184.132.220.in-addr.arpa name = week.homeip.net.
121.184.132.220.in-addr.arpa name = debian.week.homeip.net.
121.184.132.220.in-addr.arpa name = www.week.homeip.net.
121.184.132.220.in-addr.arpa name = mail.week.homeip.net.
121.184.132.220.in-addr.arpa name = ftp.week.homeip.net.
> set type=mx
> week.homeip.net
Server: week.homeip.net
Address: 220.132.184.121#53

week.homeip.net mail exchanger = 20 mail.week.homeip.net.
-------


小弟想做以下的測試:
-------
1.傳送郵件至內部帳號
2.傳送郵件至其他郵件伺服器
3.從其他的郵件伺服器傳送郵件回來
-------


從 syslog 的訊息來看,不知是dns還是sendmail設定有問題,希望有經驗的前輩指點一二。

謝謝!!^^
week
可愛的小學生
可愛的小學生
 
文章: 16
註冊時間: 週三 7月 16, 2003 4:31 pm

re:有關mail的問題

文章week » 週一 1月 31, 2005 1:34 pm

各位前輩好:

小弟找到問題了.....是我不會設定sendmail的設定檔........ :ooops:

將sendmail.mc檔寫入以下的資料....再跑sendmailconfig

divert(0)dnl
define(`_USE_ETC_MAIL_')dnl
include(`/usr/share/sendmail/cf/m4/cf.m4')dnl
VERSIONID(`$Id: generic-linux.mc,v 8.1 1999/09/24 22:48:05 gshapiro Exp $')
OSTYPE(linux)dnl
FEATURE(use_cw_file)dnl
FEATURE(`access_db')dnl
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl

小弟可從yahoo寄信給這台MTU也可從這台MTU寄給yahoo了!! :-D

小弟想做的測試:
-------
1.傳送郵件至內部帳號
2.傳送郵件至其他郵件伺服器
3.從其他的郵件伺服器傳送郵件回來
-------

都完成了! :-D
week
可愛的小學生
可愛的小學生
 
文章: 16
註冊時間: 週三 7月 16, 2003 4:31 pm


回到 debian server

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 1 位訪客

cron