관리 메뉴

드럼치는 프로그래머

[Linux] 메일서버 구축하기(sendmail) 본문

★─Programing/☆─Linux

[Linux] 메일서버 구축하기(sendmail)

드럼치는한동이 2007. 9. 28. 01:27
sendmail관련 패키지가 설치되어 있는지 확인합니다.
[root@ns root]# rpm -qa|grep sendmail
sendmail-8.11.6-4hl
sendmail-doc-8.11.6-4hl
sendmail-cf-8.11.6-4hl
[root@ns root]#

만일, 설치되어 있지 않으면 시디롬을 마운트 후 설치합니다.

[root@ns mail]# mount /mnt/cdrom
cd /mnt/cd [root@ns mail]#
[root@ns mail]# cd /mnt/cdrom/Hancom/RPMS/
[root@ns RPMS]# rpm -Uvh sendmail-8.11.6-4hl.i386.rpm
Preparing... ########################################### [100%]

sendmail.cf
/etc/sendmail.cf 파일은 sendmail 패키지의 기본 설정 파일입니다. 이 설정파일은 리눅스 설정 파일 중 방대하고, 암호화(?) 형식이라 전문적인 기능을 요하지 않는다면 변경할 필요가 없습니다.
[root@ns root]# cat /etc/sendmail.cf|more
#
# Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
# The Regents of the University of California. All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#

######################################################################
######################################################################
#####
##### SENDMAIL CONFIGURATION FILE
#####
#####
######################################################################
######################################################################
local-host-names
/etc/mail/local-host-names 파일은 네임서버를 운영하며 가상 도메인 서비스를 운영할 때 도메인을 등록하여 사용할 경우 필요한 파일입니다.

[root@ns root]# cat /etc/mail/local-host-names
# local-host-names - include all aliases for your machine here.
[root@ns root]#

access
/etc/mail/access 파일은 특정호스트나 도메인의 메일 RELAY를 허용하거나 거부를 제어하는 파일로써, 메일 서버를 설정하는데 매우 유심하게 설정을 해야 하는 부분입니다.

[root@ns root]# cat /etc/mail/access
# Check the /usr/share/doc/sendmail-8.11.6/README.cf file for a description
# of the format of this file. (search for access_db in that file)
# The /usr/share/doc/sendmail-8.11.6/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
211.255.253 RELAY

위의 굵은 표시는 설정하려고 하는 메일서버의 네트워크 대역폭을 지정한 것입니다. 내부의 127.0.0.1과 211.255.253 대역을 가진 IP의 호스트만 RELAY기능을 허용한다는 내용입니다.

허용하고자 한 대역을 추가한 다음에는 makemap 명령으로 access.db 디비 파일을 갱신합니다.
[root@ns mail]# makemap hash /etc/mail/access.db < /etc/mail/access
[root@ns mail]#

virtusertable
/etc/mail/virtusertable 파일은 여러개의 도메인을 하나의 서버에서 서비스하는 호스팅일 때, 동일 유저명에 대해 사용을 할 수 있게 합니다. 자세한 내용은 추후 설명토록 하겠습니다.

데몬 실행
한컴리눅스에서는 다른 설정사항은 그대로 디폴트로 사용하며, access파일만 허용하려는 IP 대역대를 추가한 다음, 데몬을 재 실행하면 기본적인 메일서버의 기능을 사용할 수 있습니다.

[root@ns mail]# /etc/rc.d/init.d/sendmail stop
sendmail를 종료하고 있습니다: [실패]
[root@ns mail]# /etc/rc.d/init.d/sendmail start
sendmail (을)를 시작합니다: [ 확인 ]
[root@ns mail]#




먼저, 메일과 관련된 기본적인 용어를 봅시다.

SMTP(Simple Mail Transfer Protocol)
메일을 보낼 때 사용되는 프로토콜 - 포트 25번

POP3(Post Office Protocol)
서버에 있는 메일을 클라이언트로 가져올 때 사용되는 프로토콜 - 포트 110번

