linux
分类: LINUX
2014-06-03 23:13:37
Sendmail
RPM Packages, sendmail sendmail-cf sendmail-doc
#Lsof –i:25
#service postfix stop
#yum install –y sendmail*
#cd /etc/mail
#vi sendmail.mc
DAEMON_OPTIONS(* Addr=0.0.0.0, *) #receive all the requests
#vi local-host-names #aloow mail.qq.com to send email
mail.qq.com
#service sendmail restart
#netstat –ntlp |grep 25
#useradd a
#useradd b
#mail
Subject:hell
. #.means end
#su – a
$ mail #receive mail
1 #1 means read the 1st mail
Use qq.com as mail.qq.com
#vim local-host-name
qq.com
#vi sendmail.mc
MASQUERADE_AS(`qq.com`)dnl
FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
Email Relay
#vi access
192.168.0.44 RELAY #admit email from 192.168.0.44 to relay to other MTA
Postfix
#vi /etc/postfix/main.cf
myhostname = mail.qq.com
mydomain = qq.com #let take affect
myorigin = $mydomain #show the sender like
inet_interfaces=all #change from localhost to all,listen from all
mydestination=….,$mydomain #remove localhost$mydomain #