歡迎您光臨本站 註冊首頁

linux4.0 sendmail server relevant config

←手機掃碼閱讀     火星人 @ 2014-03-09 , reply:0

一.Sendmail server config SMTP

1. [root@michael ~]# vi /var/named/fung.com.zone

$TTL 86400

@ IN SOA michael.fung.com. root.fung.com. (

2009080301

28800

14400

3600000

86400 )

@ IN NS michael.fung.com.

michael IN A 192.168.5.1

www IN A 192.168.5.1

mail IN A 192.168.5.1

ftp IN CNAME michael

@ IN MX 10 mail.fung.com. (確定MX 記錄)

~

~

~

"/var/named/fung.com.zone" 20L, 433C written

[root@michael ~]# service named restart

Stopping named: [ OK ]

Starting named: [ OK ]

2. [root@michael ~]# nslookup

> server 192.168.5.1

Default server: 192.168.5.1

Address: 192.168.5.1#53

> set type=mx

> fung.com

Server: 192.168.5.1

Address: 192.168.5.1#53

fung.com mail exchanger = 10 mail.fung.com.

>

3. [root@michael ~]# rpm -qa | grep sendmail

sendmail-8.13.1-3.RHEL4.5 (sendmail server 程序 file)

sendmail-cf-8.13.1-3.RHEL4.5 (sendmail server 重新配置要的file)

[root@michael ~]# rpm -qa | grep m4

m4-1.4.1-16 (sendmail server config 不可少的 tools)

4 . [root@michael ~]# chkconfig --list sendmail

sendmail 0:off 1:off 2:on 3:off 4:on 5:on 6:off

[root@michael ~]# chkconfig --level 35 sendmail on

[root@michael ~]# chkconfig --list sendmail

sendmail 0:off 1:off 2:on 3:on 4:on 5:on 6:off

5. [root@michael ~]# service sendmail restart

Shutting down sendmail: [FAILED]

Starting sendmail: [ OK ]

Starting sm-client: [ OK ]

[root@michael ~]# service sendmail status

sendmail (pid 3785 3777) is running...

6. [root@michael ~]# vi /etc/mail/local-host-names

# local-host-names - include all aliases for your machine here.

fung.com (表明sendmail server 將對 “fung.com “domain 提供mail service).

7. [root@michael ~]# vi /etc/mail/sendmail.mc

DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl (start sendmail server the network interface,Addr=127.0.0.1 改為 Addr=0.0.0.0)

"/etc/mail/sendmail.mc" 164L, 6743C written

8. [root@michael mail]# m4 sendmail.mc> sendmail.cf

[root@michael mail]# service sendmail restart

Shutting down sendmail: [ OK ]

Shutting down sm-client: [ OK ]

Starting sendmail: [ OK ]

Starting sm-client: [ OK ]

注意:sendmail.cf is sendmail the lord config file ,sendmail.mc is sendmail lord config the 輔助 file , sendmail.cf config file 相對來說比較難懂.所以,use sendmail.mc file config sendmail server ,use m4 sendmail.mc.> sendmail.cf 生成 sendmail.cf. m4 use in “/etc/mail/” file in 執行. 轉換完之後才能 restart sendmail server.

9. [root@michael mail]# vi /etc/mail/access

# Check the /usr/share/doc/sendmail/README.cf file for a description

# of the format of this file. (search for access_db in that file)

# The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc

# package.

#

# by default we allow relaying from localhost...

localhost.localdomain RELAY

localhost RELAY

127.0.0.1 RELAY (default)

192.168.5.0 RELAY (allow 192.168.5.0 發 mail)

~

~"access" 10L, 368C written

10. [root@michael mail]# makemap hash access.db <access.

(轉換access to access.db,sendmail 只能識別access.db database)

11 . [root@michael ~]# netstat -ntpl | grep 25

tcp 0 0 0.0.0.0:643 0.0.0.0:* LISTEN 2582/ypserv

tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 3854/sendmail: acce

12. [root@michael ~]# telnet 192.168.5.1 25

Trying 192.168.5.1...

Connected to michael.fung.com (192.168.5.1).

Escape character is '^]'.

220 michael.fung.com ESMTP Sendmail 8.13.1/8.13.1; Wed, 5 Aug 2009 02:02:45 0800

ehlo localhost

250-michael.fung.com Hello michael.fung.com [192.168.5.1], pleased to meet you

250-ENHANCEDSTATUSCODES

250-PIPELINING

250-8BITMIME

250-SIZE

250-DSN

250-ETRN

250-AUTH GSSAPI DIGEST-MD5 CRAM-MD5

250-DELIVERBY

250 HELP

說明:sendmail in the SMTP OK

13.[root@michael ~]# mail (用來收取root user the mail)

Mail version 8.1 6/6/93. Type ? for help.

"/var/spool/mail/root": 8 messages 8 new

>N 1 root@michael.fung.co Wed Aug 5 01:39 25/955 "Anacron job 'cron.dai"

N 2 root@michael.fung.co Wed Aug 5 01:39 25/955 "Anacron job 'cron.dai"

N 3 root@michael.fung.co Wed Aug 5 01:39 25/953 "Anacron job 'cron.dai"

N 4 root@michael.fung.co Wed Aug 5 01:39 40/1334 "LogWatch for michael."

N 5 root@michael.fung.co Wed Aug 5 01:39 55/1638 "LogWatch for michael."

N 6 root@michael.fung.co Wed Aug 5 01:39 139/3856 "LogWatch for michael."

