This page looks plain and unstyled because you're using a non-standard compliant browser. To see it in its best form, please upgrade to a browser that supports web standards. It's free and painless.

修性不修命,萬劫陰靈難入聖; 修命不修性,猶有家財無主柄
Album | Blog | Comment | Profile | Control Panel
aquatower | 1 August,2009 14:22

2. Mail Relays

%允許intranet: 192.168.0.0/24使用MTA(sendmail)寄信
#vi /etc/access

# by default we allow relaying from localhost...
Connect:localhost.localdomain RELAY
Connect:localhost RELAY
Connect:127.0.0.1 RELAY
Connect:192.168.0.0/24 RELAY

重新啟動sendmail
#service sendmail restart


%設定要接收那些網域的信, 並視為本機的信件
#vi /etc/mail/local-host-names

# local-host-names - include all aliases for your machine here.
example.com
mail.example.com
cba.com
123.com


3. Aliases

%部門郵件指定給特定的user, ex: helpdesk信給student
#vi /etc/aliases

---略---
# Person who should get root's mail
#root: marc

manager: student
helpdesk: student


4. virtusertable

%收虛擬網域的信, ex: admin@123.com, student@cba.com, 指定給特定user
%/etc/hosts或DNS須有對應

#vi /etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.0.254 server1.example.com server1
192.168.0.118 server118.example.com server118
192.168.0.254 123.com
192.168.0.254 cba.com


#vi /etc/mail/virtusertable

admin@123.com student
student@cba.com student@server118.example.com


5 procmail

#vi /etc/procmailrc [可由/usr/share/doc/proc*/examples/ * 找到範例檔]
[root@server1 mail]# cat /etc/procmailrc
# Please check if all the paths in PATH are reachable, remove the ones that
# are not.

PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:.
DEFAULT=$HOME/mbox
VERBOSE=yes

:0 c
* ^Subject:.*rhce
/var/spool/mail/procmail.test

LOGFILE=/var/spool/mail/procmail.log


Comment

Trackback

Comment Permissions: Only members may comment. If you are not a PIXNET member, click here to sign up.