IMAP(Internet Message Access Protocol)
POP3가 보낸 메일에 대해서 서버에 더 이상 남아 있지 않지만 IMAP로 접속하여 메일을 읽으면 메일 서버에는 메일이 계속 존재한다. - 포트 143번   예)뉴스그룹

MUA(Mail User Agent)
메일을 보내기 위해 사용되는 프로그램     예) 아웃룩, 넷스케이프 메신저

MTA(Mail Transfer Agent)
메일을 전달받아 이를 외부로 전달하는 프로그램     예) sendmail, Qmail

MDA(Mail Delivery Agent)
전송 받은 메일을 해당 사용자에게 전달하는 역할로, 동일한 메일서버에서 서로 메일을 주고받을 경우

sendmail 설정 기본 파일들
/etc/sendmail.cf 파일과 /etc/mail/디렉토리에 모두 모여 있습니다. 메일 서버로 사용할 도메인을 네임서버에 추가했다면, 특별히 변경할 사항은 거의 없습니다.

[root@ns root]# ls -al /etc/sendmail.cf
-rw-r--r-- 1 root root 46298 12월 3 2001 /etc/sendmail.cf
합계 108
[root@ns root]# ls -al /etc/mail
drwxr-xr-x 2 root root 4096 5월 20 16:40 .
drwxr-xr-x 68 root root 8192 6월 10 13:47 ..
-rw-r--r-- 1 root root 611 12월 3 2001 Makefile
-rw-r--r-- 1 root root 364 3월 27 18:22 access
-rw-r--r-- 1 root root 12288 5월 20 16:40 access.db
-rw-r--r-- 1 root root 0 12월 3 2001 domaintable
-rw-r--r-- 1 root root 12288 5월 20 16:40 domaintable.db
-r--r--r-- 1 bin bin 5555 3월 11 15:54 helpfile
-rw-r--r-- 1 root root 64 12월 3 2001 local-host-names
-rw-r--r-- 1 root root 0 12월 3 2001 mailertable
-rw-r--r-- 1 root root 12288 5월 20 16:41 mailertable.db
-rw-r--r-- 1 root root 2475 12월 3 2001 sendmail.mc
-rw-r--r-- 1 root bin 628 5월 14 04:02 statistics
-rw-r--r-- 1 root root 127 12월 3 2001 trusted-users
-rw-r--r-- 1 root root 0 12월 3 2001 virtusertable
-rw-r--r-- 1 root root 12288 5월 20 16:40 virtusertable.db
[root@ns root]#
1. sendmail.cf 파일 설정
sendmail.cf 파일은 설정파일 자체가 암호화 같은 설정이며, 전문적인 기능을 구현하지 않는 경우라면 기본적인 설정을 두고 설정을 변경할 사항은 없습니다. 여기서에서는 기본 설정을 변경하지 않도록 합니다. 자세한 설정 옵션들은 전문서적을 참고하시기 바랍니다. 참고적으로 sendmail.cf 파일의 Cwlocalhost는 메일서버의 수신을 받기 위한 도메인을 지정하는 부분으로 /etc/mail/local-host-names과 같은 역할을 합니다.

[root@ns root]# cat /etc/sendmail.cf | more
#
# Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
# The Regents of the University of California. All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#

######################################################################
######################################################################
#####
##### SENDMAIL CONFIGURATION FILE
#####
#####
######################################################################
######################################################################

--More--
2. /etc/mail/local-host-names 설정
네임서버를 운영하며 가상도메인 서비스를 할 경우, local-host-names에 서비스 하고 있는 도메인을 추가적으로 적어 주시면 됩니다. 여기에서는 네임서버에서 지정한 linuxroot.co.kr 을 추가합니다.