N 7 root@michael.fung.co Wed Aug 5 01:55 191/6869 "LogWatch for michael."

N 8 root@michael.fung.co Wed Aug 5 01:55 25/953 "Anacron job 'cron.dai".

14. [root@michael ~]# telnet 192.168.5.1 25

Trying 192.168.5.1...

Connected to michael.fung.com (192.168.5.1).

Escape character is '^]'.

220 michael.fung.com ESMTP Sendmail 8.13.1/8.13.1; Wed, 5 Aug 2009 02:09:03 0800

helo fung.com

250 michael.fung.com Hello michael.fung.com [192.168.5.1], pleased to meet you

mail from:root@fung.com

250 2.1.0 root@fung.com... Sender ok

rcpt to:root@fung.com

250 2.1.5 root@fung.com... Recipient ok

data

354 Enter mail, end with "." on a line by itself

dkkkkdl

dkkdkd

jkjddj

djjd

.

250 2.0.0 n74I933o004457 Message accepted for delivery

quit

221 2.0.0 michael.fung.com closing connection

Connection closed by foreign host.

You have new mail in /var/spool/mail/root

15. [root@michael ~]# mail

Mail version 8.1 6/6/93. Type ? for help.

"/var/spool/mail/root": 9 messages 9 new

&gt;N 1 root@michael.fung.co Wed Aug 5 01:39 25/955 "Anacron job 'cron.dai"

N 2 root@michael.fung.co Wed Aug 5 01:39 25/955 "Anacron job 'cron.dai"

N 3 root@michael.fung.co Wed Aug 5 01:39 25/953 "Anacron job 'cron.dai"

N 4 root@michael.fung.co Wed Aug 5 01:39 40/1334 "LogWatch for michael."

N 5 root@michael.fung.co Wed Aug 5 01:39 55/1638 "LogWatch for michael."

N 6 root@michael.fung.co Wed Aug 5 01:39 139/3856 "LogWatch for michael."

N 7 root@michael.fung.co Wed Aug 5 01:55 191/6869 "LogWatch for michael."

N 8 root@michael.fung.co Wed Aug 5 01:55 25/953 "Anacron job 'cron.dai"

N 9 root@fung.com Wed Aug 5 02:10 14/399

& 9

Message 9:

From root@fung.com Wed Aug 5 02:10:18 2009

Date: Wed, 5 Aug 2009 02:09:03 0800

From: root <root@fung.com>

dkkkkdl

dkkdkd

jkjddj

djjd

&

15. [root@michael ~]# telnet 192.168.5.1 25

Trying 192.168.5.1...

Connected to michael.fung.com (192.168.5.1).

Escape character is '^]'.

220 michael.fung.com ESMTP Sendmail 8.13.1/8.13.1; Wed, 5 Aug 2009 02:12:14 0800

helo fung.com

250 michael.fung.com Hello michael.fung.com [192.168.5.1], pleased to meet you

mail from:root@fung.com

250 2.1.0 root@fung.com... Sender ok

rcpt to:abc1@fung.com

250 2.1.5 abc1@fung.com... Recipient ok

data

354 Enter mail, end with "." on a line by itself

who shi root@fung.com

.

250 2.0.0 n74ICEgl004462 Message accepted for delivery

quit

221 2.0.0 michael.fung.com closing connection

Connection closed by foreign host.

[root@michael ~]# more /var/spool/mail/abc1

From root@fung.com Wed Aug 5 02:12:59 2009

Return-Path: <root@fung.com>

Received: from fung.com (michael.fung.com [192.168.5.1])

by michael.fung.com (8.13.1/8.13.1) with SMTP id n74ICEgl004462

for abc1@fung.com; Wed, 5 Aug 2009 02:12:40 0800

Date: Wed, 5 Aug 2009 02:12:14 0800

From: root <root@fung.com>

Message-Id: <200908041812.n74ICEgl004462@michael.fung.com>

who shi root@fung.com

二.Sendmail server config P0P3

1. [root@michael ~]# rpm -qa | grep dovecot

dovecot-0.99.11-4.EL4

[root@michael ~]# chkconfig --list dovecot

dovecot 0:off 1:off 2:off 3:off 4:off 5:off 6:off

[root@michael ~]# chkconfig --level 35 dovecot on

[root@michael ~]# chkconfig --list dovecot

dovecot 0:off 1:off 2:off 3:on 4:off 5:on 6:off

[root@michael ~]# service dovecot restart

Stopping Dovecot Imap: [FAILED]

Starting Dovecot Imap: [ OK ]

[root@michael ~]# service dovecot restart

Stopping Dovecot Imap: [ OK ]

Starting Dovecot Imap: [ OK ]

2. [root@michael ~]# vi /etc/dovecot.conf

## Dovecot 1.0 configuration file

# Default values are shown after each value, it's not required to uncomment

# any of the lines. Exception to this are paths, they're just examples

# with real defaults being based on configure options. The paths listed here

# are for configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var

# --with-ssldir=/usr/share/ssl

# Base directory where to store runtime data.

#base_dir = /var/run/dovecot/

# Protocols we want to be serving:

# imap imaps pop3 pop3s

#protocols = imap imaps

Protocols = pop3

3. [root@michael ~]# service dovecot restart

Stopping Dovecot Imap: [ OK ]

Starting Dovecot Imap: [ OK ]

4. [root@michael ~]# netstat -ntpl | grep 110

tcp 0 0 :::110 :::* LISTEN 4568/dovecot

5. test

