CentOS4.4 Notes mail server set up on the mail gateway functions

1. By reference to the above two articles:
CentOS4.4 under the Notes mail server set up to achieve the basic functions
CentOS4.4 set up under the Notes mail server anti-virus functions of SPAM
Basically, we realized the e-mail to send and receive, as well as spam filtering functions, but is facing enterprises, with more of the microsoft exchange, I think, that is, you want to put Taiwan into a mail server e-mail gateways, all

flowing into the internal mail server MX GATEWAY e-mail after the first scan, the further behind the lost; Although many such features available in the market of products, but price is an investment, but can be easy LINUX; I would like to write BLOG, to test their own to share with you, I believe that is a summary of the beginner;
Including a summary of this article, I also spent nearly a month's time to sum up the test, I would like to function as a start, let us sum up their own to contribute to a better out! I am a LINUX beginners , through this platform I would like to know more friends, we can exchange ideas about! QQ: 418027712

2. Turn to the motion:
First introduced within the network of my test environment:
a. reference to the above two documents: to set up the server, respectively, A, its IP address: 10.6.6.111;
b. install a new mail server B, contains only (postfix + dovecot), there is no spam filtering; to replace the reality of the exchange server environment, since the installation of linux mail server platform than microsoft's exchange fast, simple, more importantly, to find months antique machines can be installed;
c. two machines are the same domain, centos.eb.cn
A machine name: mail.centos.eb.cn B machine name: mail1.cenots.eb.cn
http://blog.51cto.com/attachment/200709/200709301191138323937.jpg "border =" 0 "/>
3. The beginning of configuration:
a. Configure a mail gateway machine A, modified to achieve transmitted through the transmission table;
A message issued when the time machine, A fully transmitted to the B machine;
[root @ mail ~] # cd / etc / postfix
[root @ mail postfix] # vi main.cf
Increase
transport_maps = hash: / etc / postfix / transport
Exit and then save, and edit:
[root @ mail postfix] # vi transport
Increase
centos.eb.cn relay: [10.6.6.120]
Saved from the following steps:
[root @ mail postfix] # postmap / etc / postfix / transport
[root @ mail postfix] # postfix reload
postfix / postfix-script: refreshing the Postfix mail system

b. configuration MailScanner.conf to achieve, when the A machine-to-receive external e-mail spam to determine when, thrown into a designated account B machine spam@centos.eb.cn;
[root @ mail postfix] # vi / etc / MailScanner / MailScanner.conf
# Spam Actions = deliver header "X-Spam-Status: Yes" # comment out this line configuration;
Spam Actions = forward spam@centos.eb.cn # forward the designated Account configuration
# High Scoring Spam Actions = deliver header "X-Spam-Status: Yes" # comment out this line configuration;
High Scoring Spam Actions = forward spam@centos.eb.cn # forward the designated Account configuration

Click to restart MailScanner
[root @ mail postfix] # service MailScanner restart
Shutting down MailScanner daemons:
MailScanner: [OK]
incoming postfix: [OK]
outgoing postfix: [OK]
Waiting for MailScanner to die gracefully ............................................ ........................... dead.
Starting MailScanner daemons:
incoming postfix: [OK]
outgoing postfix: [OK]
MailScanner: [OK]
[root @ mail postfix] #

In fact, in the determination of MailScanner for spam to deal with a variety of ways, see the following parameters;
# This is just like the "Spam Actions" option above, except that it applies
# To messages that are * NOT * spam.
# Deliver - deliver the message as normal
# Delete - delete the message
# Store - store the message in the (non-spam) quarantine
# Store-nonmcp - store the message in the non-MCP quarantine
# Store-mcp - store the message in the MCP quarantine
# Store-nonspam - store the message in the non-spam quarantine
# Store-spam - store the message in the spam quarantine
# Forward user@domain.com - forward a copy of the message to user@domain.com
# Striphtml - convert all in-line HTML content to plain text
# Header "name: value" - Add the header
# Name: value
# To the message. Name must not contain any spaces.
# Custom (parameter) - Call the CustomAction function in / usr/lib/Mail-
# Scanner / MailScanner / CustomFunctions / CustomAction
#. Pm with the 'parameter' passed in. This can be
# Used to implement any custom action you require.

Create a new account, the collection of junk e-mail;
[root @ mail postfix] # ssh root@10.6.6.120
mailto: root@10.6.6.120 password:
[root @ mail1 ~] # adduser spam-s / sbin / nologin
Changing password for user spam.
New UNIX password:
BAD PASSWORD: it is too short
Retype new UNIX password:
passwd: all authentication tokens updated successfully.