[root@ns root]# cat /etc/mail/local-host-names
# local-host-names - include all aliases for your machine here.
linuxroot.co.kr
[root@ns root]#
3. /etc/mail/access 설정
특정 호스트나 도메인이 메일 서버에 대한 접근을 설정합니다. sendmail server에서 access 할 호스트에 대해 메일 Relay를 허용하는 것으로 보면 됩니다.
메일서버를 사용할 사내 네트워크 대역(보통 C클래스)을 추가합니다.
61.40.233.      RELAY
[root@ns root]# cat /etc/mail/local-host-names
# local-host-names - include all aliases for your machine here.
[root@ns root]# cat /etc/mail/access
# Check the /usr/share/doc/sendmail-8.11.6/README.cf file for a description
# of the format of this file. (search for access_db in that file)
# The /usr/share/doc/sendmail-8.11.6/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
61.40.233. RELAY
[root@ns root]#

[참고1] 특정 도메인이나 호스트에 대해 접근을 제어도 가능합니다.
linuxroot.co.kr : 특정 도메인에 대해서 접근 제어
mail.linuxroot.co.kr : 특정 호스트에 대해서 접근 제어
61.40.233.122 : 특정 IP 주소에 접근 제어
admin@ : 특정 사용자에 대한 접근 제어

[참고2] 접근 제어 옵션
OK : 지정한 호스트나 도메인에 대한 허용
RELAY : RELAY 허용
REJECT : 수신 및 발신 거부(반송)
DISCARD : 받은 메일 폐기
"501 message" : 특정 사용자 및 주소에 대한 message 반송 접근 거부
"550 message" : 특정 도메인에 대한 message 반송
"570 message" : 특정 도메인 또는 특정 메일에 대한 경고 메시지 및 메일 거부

[주의] 스팸메일 서버의 악용을 막기 위해, makemap hash /etc/mail/access < /etc/mail/access 명령으로 데이터베이스를 갱신합니다.
[root@ns root]# makemap hash /etc/mail/access < /etc/mail/access

/etc/rc.d/init.d/sendmail start 로 sendmail 데몬을 띄웁니다.
[root@ns root]# /etc/rc.d/init.d/sendmail stop
sendmail를 종료하고 있습니다: [실패]
[root@ns root]# /etc/rc.d/init.d/sendmail start
sendmail (을)를 시작합니다: [확인]

4. sendmail 설정 테스트
설정 테스트는 여러 가지가 있지만, mail 명령어를 이용하여 실제적으로 메일을 보내고 받는 손쉬운 방법을 이용합니다.

- 보내기 테스트
a. 셋팅된 메일서버의 텍스트 상에 mail 명령으로 외부의 웹 메일이나 다른 네트워크의 계정이 있는 곳으로 메일을 보내 봅니다.

subject: => 제목을 입력합니다
엔터를 친 후, 내용을 입력합니다.
내용을 마칠 경우는 다음 줄에서 .을 입력합니다.
[root@ns root]# mail woojk@kebi.com
Subject: test
this is a test mail.
.
Cc:
[root@ns root]#

b. 보낸 외부 메일서버로 로그인 한 다음, 제대로 왔는지 확인합니다.

c. 제대로 오지 않았다면, 대부분 sendmail 데몬이 뜨지 않은 경우이므로, 데몬을 재 실행한 다음 다시 테스트합니다.

- 외부 메일 받기 테스트
a. 외부 웹 메일이나 계정서비스에서 셋팅한 메일서버의 사용자계정으로 직접 메일을 보내봅니다. 저는 계속해서 linuxroot.co.kr 호스트에 네임서버와 메일서버를 같이 셋팅하였으므로, admin@linuxroot.co.kr 으로 메일을 보냅니다.

b. 셋팅한 메일 서버의 명령 창에서 mail 명령으로 메일을 확인합니다.

[admin@ns admin]$ mail
No mail for admin
[admin@ns admin]$