[root@michael ~]# telnet 192.168.5.1 25

Trying 192.168.5.1...

Connected to michael.fung.com (192.168.5.1).

Escape character is '^]'.

220 michael.fung.com ESMTP Sendmail 8.13.1/8.13.1; Wed, 5 Aug 2009 02:21:49 0800

helo fung.com

250 michael.fung.com Hello michael.fung.com [192.168.5.1], pleased to meet you

mail from:root@fung.com

250 2.1.0 root@fung.com... Sender ok

rcpt to:abc1@fung.com

250 2.1.5 abc1@fung.com... Recipient ok

data

354 Enter mail, end with "." on a line by itself

who shi root@fung.com.

my name is michael fung

'

.

250 2.0.0 n74ILn9G004580 Message accepted for delivery

quit

221 2.0.0 michael.fung.com closing connection

Connection closed by foreign host.

[root@michael ~]# telnet 192.168.5.1 110 (發郵件)

Trying 192.168.5.1...

Connected to michael.fung.com (192.168.5.1).

Escape character is '^]'.

OK dovecot ready.

abc1

-ERR Unknown command.

quit

OK Logging out

Connection closed by foreign host.

[root@michael ~]# telnet 192.168.5.1 110 (收mail)

Trying 192.168.5.1...

Connected to michael.fung.com (192.168.5.1).

Escape character is '^]'.

OK dovecot ready.

user abc1

OK

pass 111111

OK Logged in.

List (顯示)

OK 2 messages:

1 538

2 540 (表明有2封郵件)

.

[root@michael ~]# more /var/spool/mail/abc1 (查看郵件詳細內容)

From root@fung.com Wed Aug 5 02:12:59 2009

Return-Path: <root@fung.com>

Received: from fung.com (michael.fung.com [192.168.5.1])

by michael.fung.com (8.13.1/8.13.1) with SMTP id n74ICEgl004462

for abc1@fung.com; Wed, 5 Aug 2009 02:12:40 0800

Date: Wed, 5 Aug 2009 02:12:14 0800

From: root <root@fung.com>

Message-Id: <200908041812.n74ICEgl004462@michael.fung.com>

X-IMAPbase: 1249410271 2

Status: O

X-UID: 1

Content-Length: 22

X-Keywords:

who shi root@fung.com

From root@fung.com Wed Aug 5 02:22:42 2009

Return-Path: <root@fung.com>

Received: from fung.com (michael.fung.com [192.168.5.1])

by michael.fung.com (8.13.1/8.13.1) with SMTP id n74ILn9G004580

for abc1@fung.com; Wed, 5 Aug 2009 02:22:19 0800

Date: Wed, 5 Aug 2009 02:21:49 0800

From: root <root@fung.com>

Message-Id: <200908041822.n74ILn9G004580@michael.fung.com>

Status: O

X-UID: 2

Content-Length: 49

X-Keywords:

who shi root@fung.com.

my name is michael fung

[root@michael ~]# telnet 192.168.5.1 110

Trying 192.168.5.1...

Connected to michael.fung.com (192.168.5.1).

Escape character is '^]'.

OK dovecot ready.

user root (user root is no can pop3)

OK

pass 111111

OK Logged in.

* BYE Internal login failure. Error report written to server log.

Connection closed by foreign host.

You have new mail in /var/spool/mail/root

三 .CLIENTS XP outlook Express relevant config

1.

2. [root@michael ~]# mail

Mail version 8.1 6/6/93. Type ? for help.

"/var/spool/mail/root": 9 messages 1 new 9 unread

U 1 root@michael.fung.co Wed Aug 5 01:39 26/965 "Anacron job 'cron.dai"

U 2 root@michael.fung.co Wed Aug 5 01:39 26/965 "Anacron job 'cron.dai"

U 3 root@michael.fung.co Wed Aug 5 01:39 26/963 "Anacron job 'cron.dai"

U 4 root@michael.fung.co Wed Aug 5 01:39 41/1344 "LogWatch for michael."

U 5 root@michael.fung.co Wed Aug 5 01:39 56/1648 "LogWatch for michael."

U 6 root@michael.fung.co Wed Aug 5 01:39 140/3866 "LogWatch for michael."

U 7 root@michael.fung.co Wed Aug 5 01:55 192/6879 "LogWatch for michael."

U 8 root@michael.fung.co Wed Aug 5 01:55 26/963 "Anacron job 'cron.dai"

&gt;N 9 abc2@fung.com Wed Aug 5 02:42 22/724 "root"

& 9

Message 9:

From abc2@fung.com Wed Aug 5 02:42:23 2009

From: "abc2" <abc2@fung.com>

To: <root@fung.com>

Subject: root

Date: Tue, 4 Aug 2009 14:37:35 0800

MIME-Version: 1.0

Content-Type: text/plain;

charset="gb2312"

X-Priority: 3

X-MSMail-Priority: Normal

X-Mailer: Microsoft Outlook Express 6.00.3790.1830

X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830

Content-Transfer-Encoding: 8bit

X-MIME-Autoconverted: from base64 to 8bit by michael.fung.com id n74IgMre004720

who shi abc2@fung.com

3. [root@michael ~]# telnet 192.168.5.1 110

Trying 192.168.5.1...

Connected to michael.fung.com (192.168.5.1).

Escape character is '^]'.

OK dovecot ready.

user abc1

OK

pass 111111

OK Logged in.

list

OK 3 messages:

1 538

2 540

3 852

.

quit

OK Logging out.

