歡迎您光臨本站 註冊首頁

郵件系統詳解

←手機掃碼閱讀     火星人 @ 2014-03-09 , reply:0
首先簡單的介紹一下郵件系統,主要由兩部分組成:smtp協議(簡單郵件傳輸協議)
和pop3(郵局協議version
3),smtp用於郵件在網路中的傳遞(mailer),而pop處理
客戶端郵件的接收.由於pop3的局限,將來肯定要被imap代替,imap有較好的目錄

服務能力,可以在下載之前看到郵件的主要信息如來源、標題等,還可以遠程刪除

郵件等,但目前ISP還不會輕易用它來替換pop.注意不要與IAP的POP搞混淆了,那
是當前接入點的意思(Point Of
Present).學得越多越糊塗:-(
最早在Linux傳遞郵件用的是smtp服務,在/etc/inetd.conf里可以看到這樣一行:

#smtp stream tcp nowait root /usr/bin/smtpd smtpd

現在基本都用sendmail這樣功能強大的deamon程序來做(nntp也是如此).

sendmail只是郵件傳遞者(mailer),它把這個主機上的郵件發送到其他地方,注意
到配置DNS時有一項MX(Mail
eXchang,郵件網關),使用sendmail在你的網內要有一

個DNS伺服器.而處理主機上遠程客戶的郵件服務則要有pop服務,查看inetd.conf
有這麼幾項:
pop-2
stream tcp nowait root /usr/sbin/tcpd ipop2d
pop-3 stream tcp nowait
root /usr/sbin/tcpd ipop3d
imap stream tcp nowait root
/usr/sbin/tcpd imap
再查看/etc/service就知道它們對應的埠號,用telnet host-name port試試能

看到什麼?Linux這樣的東西通常是用來做服務的,當然有很多人把它用作個人桌

面也不錯,但是新手就不知道如何去收他們在ISP的郵件了,其實很簡單,只需要

裝個pop/imap的客戶端軟體就行了,netscape的套件就是很好的選擇,KDE帶的郵

件客戶端軟體也不錯,支持多帳號,就是不直接支持中文(用zhXwin吧),或者用

fetchmail把郵件抓回來轉發到本地主機的客戶,在本地主機上用mail程序來讀.



我感覺mail程序好象是直接處理郵件隊列,不知對不對.使用mail程序問得最多
的問題是,在輸入正文時怎麼結束?另起一行輸入一個"."就行了!





上面講的是現在internet上的郵件系統,在internet出現以前電子郵件系統就有了,

比如在uucp/BBS上,還有其它類型的網路上,就在internet發達的今天,這樣的網

絡系統仍然與之並存.AOL、贏海威(IHWY)的網路上就不是標準的Internet電子郵件.

我以前就上過電信局的基於X.25網(準確的說應該是中國公用分組交換數據網CHINAPAC)

的電子郵件系統,優點是真正的帳號漫遊,缺點是速度太慢(至多9600bps,x.25本來就

不快),後來承諾要建一個X.400網關與Internet上的郵件系統轉發信件,也不知道後來
怎樣了,我早已不用它,在IP over
everthing的今天......



關於mail list功能,可以用sendmail的別名來做,或者用專門的軟體
href="http://infosite.heha.net/linux/ftp@ftp.greatcircle.com/pub/majordomo/default.htm">majordomo.

到中國自由軟體庫或者
href="http://ftp.swjtu.edu.cn/">swjtu.edu.cn上去可以搜尋到.它的FAQ由
href="http://www.cis.ohio-state.edu/~barr/default.htm">barr維護.

至於WebMail,可以到
href="http://www.perl.com/">http://www.perl.com/上找找有沒有現成的CGI.現成的軟體其實也很多

如WeMail,
href="http://www.lugs.ch/lugs/mitglieder/norbert.kuemin/wmf.html">WebMail
Folder,WebMail Module(Roxen),
href="http://www.fetchmail.com/">Fetchmail(也可以喲,商業性的)

href="http://horde.org/imp/default.htm">IMP(IMAP WebMail)以及
href="http://www.chaotika.net/code/HTMail">HTMail.



參考北京俱樂部的文章:
href="http://infosite.heha.net/linux/network/html/misc/network-sendmail_cf.html">配置文件sendmail.cf的簡單解釋.




href="http://infosite.heha.net/linux/network/html/misc/network-sendmail-bug.html">關於sendmail老版本的一個安全漏洞


href="http://infosite.heha.net/linux/network/html/misc/network-hotmail-bug.html">關於hotmail的安全漏洞
(做WebMail一定要參考一下!)






羅羅嗦嗦寫了一堆,希望對新新手有所幫助,下面是一些問答集:


href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#notify">如何禁止console下新郵件到達提示



href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#start">pop3啟動起來了嗎?





href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#account">如何建立一個郵件帳號?





href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#cannot-send">為什麼能收不能發郵件?





href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#error-on-get">為什麼突然不能收郵件?





href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#pine">配置pine去收pop3郵件





href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#big">sendmail如何據收大的信件?





href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#about-dns-MX">DNS里相關設置的問題





href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#MX-firewall">防火牆內外郵件網關的設置問題





href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#redundancy">郵件伺服器雙備份的設置問題





href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#multi-domain">sendmail支持多域名嗎?





href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#delete-mail">如何刪除未發出的郵件?





href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#raner-tips">raner寫的tips





href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#redhat5.1">Redhat
5.1文檔里的相關部分








發信人: rudey (huihui), 信區: Linux
標 題: Re: [求助]如何禁止新郵件到達提示?
發信站: BBS
水木清華站 (Mon Dec 7 01:00:38 1998)

: 比較煩人,可以去掉嗎?

biff n







> 我做了LAN中的一個mail server(red hat 5.0 ,kernel
2.0.1),可為何只能在WIN95下用NETCAPE4.0發信,
> 而不能收信,它出現"pop3 server error"
信息.請問是否只需配置/etc/inetd.conf 和/etc/services
> 中pop3 服務,或還有別的配置?
另外如何判斷我的server是否提供pop3服務,若沒有,又請問如何配置
> (請詳述程序安裝和編譯過程)?



到/usr/sbin下看一看有沒有ipop3d, 如果沒有的話就是你安裝時偷懶沒裝,重裝之.

實際上,安裝RH5的時候,選擇「Everything」,總共也沒多少(6XXM )又快又方便
(我只用9分鐘),決不會出現你這種問題.



如果有的話,試一試telnet localhost 110, 沒反應的話,應該是你的/etc/inetd.conf
有問題,
看看POP-3一行前面有沒有#



註:簡單地,用netstat -a | grep pop看看有沒有下面的信息:
tcp 0 0
*:pop-2 *:* LISTEN
tcp
0 0 *:pop
*:* LISTEN




> 你好!我想做一個mailserver,但在建立pop3郵件伺服器時,查到有qpopper與pop3d
>
兩種服務程序可用,好象聽說qpopper 能與window client相連,不過本人想比較具體


> 清楚二者有區別,請賜教!不勝感謝



沒什麼本質區別, pop-3協議極為簡單,幾百行程序而已,各種實現都差不多,犯不著為此
費心,高興的話你可以自己寫一個.

想知道區別的話,看看他們的源代碼不就行了?想用好LINUX, 沒有這點耐心和本事是不

行的.不要用各種"我是初學者...."之類的話給自己推卸責任,"從來就沒有什麼救世主,
一切都要靠我們自己!"






【 在 badi (都市夜歸人) 的大作中提到: 】
: 【 在 cop (cop) 的大作中提到: 】
: :
在配置完郵件系統后,請問怎樣使用, 在mail to XXX后出現subject, 添入
: :
后,不知怎樣做了.另外sendmail后POP的使用場合的區別.用Windows做客戶
: : 時,怎樣用?
: 1.mail結束用"."

: 2.需要qpopper,隨便找一個ftp下來.
qpop好像是用明文做身份驗證吧?聽說apop可以解決這種問題,但是一直沒有找到.



註:去找
href="http://www.serc.rmit.edu.au/~tobbe/epop">epop,把pop3客戶端與服務端簡潔地集成到一塊,也支持apop的密文驗證.





href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#head">BACK









> 我想在LAN中做一個pop3 mail server(slackware3.4),客戶為win95的IE,或Netscape.
>
1. 在linux上試telnet localhost 110,反應為「 OK,POP3 server ready...」
> 2.
請問是否需要建立客戶的有關信息(帳號、口令等等)?如何建立?
> 3. 請問下一步從何入手?或從那裡查閱資料?(howto中似乎沒有pop3
sever的說明).



簡單地,你只要在這台linux box上為用戶開一個普通的帳號就萬事大吉了.以後用戶使
用同樣的帳號和口令就可以同時登錄和POP-3收信了.

POP-3其實簡單的一塌糊塗,不信去看看源代碼,極為簡單.


-----
姚飛





href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#head">BACK








> 我現在的mail能夠接收,但不能發送,發送時提示伺服器拒發,這是怎麼回事,上回那位
>
lh兄貼給我的DNS也不行,看過之後感覺非常亂,和通過HOWTO得到的概念好像完全是兩碼
> 事一樣.



在/etc/mail/name_allow中加上你想允許的域或者子域就行了.
那是從RedHat 5.0開始增加的Anti-spam功能,

設置一下/etc/mail目錄.
參考
href="http://docs.shiuol.com.cn/rhmanual/manual/doc012.html">http://docs.shiuol.com.cn/rhmanual/manual/doc012.html





> My sendmail version is v.8.
> I can both send email in linux box
and mail client of win95. But I can
> receive the pop3 email sent in
linux box only. I don't know why.
> When I telnet localhost 25 and telnet
localhost 110 in linux box, they are
> all OK.
你的意思我想是這樣的:



你通過linuxbox作為pop3和smtp伺服器,讓他去收發信件,你在另外一台瘟95的機器上閱讀.
現在呢,你裝了RedHat5.1,
發現不能通過SMTP轉發出去,也不能收到ISP上的郵件,是吧?
現在我就是這樣的,讓他每天晚上2:00自動撥號收發郵件.



首先,你要定時運行fetchmail,從你的ISP那裡把郵件取回來,存到這個LINUX上,具體設置,
最好看看man
fetchmail,很詳細,很簡單.



RH5.1取消了預設的SMTP轉發功能, 你如果要用,請把你的瘟95機器的IP地址寫到

/etc/mail/ip_allow及/etc/mail/relay_allow兩個文件里, 一個IP寫一行.






>>>>>>> problem:

>>>>>>> I configured sendmail.cf and
install pop3. I can send mail
>>>>>>> from Linux
command line with mail command to outside.


>>>>>>> but
we can't send mail from a pc mail to outside.
>>>>>>>
error message :
>>>>>>> The mail server responded:

>>>>>>> <...@.......> We do not relay

>>>>>>> why?



>>>>>>
又是這種老的掉牙的問題.把你的客戶機的地址寫到/etc/mail/ip_allow里,重啟動sendmail.



>>>>> 如果想所有機器都可以是客戶機,如何去寫?



>>>> 把所有客戶機的地址都填進去,一行寫一個,比如:
>>>> xxx.xxx.xxx.1

>>>> xxx.xxx.xxx.2
>>>> xxx.xxx.xxx.3



>>> 最好能設定地址範圍或網段定義郵件客戶機.本人因工作關係,掌控
>>>
16個C類IP,如果是一行一個ip這樣Linux的mail客戶機設定就太麻煩了.
>>>
如果mail客戶出差在外,希望通過internet遠程取電子郵件,其不是要抓瞎.
>>> 我想linux的mail設定不會僅僅如此吧.




>> Class C
>> aaa.bbb.ccc
>> class b
>>
aaa.bbb
>> class a
>> aaa
>> --
>> Sida




> 本來RedHat 5.0以前的版本沒這東西,只不過發現好多人用RedHat Linux發送垃圾郵件,
> 這才不得已加上的.
你完全可以改改sendmail.cf去掉這些限制. 再說了, 寫個perl腳
> 本生成這個文件又不費事.



謝謝姚飛及各位大俠.My linux mail server is ok now!




href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#head">BACK







>>> 各位好!
>>>
我在SlackWare3.4上建立了一個用戶,只能發郵件,不能收郵件;而另一用戶就可
>>>
以.另有一用戶一直可以收發郵件,突然不能收郵件.(在Slackware3.4上正常,在
>>>
Client端[IE]老提示密碼錯誤,若郵箱為空,則一切正常.)望各位幫幫忙.



>> 把 /var/tmp/.pop/ 下面的文件刪掉就行了.





> 請問這幾個文件是怎樣形成的?
> ls /var/tmp/.pop
> xxx
> yyy

> zzz



when somebody downloading mail by pop3, but have some problem(like:

passwd error, lost carrier....).




href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#head">BACK








發信人: pear (大鴨梨), 信區: Linux
標 題: 如何在Pine中收取POP3伺服器中的信件
發信站: 廣州網易 BBS
(Mon Nov 23 18:36:13 1998), 轉信



在使用Linux的過程中,上網收取信件也是一件經常要做的工作.使用Xwindow

Netscape的朋友可能就沒有什麼問題.可是仍有些人在使用字元界面,他們仍然用

Pine作為收發郵件的工具.Pine的初始設置是讀取本地伺服器的郵件,如何用Pine
來讀取POP3伺服器上的郵件呢?

方法如下:在Pine的設置文件($HOME/.pinerc)中加入
Inbox Path =
{YourPopServer/pop3/user=YourName}INBOX
然後重新啟動Pine即可.

註:在pine里直接選setup配置也可以.還要配置smtp-server去發信.




href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#head">BACK







標 題: Re: sendmail如何據收大的信件?
發信站: BBS 水木清華站 (Mon Nov 30 17:24:15 1998)



O MaxMessageSize=1000000在
/etc/sendmail.cf中




href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#head">BACK








>> Dear Ladies and Gentlemen,
>> My DNS server and mail
server are installed on the same machine.
>> And the machine name is
just the domain name. Before I installed
>> DNS, the sendmail worked.
But After I installed DNS, I got
>> a error message returned to the
postmaster said:
>> 553 3lab.org. Config error: mail loops back to me


(MX problem?)
>> 554 ... Local configuration
error
>> In the named.hosts, there is a line read 'MX 10 3lab.org.'.

>> '3lab.org' is either my domain name and my host name.
>>
Is anything wrong?



> 不要把hostname和domain name搞成一樣,我想你是想讓你的郵件地址變成
> xxx@3lab.org
.這才想當然地採用了這麼個辦法.
> 實際上,你完全可以給這台機器起任何名字,假設是server.3lab.org ,
>
那麼,在DNS的zone文件里設置
>
> 3lab.org
IN MX 10 server.3lab.org

>
IN NS
server.3lab.org
>
> @ORIGIN 3lab.org
>
server IN A
a.b.c.d

>
IN CNAME ns

>
IN CNAME mail
>
>
然後,在/etc/sendmail.cw里加上3lab.org就可以了.
> 看來你要好好學習一下DNS .



Hello Yao fei,
It was settled. Thank you.
There is no
/etc/sendmail.cw file in my linux.
But I did find a 'Cwlocalhost' item in
the
/etc/sendmail.cf file. So I changed that clause
to 'Cwgtt.me', then
it works.




> Another thing that I don't inderstand is the
> differences
between 'Cwxxx' and 'DMxxx'.



Dm是指本機發出的Email域的地址.
Cw是指本機接收的Email域的地址.
--
Sida





href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#head">BACK







>>> 裝了一個 Linux 想做email server,但是使用防火牆,我的Linux的ip不是合法ip,

>>> 因此想採用mail exchanger來實現收internet email,在申請域名的時候加了一個

>>> mail exchangre ,以前在學校里的時候用NT伺服器收信成功過,但是現在每次發信給我

>>> 的Linux ,都會收到mail exchanger 的信,告訴我host unknown,請教各位高手應該怎麼辦?





>> 域名MX(mail exchange)是轉換域到主機,主機一定要是合法IP!
>>
「以前在學校里的時候用NT伺服器收信成功過」肯定不是用這種方法.
>>
Firewall后的mail主機,需要在Firewall上設置portmap.
>> --
>> Sida



> 可是的確有人這麼做是可以的,而我就不知道怎麼總是不成功..:(再請教一下,這個
> portmap是個啥東東?應該怎樣設置?

> 多謝了!



我想不可能吧,MX肯定不行.你大概是指的mail router(找不到好說法了,
用netscape mail
server的吧).就是有一台合法主機,它做網關,把MX指
向它,它再把某些域名的的信轉發內部網的機器上.如a公司有一合法IP

202.96.238.123, 202.96.238.123這台機器有雙網卡,內部地址是192.168.2.1,

a.com的MX指向202.96.238.123(合法),tech.a.com的MX也指向202.96.238.123,

但內部tech部的可用192.168.2.100來收信.202.96.238.123把信轉給了192.168.2.1.

我說的很不清楚,不知你是不是這個意思.




> I have a big problem. Here is the scenario:
> Our corporate email
system is Microsoft Exchange (NT-based). However, our
> internet gateway,
and also SMTP Relay host, is Linux/sendmail. Our MX
> record points to
the Linux machine (glory.prio.no, 194.19.122.161). When
> sendmail
receives something it doesn't know the address of (say
> ELSE@prio.no),
and who IS a user in Exchange, it bounces the mail.



sendmail on linux box is probably setup to accept mail for user@prio.no

If the scenario is like this "there are some users@prio.no who are on

linux and some users@prio.no who are on linux", you can use aliases to

forward the nt users email to forward to NT smtp(I hope) server.

Otherwise, change sendmail.cf so that it doesn't call itself prio.no, only



glory.prio.no



To change sendmail.cf, find a line with the text "Cw" at the begininning,

and remove only prio.no from that line leaving "Cw" with anything else or

even blank.



> How can I set it up to forward all mail from unknown users to the SMTP

> connector on NTSPRIO2 (ntsprio2.prio.no, 194.19.122.162), which is our

> Exchange server? The Exchange SMTP program already transfers all
outbound
> mail through the Linux box (has it set up as an SMTP relay
host), but, as
> I've pointed out, doesn't want to receive mail because
sendmail is
> incorrectly set up.



In your sendmail.mc put these lines :
FEATURE(mailertable, hash
/etc/mail/mailertable)
define(`LUSER_RELAY', ntsprio2.prio.no)dnl



And in mailertable

prio.no
esmtp:ntsprio2.prio.no
.prio.no
esmtp:ntsprio2.prio.no





href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#head">BACK







> 大家好!
>
>
近日碰到這樣一個問題,我想給單位的郵件伺服器hostA,配備
> 一台次郵件伺服器hostB,以防備hostA在down機或忙的時候落掉郵件,

> 現在DNS的設置已經好了,假設如下:
>
>
domain.my
in MX 10 hostA.domain.my.

>
in MX 20 hostB.domain.my.
>
>
hostA
in A xxx.xxx.xxx.50
>
hostB
in A xxx.xxx.xxx.51
>
> hostA、hostB均安裝使用的 RedHat
5.1 sendmail .
> 在hostA 的sendmail.cw 設置好, domain.my 的域名.
>

> ok!現在將hostA 故意當掉!另找台機器 hostC 來試試:
> ----------------------

> #:sendmail -v master@domain.my
> test
> test
> .

> master@domain.my... Connecting to hostA.domain.my. Via esmtp...



> master@domain.my... Connecting to hostB.domain.my. Via esmtp...

> ...
> ...
> ...
>
> 看來hostB是接收了次信,但是hostB
並沒有把此信再轉給 hostA.
> hostB 告訴我:
>
> 553 hostB.domain.my.
Config error: mail loops back to me (MX problem?)
> 554
... Local configuration error
>
> 我不知
hostB 的sendmail 該如何配置,那位大蝦給我解答解答,先謝了!



如果HOSTB relay域名domain.my,並且w類不設置domain.my的話,配置應該沒
問題,可能是啟動sendmail時用-q1h,
HOSTB在1小時后處理queue才轉發給HOSTA吧.
--
Sida





href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#head">BACK








標 題: Re: 求教!Sendmail能否支持多域名?
發信站: 廣州網易 BBS (Tue Oct 13 08:38:29 1998), 轉信




【 在 send (流浪貓) 的大作中提到: 】
: 各位大蝦:
: 能否讓sendmail支持多域名?或著有沒有別的
:
郵件伺服器軟體可以做到!
: 謝謝!
在/etc/sendmail.cf 中加一行:Fw/etc/sendmail.cw

然後在/etc目錄下生成文件sendmail.cw,把所有的域名寫到裡面,就行了.
當然,你預先要為你的機器申請這些域名.






href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#head">BACK








> Please , who can say how to remove my mail from the sendmail queue if I

> have send it bu sendmail still has it in its queue and I don't want
that
> mail to be sent.



Better than that ... Has an interface to the sendmail daemon been written.

A sendmail administrator and manager. Something that would help the

system adminstrator manage the queue (ie. Send now, rm, etc.) and other



configurable aspects of sendmail outside of sendmail.cf and its

commandline options? I don't think sendmail, mailq, nor newaliases has

that feature.



>> if you are root just go to /usr/spoolmqueue and delete the
appropriate
>> file. Otherwise, it'll probably be sent next time
sendmail rolls around.,



> But isn't there better way to do it. Because it is hard to quickly

> determine the appropriate file(s) in /var/spool/mqueue.



Running mailq to list the messages in the queue will give you a good idea

of the filename to delete.



There is no real 'easy' way to find the specific message. You can use
the
mqueue program (a symbolic link to sendmail which is the
equivalent of
sendmail -bp) to find your message. If you have time to
remove just one file
then remove the 'qf' file. The 'df' file holds the
text, but the sendmail
does not attempt to deliver a message which has
a data file but no queue
file.
Of course, the best method is to not send the message in the first
place.
If you are not the root user, then there is no recall function. A
message
sent is sent.




href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#head">BACK








發信人: raner (畢設好無聊呀!), 信區: Linux
標 題: 關於sendmail的別名和forward
發信站:
BBS 水木清華站 (Sat Apr 11 15:51:29 1998)



都是一些sendmail的小玩意, 經常有人會問, 整理一下



(1) 關於直接用IP地址發信



mail user@[166.111.IP.Address]

只要用[]將IP地址括起來就行了



(2) 關於alias



sendmail在/etc下有兩個文件 aliases和aliases.db,
後者是前者用newaliases
生成的別名資料庫. 你可以手工編輯/etc/aliases,


然後運行newaliases更新數據
庫(其實newaliases是個到sendmail的
symlink)



eg: nickname : user@hotmail.com

alias-name:
real-user-account



則以後mail nickname就可以將信寄到user@hotmail.com處

而別人寄給alias-name@your.domain.name的信就會轉給真正的用戶real-user-account



(3) 關於forward



在你的$HOME目錄下面編輯一個.forward文件, 裡面寫上你要forward的目的e-mail

地址或本機的用戶名, 就可以自動將信 forward到相應地址



eg: .forward: user@hotmail.com


或 other-user-account

則給此人的e-mail會forward到hotmail或other-user-account處



(4) 關於vacation



去找一個vacation包(如RedHat的contrib中有vacation的rpm), 裝上后就一個

/usr/bin/vacation程序和一個man.



先運行vacation, 它會讓你編輯$HOME/.vacation.msg文件, 就是要發回給對方

告訴他你現在不看信的東西啦. 然後編輯$HOME/.forward文件, 寫這樣一句

username, "|/usr/bin/vacation username", username
要換回你自己的了
然後運行vacation -I建立$HOME/.vacation.db就好了
(看看man更詳細)



(5) 關於sendmail的一些文件



/var/log/maillog sendmail的log,
分析錯誤有用
/var/spool/mail/$USER 進來的信, 每個用戶一個文件

/var/spool/mqueue mail queue, 可以用mailq看隊列中待發的信


(mailq也是 sendmail的symlink了)
dfxxxxxx 這是信的內容

qfxxxxxx 這是信的subject和別的信息 (反正每信一個號了, 配對的)




/etc/sendmail.cf sendmail的配置文件,
改動它可要小心
/etc/sendmail.cw


假如你的機器有好多alias的話就把名字寫在


這個文件中, 這樣寫哪個都能收到信



-------
raner





href="http://infosite.heha.net/linux/network/html/misc/sendmailabout.html#head">BACK








摘自<> 供懶人們閱讀



11.5 Sendmail



一個默認的sendmail.cf文件將被安裝在/etc下.該配置文件可工作於僅使用SMTP的站點.而不能工作於UUCP

站點;如果您要使用UUCP進行郵件傳輸就得重新生成一個新的sendmail.cf.這樣的話,您就需要安裝m4和

sendmail的源代碼包.請您閱讀sendmail 源代碼中的README以獲取更為詳盡的創建snedmail配置文件的方
法.也可以看
O'Reilly&Associates出版的一本有關sendmail的不錯的參考書(作者:Bryan Costales).



一種常用的sendmail的配置用一台機器作為網路中所有主機的郵件網關.打個比方,在紅帽子軟體公司我

們有一台地址為mail.redhat.com的機器來處理我們所有的郵件. 我們只需簡單的將mail.redhat.com要

處理郵件的機器的名字加入/etc/sendmail.cw.下面 是該文件的一個例子:



# sendmail.cw - include all aliases for your machine

# here.
torgo.redhat.com

poodle.redhat.com
devel.redhat.com




同樣在torgo,poodle和devel的那些機器中編輯/etc/sendmail.cf,使其象mail.redhat.com 那樣發送郵

件,轉發本地的郵件給redhat.com. 編輯含DH和DM的那些行:



# who I send unqualified names to
#
(null means deliver locally)
Drmail.redhat.com



# who gets all local email traffic

Dhmail.redhat.com



# who I masquerade as (null for no masquerading)



Dmredhat.com



以這種配置,所有發出的郵件都好象是從redhat.com發出的,而任何發往torgo.redhat.com 和其它機器

的郵件都將發送給mail.redhat.com



請注意,如果您將您的系統配置為以另一機器身份發送郵件的話,任何以本系統為目的的郵件都將被發送

至那台主機.比如,由cron進程定期產生的髮網root@poodle.redhat.com 日誌文件都將發送給

root@mail.redhat.com.




E.10.3 我已經升級到 5.0 , sendmail 不再像以前一樣傳送郵件 .該做什麼 ?



由於多方面的電子郵件商使用未知的 Red Hat 系統發送郵件和一些其他問題, 在 5.0 中, 我們將(不作
為郵件傳遞者)作為預設選項 .




你可以將你允許傳遞郵件的系統名稱加入到文件
/etc/relay_allow



web 站點
href="http://www.informatik.uni-kiel.de/~ca/email/check.html">http://www.informatik.uni-kiel.de/~ca/email/check.html

將告訴你更多關於這方面的信息 .



如果你希望某些發送垃圾郵件的站點不能訪問到你的計算機, 你可以使用 sendmail 的一些新特性
拒絕他們的訪問. 將這些站點的地址加入到文件
/etc/mail/deny 中, 然後為它生成一個散列表 .



下面的命令可以生成這種散列表 .



makemap -v hash /etc/mail/deny < /etc/mail/deny


[火星人 ] 郵件系統詳解已經有3799次圍觀

http://coctec.com/docs/linux/show-post-57943.html