sendmail만 설정하였다고, 윈도우나 리눅스의 데스크탑에서 서버의 메일을 볼 수는 없습니다.
그래서 POP3가 필요하게 됩니다.
- 110번 포트를 사용
- 메일 클라이언트에게 메일을 보내는 역할
1 POP3 설정
POP3와 IMAP은 imap 패키지로 함께 묶어 있습니다. 패키지가 설치되어 있지 않으면 imap으로 시작하는 패키지를 설치합니다.
[root@ns root]# rpm -qa|grep imap
php-imap-4.1.1-1hl
imap-2000c-15hl
imap-devel-2000c-15hl
[root@ns root]#

/etc/services에서 pop3관련 포트가 주석이 제거되어 있는지 확인 후, 주석이 있으면 제거합니다.
기본적으로 한컴리눅스에서는 변경할 사항이 없습니다.

[root@ns root]# cat /etc/services | grep pop3
pop3 110/tcp pop-3 # POP version 3
pop3 110/udp pop-3
pop3s 995/tcp # POP-3 over SSL
pop3s 995/udp # POP-3 over SSL
[root@ns root]#

/etc/xinetd.d/ipop3 파일을 보면, 기본적으로 disable=yes가 되어 있는데 이것을 no로 변경 후, 저장합니다.

[root@ns root]# cat /etc/xinetd.d/ipop3 # default: off
# description: The POP3 service allows remote users to access their mail
# using an POP3 client such as Netscape Communicator, mutt,
# or fetchmail.
service pop3
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/sbin/ipop3d
log_on_success += USERID
log_on_failure += USERID
}
[root@ns root]#

<6-5-014> /etc/xinetd.d/ipop3 /etc/rc.d/init.d/xinetd 데몬을 재실행합니다.
[root@ns root]# /etc/rc.d/init.d/xinetd stop
xinetd 를 정지함: [실패]
[root@ns root]# /etc/rc.d/init.d/xinetd start
xinetd (을)를 시작합니다: [ 확인 ]
[root@ns root]#

2. POP3 설정 테스트
telnet localhost 110으로 텔넷 연결을 합니다.
아래 그림과 같이 Conneted to localhost.localdomain(127.0.0.1)이라고 나온다면, 제대로 된 것으로 볼 수 있습니다.

# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
Connection closed by foreign host.
[root@ns root]#

아래 그림과 같이 텔넷 연결이 거부되면,
먼저, xinetd데몬이 정상적으로 떠 있는지 확인
두번째로, /etc/service 와 /etc/xinetd.d/ipop3 확인
마지막으로는 기존 패키지를 삭제한 후, 새로운 IMAP패키지를 설치하여 봅니다.
[root@ns root]# telnet localhost 110
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
[root@ns root]#



sendmail 설정하기 에서 설명한 것과 같이, /etc/mail/acceess 설정에서 메일을 보내는 네트워크 주소 대역을 허용하여, 스팸 메일러로 부터 스팸 메일 서버로의 악용을 막을 수 있었습니다.
하지만, 이 RELAY 허용 방식은 회사가 아닌 집이나, 다른 업무차 회사 밖에서는 메일로 업무를 볼 수가 없게 됩니다.
이같은 문제를 해결하기 위한 것이 SMTP 인증 방식입니다.

[주의] 한컴리눅스 3.1에서는 기본적으로 SMTP 인증 방식을 사용하므로, 데몬만을 재 실행하고 아래 클라이언트 설정을 하시면 됩니다.

SMTP 인증 방식은 여러가지가 있지만, 쉽게 한컴리눅스 3.0이나 2.2에 있는 기본 패키지를 약간만 수정하는 방법을 설명하겠습니다.
설정을 위해 /etc/mail/sendmail.mc 파일을 약간 수정하여야 합니다.