Connection closed by foreign host.

[root@michael ~]#

[root@michael ~]# more /var/spool/mail/abc1

From root@fung.com Wed Aug 5 02:12:59 2009

Return-Path: <root@fung.com>

Received: from fung.com (michael.fung.com [192.168.5.1])

by michael.fung.com (8.13.1/8.13.1) with SMTP id n74ICEgl004462

for abc1@fung.com; Wed, 5 Aug 2009 02:12:40 0800

Date: Wed, 5 Aug 2009 02:12:14 0800

From: root <root@fung.com>

Message-Id: <200908041812.n74ICEgl004462@michael.fung.com>

X-IMAPbase: 1249410271 3

Status: O

X-UID: 1

Content-Length: 22

X-Keywords:

who shi root@fung.com

From root@fung.com Wed Aug 5 02:22:42 2009

Return-Path: <root@fung.com>

Received: from fung.com (michael.fung.com [192.168.5.1])

by michael.fung.com (8.13.1/8.13.1) with SMTP id n74ILn9G004580

for abc1@fung.com; Wed, 5 Aug 2009 02:22:19 0800

Date: Wed, 5 Aug 2009 02:21:49 0800

From: root <root@fung.com>

Message-Id: <200908041822.n74ILn9G004580@michael.fung.com>

Status: O

X-UID: 2

Content-Length: 49

X-Keywords:

who shi root@fung.com.

my name is michael fung

'

From abc2@fung.com Wed Aug 5 02:42:42 2009

Return-Path: <abc2@fung.com>

Received: from vs4 ([192.168.5.197])

by michael.fung.com (8.13.1/8.13.1) with SMTP id n74Igg5O004723

for <abc1@fung.com>; Wed, 5 Aug 2009 02:42:42 0800

Message-ID: <000701ca14ce$234603d0$c505a8c0@vs4>

From: "abc2" <abc2@fung.com>

To: <abc1@fung.com>

Subject: abc1

Date: Tue, 4 Aug 2009 14:38:11 0800

MIME-Version: 1.0

Content-Type: text/plain;

charset="gb2312"

X-Priority: 3

X-MSMail-Priority: Normal

X-Mailer: Microsoft Outlook Express 6.00.3790.1830

X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830

Content-Transfer-Encoding: 8bit

X-MIME-Autoconverted: from base64 to 8bit by michael.fung.com id n74Igg5O004723

Status: O

X-UID: 3

Content-Length: 22

X-Keywords:

who shi abc2@fung.com

[root@michael ~]#

4. [root@michael ~]# telnet 192.168.5.1 25

Trying 192.168.5.1...

Connected to michael.fung.com (192.168.5.1).

Escape character is '^]'.

220 michael.fung.com ESMTP Sendmail 8.13.1/8.13.1; Wed, 5 Aug 2009 02:53:21 0800

helo fung.com

250 michael.fung.com Hello michael.fung.com [192.168.5.1], pleased to meet you

mail from:root@fung.com

250 2.1.0 root@fung.com... Sender ok

rcpt to:abc2@fung.com

250 2.1.5 abc2@fung.com... Recipient ok

data

354 Enter mail, end with "." on a line by itself

who shi root@fung.com

'

.

250 2.0.0 n74IrLRq004740 Message accepted for delivery

quit

221 2.0.0 michael.fung.com closing connection

Connection closed by foreign host.

5. [root@michael ~]# mail

Mail version 8.1 6/6/93. Type ? for help.

"/var/spool/mail/root": 8 messages 8 unread

&gt;U 1 root@michael.fung.co Wed Aug 5 01:39 26/965 "Anacron job 'cron.dai"

U 2 root@michael.fung.co Wed Aug 5 01:39 26/965 "Anacron job 'cron.dai"

U 3 root@michael.fung.co Wed Aug 5 01:39 26/963 "Anacron job 'cron.dai"

U 4 root@michael.fung.co Wed Aug 5 01:39 41/1344 "LogWatch for michael."

U 5 root@michael.fung.co Wed Aug 5 01:39 56/1648 "LogWatch for michael."

U 6 root@michael.fung.co Wed Aug 5 01:39 140/3866 "LogWatch for michael."

U 7 root@michael.fung.co Wed Aug 5 01:55 192/6879 "LogWatch for michael."

U 8 root@michael.fung.co Wed Aug 5 01:55 26/963 "Anacron job 'cron.dai"

& d8 (del a 8 mail)

& quit

Held 7 messages in /var/spool/mail/root

[root@michael ~]# mail

Mail version 8.1 6/6/93. Type ? for help.

"/var/spool/mail/root": 7 messages 7 unread

&gt;U 1 root@michael.fung.co Wed Aug 5 01:39 26/965 "Anacron job 'cron.dai"

U 2 root@michael.fung.co Wed Aug 5 01:39 26/965 "Anacron job 'cron.dai"

U 3 root@michael.fung.co Wed Aug 5 01:39 26/963 "Anacron job 'cron.dai"

U 4 root@michael.fung.co Wed Aug 5 01:39 41/1344 "LogWatch for michael."

U 5 root@michael.fung.co Wed Aug 5 01:39 56/1648 "LogWatch for michael."

U 6 root@michael.fung.co Wed Aug 5 01:39 140/3866 "LogWatch for michael."

U 7 root@michael.fung.co Wed Aug 5 01:55 192/6879 "LogWatch for michael."

&

四.Sendmail server the user agmr

1. config SMTP user認證.

[root@michael ~]# vi /etc/mail/sendmail.mc