4. The beginning of testing, were normal and refuse to send a letter to leeki.yan @ centos.eb.cn
a. First test leeki.yan @ trinet.com.cn from a normal letter to leeki.yan @ centos.eb.cn, in theory, a normal letter, after A scanning machine will go to the back of B machines relay, and send leeki.yan @ centos.eb.cn, view the log is as follows:
Sep 30 16:38:36 mail postfix / smtpd [8637]: connect from unknown [10.0.0.1]
Sep 30 16:38:36 mail postfix / smtpd [8637]: 8002B170301: client = unknown [10.0.0.1]
Sep 30 16:38:36 mail postfix / cleanup [8639]: 8002B170301: hold: header Received: from mail.trinet.com.cn (unknown [10.0.0.1])?? By mail.centos.eb.cn (Postfix ) with ESMTP id 8002B170301?? for ; Sun, 30 Sep 2007 16:38:36 +0800 (CST) from unknown [10.0.0.1]; from = to = proto = ESMTP helo =
Sep 30 16:38:36 mail postfix / cleanup [8639]: 8002B170301: hold: header Received: from triumphweihu ([10.0.0.1]) by mail.trinet.com.cn with Microsoft SMTPSVC (5.0.2195.6713);?? Sun, 30 Sep 2007 16:47:36 +0800 from unknown [10.0.0.1]; from = to = proto = ESMTP helo =
Sep 30 16:38:36 mail postfix / cleanup [8639]: 8002B170301: message-id = <00da01c8033d $ 5e55aa60 $ de04040a @ triumphweihu>
Sep 30 16:38:36 mail postfix / smtpd [8637]: disconnect from unknown [10.0.0.1]
Sep 30 16:38:38 mail MailScanner [8125]: New Batch: Scanning 1 messages, 2650 bytes
Sep 30 16:38:42 mail MailScanner [8125]: Virus and Content Scanning: Starting
Sep 30 16:38:53 mail MailScanner [8125]: Requeue: 8002B170301.BC8D5 to 52652170302
Sep 30 16:38:53 mail MailScanner [8125]: Uninfected: Delivered 1 messages
Sep 30 16:38:53 mail postfix / qmgr [8107]: 52652170302: from = , size = 2872, nrcpt = 1 (queue active)
Sep 30 16:38:53 mail postfix / smtp [8647]: 52652170302: to = , relay = 10.6.6.120 [10.6.6.120], delay = 17, status = sent ( 250 Ok: queued as 122AF2206E0)
Sep 30 16:38:53 mail postfix / qmgr [8107]: 52652170302: removed

See above, part of the red font on the machine B has the next relay a success!

b. a letter from spam 418027712@qq.com test to leeki.yan @ centos.eb.cn, in theory, refuse the letter, after A scanning machine will go to the back of B machines relay, send spam@centos.eb. cn, view the log is as follows:
Sep 30 17:05:01 mail postfix / smtpd [3496]: connect from smtpbg12.qq.com [58.60.13.110]
Sep 30 17:05:01 mail postfix / smtpd [3496]: C9D89170301: client = smtpbg12.qq.com [58.60.13.110]
Sep 30 17:05:01 mail postfix / cleanup [3504]: C9D89170301: hold: header Received: from smtpbg12.qq.com (smtpbg12.qq.com [58.60.13.110])?? By mail.centos.eb.cn (Postfix) with ESMTP id C9D89170301?? for ; Sun, 30 Sep 2007 17:05:01 +0800 (CST) from smtpbg12.qq.com [58.60.13.110]; from = <418027712@qq.com> to = proto = ESMTP helo =
Sep 30 17:05:01 mail postfix / cleanup [3504]: C9D89170301: message-id =
Sep 30 17:05:01 mail postfix / smtpd [3496]: disconnect from smtpbg12.qq.com [58.60.13.110]
Sep 30 17:05:02 mail MailScanner [3341]: New Batch: Scanning 1 messages, 1614 bytes
Sep 30 17:05:36 mail MailScanner [3341]: Spam Checks: Found 1 spam messages
Sep 30 17:05:36 mail MailScanner [3341]: Virus and Content Scanning: Starting
Sep 30 17:06:20 mail MailScanner [3341]: Requeue: C9D89170301.4D561 to 1B757170304
Sep 30 17:06:20 mail MailScanner [3026]: Uninfected: Delivered 1 messages
Sep 30 17:06:20 mail postfix / qmgr [2587]: 1B757170304: from = <418027712@qq.com>, size = 1834, nrcpt = 1 (queue active)
Sep 30 17:06:30 mail postfix / smtp [3591]: 1B757170304: to = , relay = 10.6.6.120 [10.6.6.120], delay = 89, status = sent (250 Ok : queued as 19B222206E0)
Sep 30 17:06:30 mail postfix / qmgr [2587]: 1B757170304: removed

Font face red from the part of the log can be seen, first of all e-mail detected as spam, and then, in the relay to the B machine, the posting to spam@centos.eb.cn;

5. The test is completed!


6.2007 years at 22 o'clock on October 8 added:
, But chatting with friends jacky know: In theory, e-mail gateways configured, the external fat off of e-mail to the mail gateway, the query does not require a local user group, and he just lost to the back, so I found the test to find, it is necessary to amend the e-mail gateway main.cf file, find:
# local_recipient_maps =
Modified as follows:
local_recipient_maps =
Notes to the that is, you can!

0 评论:

发表评论