[root@ns root]# cat -b /etc/mail/sendmail.mc
1 divert(-1)
2 dnl This is the sendmail macro config file. If you make changes to this file,
3 dnl you need the sendmail-cf rpm installed and then have to generate a
4 dnl new /etc/sendmail.cf by running the following command:
5 dnl
6 dnl m4 /etc/mail/sendmail.mc > /etc/sendmail.cf
7 dnl
8 include(`/usr/share/sendmail-cf/m4/cf.m4')
9 VERSIONID(`linux setup for HancomLinux')dnl
10 OSTYPE(`linux')
11 define(`confDEF_USER_ID',``8:12'')dnl
12 undefine(`UUCP_RELAY')dnl
13 undefine(`BITNET_RELAY')dnl
14 define(`confAUTO_REBUILD')dnl
15 define(`confTO_CONNECT', `1m')dnl
16 define(`confTRY_NULL_MX_LIST',true)dnl
17 define(`confDONT_PROBE_INTERFACES',true)dnl
18 define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
19 define(`ALIAS_FILE', `/etc/aliases')dnl
20 dnl define(`STATUS_FILE', `/etc/mail/statistics')dnl
21 define(`UUCP_MAILER_MAX', `2000000')dnl
22 define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
23 define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
24 define(`confAUTH_OPTIONS', `A')dnl
25 dnl TRUST_AUTH_MECH(`DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
26 dnl define(`confAUTH_MECHANISMS', `DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
27 dnl define(`confTO_QUEUEWARN', `4h')dnl
28 dnl define(`confTO_QUEUERETURN', `5d')dnl
29 dnl define(`confQUEUE_LA', `12')dnl
30 dnl define(`confREFUSE_LA', `18')dnl
31 dnl FEATURE(delay_checks)dnl
32 FEATURE(`no_default_msa',`dnl')dnl
33 FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
34 FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
35 FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
36 FEATURE(redirect)dnl
37 FEATURE(always_add_domain)dnl
38 FEATURE(use_cw_file)dnl
39 FEATURE(use_ct_file)dnl
40 FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl
41 FEATURE(`access_db',`hash -o /etc/mail/access.db')dnl
42 FEATURE(`blacklist_recipients')dnl
43 EXPOSED_USER(`root')dnl
44 dnl This changes sendmail to only listen on the loopback device 127.0.0.1
45 dnl and not on any other network devices. Comment this out if you want
46 dnl to accept email over the network.
47 DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')
48 dnl NOTE: binding both IPv4 and IPv6 daemon to the same port requires
49 dnl a kernel patch
50 dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')
51 dnl We strongly recommend to comment this one out if you want to protect
52 dnl yourself from spam. However, the laptop and users on computers that do
53 dnl not have 24x7 DNS do need this.
54 FEATURE(`accept_unresolvable_domains')dnl
55 dnl FEATURE(`relay_based_on_MX')dnl
56 MAILER(smtp)dnl
57 MAILER(procmail)dnl
58 Cwlocalhost.localdomain

위의 파일 내용 중 25,26번째 줄을 다음과 같이 수정합니다.

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

그리고, 47번째 줄의 내용 중 Addr=0.0.0.0 이 되어 있는지 확인하고 아니면 위와 같이 수정합니다.

/etc/mail/sendmail.mc 파일이 수정되었으면 수정된 내용을 /etc/sendmail.cf 에 적용하여야 합니다.

[root@ns root]# m4 /etc/mail/sendmail.mc > /etc/sendmail.cf

만일 위의 명령이 제대로 수행되지 않는다면 sendmail-cf 패키지가 설치되지 않았기 때문이므로, 이 패키지를 OS 시디에서 찾아 설치해 주어야 합니다.

/etc/sendmail.cf가 적용이 되었다면, sendmail 데몬을 재 실행합니다.

[root@ns root]# /etc/rc.d/init.d/sendmail restart
sendmail를 종료하고 있습니다: [ 확인 ]
sendmail (을)를 시작합니다: [ 확인 ]
[root@ns root]#

이것으로 SMTP 인증 설정이 모두 끝났습니다.
메일 클라이언트에서 SMTP 인증이 제대로 되는지 확인만 하면 됩니다.
아웃룩 익스프레스에서 계정 추가후 [서버] 설정 탭에서 [보내는 메일 서버] 에서 [인증필요]를 체크를 한 후 메일을 보내 봅니다.
아이디와 패스워드를 물어 보는 창에, 인증을 하면 메일이 발송되는 것을 볼 수 있을 것입니다.


아래의 기능은 메일이 올 경우 헤더 부분을 검색하여 해당 단어가 있는 내용을 spam으로 간주
처리하는 구문입니다.

1. hcode라는 rpm이 필요합니다. 이 패키지는 한컴리눅스 3.1에 기본적으로 포함되어 있습니다.
2. 설치를 한 후 /etc/procmailrc파일을 확인합니다. 만약 없다면 추가합니다.


/etc/procmailrc파일

LOGFILE=/var/log/procmail
VERBOSE=no
PATH=/usr/bin:/usr/local/bin:/bin
SHELL=/bin/sh

#인코드되어 날아오는 헤더를 디코드 하는 부분.
:0 Efhw
*^(Subject|From|Cc):.*=?EUC-KR?(B|Q)?
| formail -c | hcode -dk -m

:0 Efhw
*^(Subject|From|Cc):.*=?ks_c_5601-1987?(B|Q)?
| formail -c | hcode -dk -m

#제목부분에 지정된 문자열이 걸리면, spam계정으로 메일전송
:0
* ^Subject: .*(광고|광^고|광-고|성인정보|몰카|포르노)
/var/spool/mail/spam

:0
* ^Subject: .*[광.*고]
/var/spool/mail/spam

:0
* ^Subject: .*[성.*인]
/var/spool/mail/spam

:0
* ^Subject: .*[廣.*告]
/var/spool/mail/spam

#:0
#* ^Subject: .*[홍.*보]
#/var/spool/mail/spam

:0
* ^Subject: .*(광.*고)
/var/spool/mail/spam

#:0
#* ^Subject: .*(홍.*보)
#/var/spool/mail/spam

:0
* ^Subject: .*(廣.*告)
/var/spool/mail/spam

:0
* ^Subject: .*<광.*고>
/var/spool/mail/spam

:0
* ^Subject: .*<廣.*告>
/var/spool/mail/spam
 
virtusertable을 이용한 가상 호스트 메일 설정
virtusertable은 하나의 계정을 여러개의 가상호스트메일로 만들어 줄수 있습니다.
설정은 다음과 같이 합니다.

webmaster@aaa.com     aaa
webmaster@bbb.com     bbb
webmaster@ccc.com     ccc

위 경우 webmaster@aaa.com으로 온 메일은 aaa로 가게 되며... webmaster@bbb.com으로 
온 메일은 bbb로 가게 됩니다. 

위와 같이 쓰는 이유 중 하나는 웹호스팅을 할 경우 웹 마스터의 경우 모두 webmaster이라는 
메일계정으로 메일을 받고자 하는 경우가 많습니다. 이 때 시스템은 webmaster란 계정은 1개만 
생성되므로 virtusertable을 사용하여 메일을 설정하는 것이 유리합니다.

 
그룹메일 만들기
한번에 여러개의 메일을 보낼 경우 다음과 같은 형식으로 메일을 등록합니다.

1. /etc/aliases파일을 열어 다음 형식으로 작성합니다.

    test::include: /etc/sendmail/grup/test.txt
    master::include: /etc/sendamil/grup/master.txt

2. 작성 후  /etc/sendmail/grup/test.txt, /etc/sendmail/grup/test.txt
   파일을 만들고 메일을 차례차례 적어 넣습니다.

3. 예) /etc/sendmail/grup/test.txt내용

   a@aaa.com
   b@hanmail.net
   c@hancom.com

4. sendmail데몬을 재 실행합니다.
    
    /etc/rc.d/init.d/sendmail restart

5. 이제 test라는 메일계정을 이용해 메일을 보낼 경우 해당 되는 메일계정으로
   메일이 나갑니다.
 
6. 메일 반송을 받지 않을 경우 test, master등의 메일 계정은 숨은 참조로 보내야 합니다
Comments