dnl # guaranteed secure.

dnl # Please remember that saslauthd needs to be running for AUTH.

dnl #

TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl

define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl

[root@michael mail]# m4 sendmail.mc&gt; sendmail.cf

[root@michael mail]# service sendmail restart

Shutting down sendmail: [ OK ]

Shutting down sm-client: [ OK ]

Starting sendmail: [ OK ]

Starting sm-client: [ OK ]

[root@michael ~]# cat /usr/lib/sasl2/Sendmail.conf (sasl2 in the l is L,not 1)

pwcheck_method:saslauthd (sendmail server config user 認證, 一定 start saslauthd)

[root@michael ~]# chkconfig --level 35 saslauthd on

[root@michael ~]# chkconfig --list saslauthd

saslauthd 0:off 1:off 2:off 3:on 4:off 5:on 6:off

[root@michael ~]# service saslauthd restart

Stopping saslauthd: [FAILED]

Starting saslauthd: [ OK ]

2. 為了安全,add user can login sendmail server ,can no login system the user .

[root@michael ~]# groupadd mailuser

[root@michael ~]# adduser -g mailuser -s /sbin/nologin michael

[root@michael ~]# passwd michael

Changing password for user michael.

New UNIX password:

BAD PASSWORD: it does not contain enough DIFFERENT characters

Retype new UNIX password:

passwd: all authentication tokens updated successfully.

“-s /sbin/nologin” 指定用戶的shell, no allow login Linux system”

[root@michael ~]# mail

Mail version 8.1 6/6/93. Type ? for help.

"/var/spool/mail/root": 9 messages 1 new 9 unread

U 1 root@michael.fung.co Wed Aug 5 01:39 26/965 "Anacron job 'cron.dai"

U 2 root@michael.fung.co Wed Aug 5 01:39 26/965 "Anacron job 'cron.dai"

U 3 root@michael.fung.co Wed Aug 5 01:39 26/963 "Anacron job 'cron.dai"

U 4 root@michael.fung.co Wed Aug 5 01:39 41/1344 "LogWatch for michael."

U 5 root@michael.fung.co Wed Aug 5 01:39 56/1648 "LogWatch for michael."

U 6 root@michael.fung.co Wed Aug 5 01:39 140/3866 "LogWatch for michael."

U 7 root@michael.fung.co Wed Aug 5 01:55 192/6879 "LogWatch for michael."

U 8 abc2@fung.com Wed Aug 5 03:16 23/719 "111"

&gt;N 9 michael@fung.com Wed Aug 5 03:19 22/759 "root"

& 9

Message 9:

From michael@fung.com Wed Aug 5 03:19:32 2009

From: "michael" <michael@fung.com>

To: <root@fung.com>

Subject: root

Date: Tue, 4 Aug 2009 15:41:43 0800

MIME-Version: 1.0

Content-Type: text/plain;

charset="gb2312"

X-Priority: 3

X-MSMail-Priority: Normal

X-Mailer: Microsoft Outlook Express 6.00.3790.1830

X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830

Content-Transfer-Encoding: 8bit

X-MIME-Autoconverted: from base64 to 8bit by michael.fung.com id n74JJVss004906

who shi no login system the michael@fung.com

3. 設置群發和別名發.

[root@michael ~]# vi /etc/aliases

#

# Aliases in this file will NOT be expanded in the header from

# Mail, but WILL be visible over networks or from /bin/mail.

#

# &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; The program "newaliases" must be run after

# &gt;&gt; NOTE &gt;&gt; this file is updated for any changes to

# &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; show through to sendmail.

#

# Basic system aliases -- these MUST be present.

mailer-daemon: postmaster

postmaster: root

# General redirections for pseudo accounts.

bin: root

daemon: root

adm: root

lp: root

sync: root

shutdown: root

halt: root

mail: root

news: root

uucp: root

operator: root

games: root

gopher: root

ftp: root

nobody: root

radiusd: root

nut: root

dbus: root

vcsa: root

canna: root

wnn: root

rpm: root

nscd: root

pcap: root

apache: root

webalizer: root

dovecot: root

fax: root

quagga: root

radvd: root

pvm: root

amanda: root

privoxy: root

ident: root

named: root

xfs: root

gdm: root

mailnull: root

postgres: root

sshd: root

smmsp: root

postfix: root

netdump: root

ldap: root

squid: root

ntp: root

mysql: root

desktop: root

rpcuser: root

rpc: root

nfsnobody: root

ingres: root

system: root

toor: root

manager: root

dumper: root

abuse: root

# mailman aliases

mailman: postmaster

mailman-owner: mailman

newsadm: news

newsadmin: news

usenet: news

ftpadm: ftp

ftpadmin: ftp

ftp-adm: ftp

ftp-admin: ftp

www: webmaster

webmaster: root

noc: root

security: root

hostmaster: root

info: postmaster

marketing: postmaster

sales: postmaster

support: postmaster

# trap decode to catch security attacks

decode: root

# Person who should get root's mail

#root: marc

admin: abc2

testgroup: abc1,michael,root

"/etc/aliases" 102L, 1629C written

[root@michael ~]# newaliases (生成新的aliases.db file)

/etc/aliases: 80 aliases, longest 17 bytes, 837 bytes total

[root@michael ~]# telnet 192.168.5.1 25

Trying 192.168.5.1...

Connected to michael.fung.com (192.168.5.1).

Escape character is '^]'.

220 michael.fung.com ESMTP Sendmail 8.13.1/8.13.1; Wed, 5 Aug 2009 03:30:45 0800

helo

501 5.0.0 helo requires domain address

helo fung.com

250 michael.fung.com Hello michael.fung.com [192.168.5.1], pleased to meet you

mail from:root@fung.com

250 2.1.0 root@fung.com... Sender ok

rcpt to:admin@fung.com

250 2.1.5 admin@fung.com... Recipient ok

data

354 Enter mail, end with "." on a line by itself

zhi shi fa ge admin@fung.com de mail

.

250 2.0.0 n74JUjKf004973 Message accepted for delivery

quit

221 2.0.0 michael.fung.com closing connection

Connection closed by foreign host.

[root@michael ~]# mail

Mail version 8.1 6/6/93. Type ? for help.

"/var/spool/mail/root": 9 messages 1 new 9 unread

U 1 root@michael.fung.co Wed Aug 5 01:39 26/965 "Anacron job 'cron.dai"

U 2 root@michael.fung.co Wed Aug 5 01:39 26/965 "Anacron job 'cron.dai"

U 3 root@michael.fung.co Wed Aug 5 01:39 26/963 "Anacron job 'cron.dai"

U 4 root@michael.fung.co Wed Aug 5 01:39 41/1344 "LogWatch for michael."

U 5 root@michael.fung.co Wed Aug 5 01:39 56/1648 "LogWatch for michael."

U 6 root@michael.fung.co Wed Aug 5 01:39 140/3866 "LogWatch for michael."

U 7 root@michael.fung.co Wed Aug 5 01:55 192/6879 "LogWatch for michael."

U 8 abc2@fung.com Wed Aug 5 03:16 23/719 "111"

&gt;N 9 abc2@fung.com Wed Aug 5 03:34 24/798 "testgroup"

& 9

Message 9:

From abc2@fung.com Wed Aug 5 03:34:54 2009

From: "abc2" <abc2@fung.com>

To: <testgroup@fung.com>

Subject: testgroup

Date: Tue, 4 Aug 2009 16:08:18 0800

MIME-Version: 1.0

Content-Type: text/plain;

charset="gb2312"

X-Priority: 3

X-MSMail-Priority: Normal

X-Mailer: Microsoft Outlook Express 6.00.3790.1830

X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830

Content-Transfer-Encoding: 8bit

X-MIME-Autoconverted: from base64 to 8bit by michael.fung.com id n74JYrmE004982

wo sh abc2@fung.com

Teh a mail is to testgroup@fung.com

&

[root@michael ~]# telnet 192.168.5.1 110

Trying 192.168.5.1...

Connected to michael.fung.com (192.168.5.1).

Escape character is '^]'.

OK dovecot ready.

user abc1

OK

pass 111111

OK Logged in.

list

OK 4 messages:

1 538

2 540

3 852

4 928

.

quit

OK Logging out.

Connection closed by foreign host.

[root@michael ~]# more /var/spool/mail/abc1

From root@fung.com Wed Aug 5 02:12:59 2009

Return-Path: <root@fung.com>

Received: from fung.com (michael.fung.com [192.168.5.1])

by michael.fung.com (8.13.1/8.13.1) with SMTP id n74ICEgl004462

for abc1@fung.com; Wed, 5 Aug 2009 02:12:40 0800

Date: Wed, 5 Aug 2009 02:12:14 0800

From: root <root@fung.com>

Message-Id: <200908041812.n74ICEgl004462@michael.fung.com>

X-IMAPbase: 1249410271 4

Status: O

X-UID: 1

Content-Length: 22

X-Keywords:

who shi root@fung.com

From root@fung.com Wed Aug 5 02:22:42 2009

Return-Path: <root@fung.com>

Received: from fung.com (michael.fung.com [192.168.5.1])

by michael.fung.com (8.13.1/8.13.1) with SMTP id n74ILn9G004580

for abc1@fung.com; Wed, 5 Aug 2009 02:22:19 0800

Date: Wed, 5 Aug 2009 02:21:49 0800

From: root <root@fung.com>

Message-Id: <200908041822.n74ILn9G004580@michael.fung.com>

Status: O

X-UID: 2

Content-Length: 49

X-Keywords:

who shi root@fung.com.

my name is michael fung

'

From abc2@fung.com Wed Aug 5 02:42:42 2009

Return-Path: <abc2@fung.com>

Received: from vs4 ([192.168.5.197])

by michael.fung.com (8.13.1/8.13.1) with SMTP id n74Igg5O004723

for <abc1@fung.com>; Wed, 5 Aug 2009 02:42:42 0800

Message-ID: <000701ca14ce$234603d0$c505a8c0@vs4>

From: "abc2" <abc2@fung.com>

To: <abc1@fung.com>

Subject: abc1

Date: Tue, 4 Aug 2009 14:38:11 0800

MIME-Version: 1.0

Content-Type: text/plain;

charset="gb2312"

X-Priority: 3

X-MSMail-Priority: Normal

X-Mailer: Microsoft Outlook Express 6.00.3790.1830

X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830

Content-Transfer-Encoding: 8bit

X-MIME-Autoconverted: from base64 to 8bit by michael.fung.com id n74Igg5O004723

Status: O

X-UID: 3

Content-Length: 22

X-Keywords:

who shi abc2@fung.com

From abc2@fung.com Wed Aug 5 03:34:54 2009

Return-Path: <abc2@fung.com>

Received: from vs4 ([192.168.5.197])

(authenticated bits=0)

by michael.fung.com (8.13.1/8.13.1) with ESMTP id n74JYrmE004982

for <testgroup@fung.com>; Wed, 5 Aug 2009 03:34:54 0800

Message-ID: <002301ca14da$ba0cd670$c505a8c0@vs4>

From: "abc2" <abc2@fung.com>

To: <testgroup@fung.com>

Subject: testgroup

Date: Tue, 4 Aug 2009 16:08:18 0800

MIME-Version: 1.0

Content-Type: text/plain;

charset="gb2312"

X-Priority: 3

X-MSMail-Priority: Normal

X-Mailer: Microsoft Outlook Express 6.00.3790.1830

X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830

Content-Transfer-Encoding: 8bit

X-MIME-Autoconverted: from base64 to 8bit by michael.fung.com id n74JYrmE004982

Status: O

X-UID: 4

Content-Length: 56

X-Keywords:

wo sh abc2@fung.com

Teh a mail is to testgroup@fung.com

[root@michael ~]#

五.OPENWEBMAIL relevant config

1. [root@michael ~]# cd /mnt

[root@michael mnt]# ls

openwebmail-2.53-3.i386.rpm

openwebmail-data-2.53-1.i386.rpm

perl-Compress-Zlib-1.42-1.el4.rf.i386.rpm

perl-Text-Iconv-1.4-1.2.el4.rf.i386.rpm

perl-suidperl-5.8.5-36.RHEL4.i386.rpm

2.. [root@michael mnt]# rpm -ivh perl-suidperl-5.8.5-36.RHEL4.i386.rpm

warning: perl-suidperl-5.8.5-36.RHEL4.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e

Preparing... ########################################### [100%]

1:perl-suidperl ########################################### [100%]

[root@michael mnt]# rpm -ivh perl-Text-Iconv-1.4-1.2.el4.rf.i386.rpm

warning: perl-Text-Iconv-1.4-1.2.el4.rf.i386.rpm: V3 DSA signature: NOKEY, key ID 6b8d79e6

Preparing... ########################################### [100%]

1:perl-Text-Iconv ########################################### [100%]

[root@michael mnt]# rpm -ivh perl-Compress-Zlib-1.42-1.el4.rf.i386.rpm

warning: perl-Compress-Zlib-1.42-1.el4.rf.i386.rpm: V3 DSA signature: NOKEY, key ID 6b8d79e6

Preparing... ########################################### [100%]

1:perl-Compress-Zlib ########################################### [100%]

[root@michael mnt]# rpm -ivh openwebmail-2.53-3.i386.rpm openwebmail-data-2.53-1.i386.rpm

warning: openwebmail-2.53-3.i386.rpm: V3 DSA signature: NOKEY, key ID cfb164d8

Preparing... ########################################### [100%]

1:openwebmail-data ########################################### [ 50%]

2:openwebmail ########################################### [100%]

See post install instruction at:

/usr/share/doc/openwebmail-2.53/openwebmail-post.txt

3. [root@michael ~]# vi /var/www/cgi-bin/openwebmail/etc/dbm.conf

dbm_ext .db

dbmopen_ext .db

dbmopen_haslock no

~

~

"/var/www/cgi-bin/openwebmail/etc/dbm.conf" 3L, 83

4. [root@michael ~]# cd /var/www/cgi-bin/openwebmail/

[root@michael openwebmail]# ls

auth openwebmail-abook.pl openwebmail-main.pl openwebmail-send.pl openwebmail-viewatt.pl quota

etc openwebmail-advsearch.pl openwebmail-prefs.pl openwebmail-spell.pl openwebmail-webdisk.pl shares

misc openwebmail-cal.pl openwebmail-read.pl openwebmail-tool.pl openwebmail.pl userstat.pl

modules openwebmail-folder.pl openwebmail-saprefs.pl openwebmail-vdomain.pl preload.pl vacation.pl

[root@michael openwebmail]# ./openwebmail-tool.pl –init (初始化openwebmail system)

perl: warning: Setting locale failed.

perl: warning: Please check that your locale settings:

LANGUAGE = (unset),

LC_ALL = (unset),

LANG = "us_en"

are supported and installed on your system.

perl: warning: Falling back to the standard locale ("C").

creating db /var/www/cgi-bin/openwebmail/etc/maps/b2g ...done.

creating db /var/www/cgi-bin/openwebmail/etc/maps/g2b ...done.

creating db /var/www/cgi-bin/openwebmail/etc/maps/lunar ...done.

Creating UTF-8 locales...

langconv ar_AE.CP1256 -&gt; ar_AE.UTF-8

langconv ar_AE.ISO8859-6 -&gt; ar_AE.UTF-8

langconv bg_BG.CP1251 -&gt; bg_BG.UTF-8

langconv ca_ES.ISO8859-1 -&gt; ca_ES.UTF-8

langconv cs_CZ.ISO8859-2 -&gt; cs_CZ.UTF-8

langconv da_DK.ISO8859-1 -&gt; da_DK.UTF-8

langconv de_DE.ISO8859-1 -&gt; de_DE.UTF-8

langconv el_GR.ISO8859-7 -&gt; el_GR.UTF-8

langconv en_US.ISO8859-1 -&gt; en_US.UTF-8

langconv es_AR.ISO8859-1 -&gt; es_AR.UTF-8

langconv fi_FI.ISO8859-1 -&gt; fi_FI.UTF-8

langconv fr_FR.ISO8859-1 -&gt; fr_FR.UTF-8

langconv he_IL.CP1255 -&gt; he_IL.UTF-8

langconv hr_HR.ISO8859-2 -&gt; hr_HR.UTF-8

langconv hu_HU.ISO8859-2 -&gt; hu_HU.UTF-8

langconv id_ID.ISO8859-1 -&gt; id_ID.UTF-8

langconv it_IT.ISO8859-1 -&gt; it_IT.UTF-8

langconv ko_KR.eucKR -&gt; ko_KR.UTF-8

langconv lt_LT.CP1257 -&gt; lt_LT.UTF-8

langconv nl_NL.ISO8859-1 -&gt; nl_NL.UTF-8

langconv no_NO.ISO8859-1 -&gt; no_NO.UTF-8

langconv pl_PL.ISO8859-2 -&gt; pl_PL.UTF-8

langconv pt_BR.ISO8859-1 -&gt; pt_BR.UTF-8

langconv pt_PT.ISO8859-1 -&gt; pt_PT.UTF-8

langconv ro_RO.ISO8859-2 -&gt; ro_RO.UTF-8

langconv ru_RU.KOI8-R -&gt; ru_RU.UTF-8

langconv sk_SK.ISO8859-2 -&gt; sk_SK.UTF-8

langconv sl_SI.CP1250 -&gt; sl_SI.UTF-8

langconv sr_CS.ISO8859-2 -&gt; sr_CS.UTF-8

langconv sv_SE.ISO8859-1 -&gt; sv_SE.UTF-8

langconv th_TH.TIS-620 -&gt; th_TH.UTF-8

langconv tr_TR.ISO8859-9 -&gt; tr_TR.UTF-8

langconv uk_UA.KOI8-U -&gt; uk_UA.UTF-8

...done.

Welcome to the OpenWebMail!

This program is going to send a short message back to the developer,

so we could have the idea that who is installing and how many sites are

using this software, the content to be sent is:

OS: Linux 2.6.9-42.ELsmp i686

Perl: 5.008005

WebMail: OpenWebMail 2.53 20080123

Send the site report?(Y/n) y

sending report...

Thank you.

5. [root@michael ~]# service httpd restart

Stopping httpd: [ OK ]

Starting httpd: [ OK ]

[root@michael ~]# vi /var/www/cgi-bin/openwebmail/etc/openwebmail.conf

#

# Open WebMail configuration file

#

# This file contains just the overrides from defaults/openwebmail.conf

# please make all changes to this file.

#

# This file sets options for all domains and all users.

# To set options on per domain basis, please put them in sites.conf/domainname

# To set options on per user basis, please put them in users.conf/username

#

# make sure to update version, releasedate, revision

# in cgi-bin/openwebmail/etc/defaults/openwebmail.conf

domainnames fung.com

auth_module auth_unix.pl

mailspooldir /var/spool/mail

ow_cgidir /var/www/cgi-bin/openwebmail

ow_cgiurl /cgi-bin/openwebmail

ow_htmldir /var/www/data/openwebmail

ow_htmlurl /data/openwebmail

logfile /var/log/openwebmail.log

# To SysAdmin,

# Please install ClamAV RPM package from http://clamav.net/ in order to

# To enable viruscheck with Open WebMail, set enable_viruscheck to yes.

# See http://openwebmail.org/openwebmail/download/redhat/howto/virus/ClamAV/

# for a step-by-step instruction.

enable_viruscheck no

viruscheck_pipe /usr/bin/clamdscan --disable-summary --stdout -

viruscheck_source_allowed all

enable_spamcheck no

enable_learnspam no

<page_footer>

<a href="%ow_htmlurl%/openwebmail.html" target="_blank">%name%</a>

version %version%

&nbsp;

<a accesskey="H" href="%help_url%" target="_help">%help_text%?</a>

</page_footer>

logo_url %ow_htmlurl%/images/openwebmail.gif

logo_link http://openwebmail.org

help_url @@@HELP_URL@@@

help_text @@@HELP_TEXT@@@

spellcheck /usr/bin/aspell -a -S -w "-" -d @@@DICTIONARY@@@ -p @@@PDICNAME@@@

spellcheck_pdicname .aspell.@@@DICTIONARY@@@.pws

spellcheck_dictionaries english, american

auto_createrc yes

############################################

# Buttons :

# EditFroms | EditStationary | POP3Setup | ChangePassword | History | Info

enable_editfrombook yes

enable_stationery yes

enable_pop3 yes

enable_changepwd yes

enable_history yes

enable_about yes

##############################################

# Personal Information

default_language zh_CN.GB2312

default_timeoffset auto

default_daylightsaving auto

default_realname auto

default_fromemails auto

default_autoreplysubject This is an autoreply...[Re: $SUBJECT]

<default_autoreplytext>

Hello,

I will not be reading my mail for a while.

Your mail regarding '$SUBJECT' will be read when I return.

</default_autoreplytext>

<default_signature>

--

Open WebMail Project (http://openwebmail.org)

</default_signature>

##############################################

# Display Preference

default_style Default

default_iconset Cool3D.Chinese.Simplified

default_bgurl %ow_htmlurl%/images/backgrounds/Globe.gif

default_bgrepeat yes

default_fontsize 10pt

default_dateformat mm/dd/yyyy

default_hourformat 12

############################################

# Folder Browsing (Message Listing Options)

"/var/www/cgi-bin/openwebmail/etc/openwebmail.conf" 227L, 8515C written


[火星人 ] linux4.0 sendmail server relevant config已經有509次圍觀

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