사이트 이전 sangchul.kr






사이트 이전 sangchul.kr




Squirrelmail Install 메일서버

1. apache 설치(httpd)

[root@sangchul server]# yum install httpd

 

2. mysql, mysql-server 설치

[root@sangchul server]# yum install mysql mysql-server

 

3. php 설치

[root@sangchul server]# yum install php

 

4. php-mysql 연동 설치

[root@sangchul server]# yum install php-mysql

 

5. SquirrelMail 설치

[root@sangchul server]# yum -y install php-mbstring

[root@sangchul server]# yum -y install squirrelmail

[root@sangchul server]# /usr/share/squirrelmail/config/conf.pl

SquirrelMail Configuration : Read: config.php (1.4.0)

---------------------------------------------------------

Main Menu --

1.  Organization Preferences

2.  Server Settings

3.  Folder Defaults

4.  General Options

5.  Themes

6.  Address Books

7.  Message of the Day (MOTD)

8.  Plugins

9.  Database

10. Languages

 

D.  Set pre-defined settings for specific IMAP servers

 

C   Turn color off

S   Save data

Q   Quit

 

Command >> 2

 

SquirrelMail Configuration : Read: config.php (1.4.0)

---------------------------------------------------------

Server Settings

 

General

-------

1.  Domain                 : localhost

2.  Invert Time             : false

3.  Sendmail or SMTP       : Sendmail

 

A.  Update IMAP Settings   : localhost:143 (uw)

B.  Change Sendmail Config : /usr/sbin/sendmail

 

R   Return to Main Menu

C   Turn color off

S   Save data

Q   Quit

 

Command >> 1

 

The domain name is the suffix at the end of all email addresses.  If

for example, your email address is jdoe@example.com, then your domain

would be example.com.

 

[localhost]: sangchul.kr

 

SquirrelMail Configuration : Read: config.php (1.4.0)

---------------------------------------------------------

Server Settings

 

General

-------

1.  Domain                 : sangchul.kr

2.  Invert Time            : false

3.  Sendmail or SMTP       : Sendmail

 

A.  Update IMAP Settings   : localhost:143 (uw)

B.  Change Sendmail Config : /usr/sbin/sendmail

 

R   Return to Main Menu

C   Turn color off

S   Save data

Q   Quit

 

Command >> A

 

SquirrelMail Configuration : Read: config.php (1.4.0)

---------------------------------------------------------

Server Settings

 

General

-------

1.  Domain                 : sangchul.kr

2.  Invert Time            : false

3.  Sendmail or SMTP       : Sendmail

 

IMAP Settings

--------------

4.  IMAP Server            : localhost

5.  IMAP Port              : 143

6.  Authentication type    : login

7.  Secure IMAP (TLS)      : false

8.  Server software        : uw

9.  Delimiter              : /

 

B.  Change Sendmail Config : /usr/sbin/sendmail

H.  Hide IMAP Server Settings

 

R   Return to Main Menu

C   Turn color off

S   Save data

Q   Quit

 

Command >> 4

 

This is the hostname where your IMAP server can be contacted.

[localhost]: sangchul.kr

 

SquirrelMail Configuration : Read: config.php (1.4.0)

---------------------------------------------------------

Server Settings

 

General

-------

1.  Domain                 : sangchul.kr

2.  Invert Time            : false

3.  Sendmail or SMTP       : Sendmail

 

IMAP Settings

--------------

4.  IMAP Server            : sangchul.kr

5.  IMAP Port              : 143

6.  Authentication type    : login

7.  Secure IMAP (TLS)      : false

8.  Server software        : uw

9.  Delimiter              : /

 

B.  Change Sendmail Config : /usr/sbin/sendmail

H.  Hide IMAP Server Settings

 

R   Return to Main Menu

C   Turn color off

S   Save data

Q   Quit

 

Command >> 8

 

Each IMAP server has its own quirks.  As much as we tried to stick

to standards, it doesn't help much if the IMAP server doesn't follow

the same principles.  We have made some work-arounds for some of

these servers.  If you would like to use them, please select your

IMAP server.  If you do not wish to use these work-arounds, you can

set this to "other", and none will be used.

    cyrus       = Cyrus IMAP server

    uw          = University of Washington's IMAP server

    exchange    = Microsoft Exchange IMAP server

    courier     = Courier IMAP server

    macosx      = Mac OS X Mailserver

    hmailserver = hMailServer

    other       = Not one of the above servers

[uw]: other

 

SquirrelMail Configuration : Read: config.php (1.4.0)

---------------------------------------------------------

Server Settings

 

General

-------

1.  Domain                 : sangchul.kr

2.  Invert Time             : false

3.  Sendmail or SMTP       : Sendmail

 

IMAP Settings

--------------

4.  IMAP Server            : sangchul.kr

5.  IMAP Port              : 143

6.  Authentication type    : login

7.  Secure IMAP (TLS)      : false

8.  Server software        : other

9.  Delimiter              : /

 

B.  Change Sendmail Config : /usr/sbin/sendmail

H.  Hide IMAP Server Settings

 

R   Return to Main Menu

C   Turn color off

S   Save data

Q   Quit

 

Command >> S

 

Data saved in config.php

Press enter to continue...

 

SquirrelMail Configuration : Read: config.php (1.4.0)

---------------------------------------------------------

Server Settings

 

General

-------

1.  Domain                 : sangchul.kr

2.  Invert Time            : false

3.  Sendmail or SMTP       : Sendmail

 

IMAP Settings

--------------

4.  IMAP Server            : sangchul.kr

5.  IMAP Port              : 143

6.  Authentication type    : login

7.  Secure IMAP (TLS)      : false

8.  Server software        : other

9.  Delimiter              : /

 

B.  Change Sendmail Config : /usr/sbin/sendmail

H.  Hide IMAP Server Settings

 

R   Return to Main Menu

C   Turn color off

S   Save data

Q   Quit

 

Command >> Q

 

Exiting conf.pl.

You might want to test your configuration by browsing to

http://your-squirrelmail-location/src/configtest.php

Happy SquirrelMailing!

 

웹 접속

http://mail.sangchul.kr/webmail/src/login.php


(http 설정 /etc/httpd/conf.d/squirrelmail.conf)

[root@sangchul ~]# cat /etc/httpd/conf.d/squirrelmail.conf

#

# SquirrelMail is a webmail package written in PHP.

#

 

Alias /webmail /usr/share/squirrelmail

 

웹 접속

URL : http://webmail.sangchul.kr

[root@sangchul ~]# tail /etc/httpd/conf/httpd.conf

# The first VirtualHost section is used for requests without a known

# server name.

#

<VirtualHost *:80>

    ServerAdmin webmaster@sangchul.kr

    DocumentRoot /usr/share/squirrelmail

    ServerName webmail.sangchul.kr

    ErrorLog logs/webmail.sangchul.kr-error_log

    CustomLog logs/webmail.sangchul.kr-access_log common

</VirtualHost>

 

 


Qmail Install 메일서버

(netqmail-1.06, ucspi-tcp-0.88, daemontools-0.76)

 

Qmail 관련 소스 다운로드

- qmail

wget http://www.qmail.org/netqmail-1.06.tar.gz

- ucspi-tcp

wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz

- daemontools

wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz

wget http://www.lug.or.kr/files/centos_book/qmail/qmail-date-localtime.patch

wget http://inoa.net/qmail-tls/netqmail-1.06-tls-20110119.patch

 

Sendmail 서비스 종료

[root@sangchul netqmail-1.05]# /etc/init.d/saslauthd stop

saslauthd 를 정지 중:                                      [실패]

[root@sangchul netqmail-1.05]# chkconfig --del

[root@sangchul netqmail-1.05]# chkconfig --list | grep saslauthd

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

[root@sangchul netqmail-1.05]# chkconfig --del saslauthd

[root@sangchul netqmail-1.05]# chkconfig --list | grep saslauthd

[root@sangchul netqmail-1.05]#

[root@sangchul netqmail-1.05]# chkconfig --list | grep dovecot

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

[root@sangchul netqmail-1.05]# chkconfig --del dovecot

[root@sangchul netqmail-1.05]# chkconfig --list | grep dovecot

[root@sangchul netqmail-1.05]#

[root@sangchul netqmail-1.05]# /etc/init.d/sendmail stop

sm-client을 종료 중:                                       [  OK  ]

sendmail를 종료 중:                                       [  OK  ]

 

ucspi-tcp 설치

[root@sangchul qmail]# tar xvfz ucspi-tcp-0.88.tar.gz

[root@sangchul qmail]# cd ucspi-tcp-0.88

[root@sangchul ucspi-tcp-0.88]# patch -p1 < /usr/local/src/qmail/netqmail-1.05/other-patches/ucspi-tcp-0.88.errno.patch

[root@sangchul ucspi-tcp-0.88]# patch -p1 < /usr/local/src/qmail/netqmail-1.05/other-patches/ucspi-tcp-0.88.a_record.patch

[root@sangchul ucspi-tcp-0.88]# patch -p1 < /usr/local/src/qmail/netqmail-1.05/other-patches/ucspi-tcp-0.88.nodefaultrbl.patch

[root@sangchul ucspi-tcp-0.88]# make

[root@sangchul ucspi-tcp-0.88]# make setup check

 

daemontools 설치

[root@sangchul ucspi-tcp-0.88]# cd ..

[root@sangchul qmail]# mkdir -p /package

[root@sangchul qmail]# chmod 1755 /package/

[root@sangchul qmail]# tar xvfz daemontools-0.76.tar.gz -C /package/

[root@sangchul qmail]# cd /package/admin/daemontools-0.76/

[root@sangchul daemontools-0.76]# vi src/error.h

/- Public domain. *-

#include <errno.h>                  <<<<< 추가

#ifndef ERROR_H

#define ERROR_H

[root@sangchul daemontools-0.76]# package/install

 

qmail 설치

[root@sangchul daemontools-0.76]# cd /usr/local/src/qmail/netqmail-1.05

[root@sangchul netqmail-1.05]# mkdir /var/qmail

[root@sangchul netqmail-1.05]# ./collate.sh

[root@sangchul netqmail-1.05]# cd netqmail-1.05

[root@sangchul netqmail-1.05]# groupadd nofiles

[root@sangchul netqmail-1.05]# useradd -g nofiles -d /var/qmail/alias alias

[root@sangchul netqmail-1.05]# useradd -M -g nofiles -d /var/qmail qmaild

[root@sangchul netqmail-1.05]# useradd -M -g nofiles -d /var/qmail qmaill

[root@sangchul netqmail-1.05]# useradd -M -g nofiles -d /var/qmail qmailp

[root@sangchul netqmail-1.05]# groupadd qmail

[root@sangchul netqmail-1.05]# useradd -M -g qmail -d /var/qmail qmailq

[root@sangchul netqmail-1.05]# useradd -M -g qmail -d /var/qmail qmailr

[root@sangchul netqmail-1.05]# useradd -M -g qmail -d /var/qmail qmails

[root@sangchul netqmail-1.05]# patch -p1 < /usr/local/src/qmail/qmail-date-localtime.patch

[root@sangchul netqmail-1.05]# patch -p0 < /usr/local/src/qmail/netqmail-1.05-tls-smtpauth-20070417.patch

[root@sangchul netqmail-1.05]# make

[root@sangchul netqmail-1.05]# make setup check

[root@sangchul netqmail-1.05]# make cert

Generating a 1024 bit RSA private key

.............++++++

..........++++++

writing new private key to '/var/qmail/control/servercert.pem'

-----

You are about to be asked to enter information that will be incorporated

into your certificate request.

What you are about to enter is what is called a Distinguished Name or a DN.

There are quite a few fields but you can leave some blank

For some fields there will be a default value,

If you enter '.', the field will be left blank.

-----

Country Name (2 letter code) [GB]:KR

State or Province Name (full name) [Berkshire]:Seoul

Locality Name (eg, city) [Newbury]:guro-gu

Organization Name (eg, company) [My Company Ltd]:sangchul_home

Organizational Unit Name (eg, section) []:lab

Common Name (eg, your name or your server's hostname) []:sangchul.kr

Email Address []:anti1346@nate.com

[root@sangchul netqmail-1.05]#

[root@sangchul netqmail-1.05]# make tmprsadh

[root@sangchul netqmail-1.05]# ./config-fast mail.sangchul.kr

 

supervise script 작성

[root@sangchul netqmail-1.05]# vi /var/qmail/rc

#!/bin/sh

 

# Using splogger to send the log through syslog.

# Using qmail-local to deliver messages to ~/Maildir/ by default.

 

exec env - PATH="/var/qmail/bin:$PATH" \

qmail-start ./Maildir/ splogger qmail

 

[root@sangchul netqmail-1.05]# chmod 755 /var/qmail/rc

[root@sangchul netqmail-1.05]# mkdir -p /var/qmail/supervise/qmail-send/log

[root@sangchul netqmail-1.05]# mkdir -p /var/qmail/supervise/qmail-smtpd/log

[root@sangchul netqmail-1.05]# chmod +t /var/qmail/supervise/qmail-send

[root@sangchul netqmail-1.05]# chmod +t /var/qmail/supervise/qmail-smtpd

 

[root@sangchul netqmail-1.05]# vi /var/qmail/supervise/qmail-send/run

#!/bin/sh

 

exec /var/qmail/rc

 

[root@sangchul netqmail-1.05]# vi /var/qmail/supervise/qmail-send/log/run

!/bin/sh

 

exec /usr/local/bin/setuidgid qmaill \

     /usr/local/bin/multilog t /var/log/qmail

 

[root@sangchul netqmail-1.05]# vi /var/qmail/supervise/qmail-smtpd/run

#!/bin/sh

 

Q_UID=`id -u qmaild`

Q_GID=`id -g qmaild`

 

exec /usr/local/bin/softlimit -m 20000000 \

     /usr/local/bin/tcpserver -vRHl 0 -x /etc/tcp.smtp.cdb \

     -u $Q_UID -g $Q_GID 0 25 /var/qmail/bin/qmail-smtpd 2>&1

 

[root@sangchul netqmail-1.05]# vi /var/qmail/supervise/qmail-smtpd/log/run

#!/bin/sh

 

exec /usr/local/bin/setuidgid qmaill \

     /usr/local/bin/multilog t /var/log/qmail/smtpd

 

[root@sangchul netqmail-1.05]# chmod 755 /var/qmail/supervise/qmail-send/run

[root@sangchul netqmail-1.05]# chmod 755 /var/qmail/supervise/qmail-send/log/run

[root@sangchul netqmail-1.05]# chmod 755 /var/qmail/supervise/qmail-smtpd/run

[root@sangchul netqmail-1.05]# chmod 755 /var/qmail/supervise/qmail-smtpd/log/run

 

[root@sangchul netqmail-1.05]# mkdir -p /var/log/qmail/smtpd

[root@sangchul netqmail-1.05]# chown qmaill /var/log/qmail /var/log/qmail/smtpd

 

[root@sangchul netqmail-1.05]# vi /etc/tcp.smtp

127.0.0.1:allow,RELAYCLIENT=""

192.168.0.100:allow,RELAYCLIENT=""

 

[root@sangchul netqmail-1.05]# tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp

qmailctl script 작성

[root@sangchul netqmail-1.05]# vi /etc/rc.d/init.d/qmail

#!/bin/sh

 

# For RedHat chkconfig

# chkconfig: - 80 30

# description: the qmail MTA

 

PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin

export PATH

 

#QMAILDUID=`id -u qmaild`

#NOFILESGID=`id -g qmaild`

 

case "$1" in

  start)

    echo "Starting qmail"

    if svok /service/qmail-send ; then

      svc -u /service/qmail-send /service/qmail-send/log

    else

      echo "qmail-send supervise not running"

    fi

    if svok /service/qmail-smtpd ; then

      svc -u /service/qmail-smtpd /service/qmail-smtpd/log

    else

      echo "qmail-smtpd supervise not running"

    fi

    if [ -d /var/lock/subsys ]; then

      touch /var/lock/subsys/qmail

    fi

    ;;

  stop)

    echo "Stopping qmail..."

    echo "  qmail-smtpd"

    svc -d /service/qmail-smtpd /service/qmail-smtpd/log

    echo "  qmail-send"

    svc -d /service/qmail-send /service/qmail-send/log

    if [ -f /var/lock/subsys/qmail ]; then

      rm /var/lock/subsys/qmail

    fi

    ;;

  stat)

    svstat /service/qmail-send

    svstat /service/qmail-send/log

    svstat /service/qmail-smtpd

    svstat /service/qmail-smtpd/log

    qmail-qstat

    ;;

  doqueue|alrm|flush)

    echo "Flushing timeout table and sending ALRM signal to qmail-send."

    /var/qmail/bin/qmail-tcpok

    svc -a /service/qmail-send

    ;;

  queue)

    qmail-qstat

    qmail-qread

    ;;

  reload|hup)

    echo "Sending HUP signal to qmail-send."

    svc -h /service/qmail-send

    ;;

  pause)

    echo "Pausing qmail-send"

    svc -p /service/qmail-send

    echo "Pausing qmail-smtpd"

    svc -p /service/qmail-smtpd

    ;;

  cont)

    echo "Continuing qmail-send"

    svc -c /service/qmail-send

    echo "Continuing qmail-smtpd"

    svc -c /service/qmail-smtpd

    ;;

  restart)

    echo "Restarting qmail:"

    echo "* Stopping qmail-smtpd."

    svc -d /service/qmail-smtpd /service/qmail-smtpd/log

    echo "* Sending qmail-send SIGTERM and restarting."

    svc -t /service/qmail-send /service/qmail-send/log

    echo "* Restarting qmail-smtpd."

    svc -u /service/qmail-smtpd /service/qmail-smtpd/log

    ;;

  cdb)

    tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp

    chmod 644 /etc/tcp.smtp.cdb

    echo "Reloaded /etc/tcp.smtp."

    ;;

  help)

    cat <<HELP

   stop -- stops mail service (smtp connections refused, nothing goes out)

  start -- starts mail service (smtp connection accepted, mail can go out)

  pause -- temporarily stops mail service (connections accepted, nothing leaves)

   cont -- continues paused mail service

   stat -- displays status of mail service

    cdb -- rebuild the tcpserver cdb file for smtp

restart -- stops and restarts smtp, sends qmail-send a TERM & restarts it

doqueue -- schedules queued messages for immediate delivery

 reload -- sends qmail-send HUP, rereading locals and virtualdomains

  queue -- shows status of queue

   alrm -- same as doqueue

  flush -- same as doqueue

    hup -- same as reload

HELP

    ;;

  *)

    echo "Usage: $0 {start|stop|restart|doqueue|flush|reload|stat|pause|cont|cdb|queue|help}"

    exit 1

    ;;

esac

 

exit 0

 

[root@sangchul netqmail-1.05]# chmod 755 /etc/rc.d/init.d/qmail

[root@sangchul netqmail-1.05]# chkconfig --add qmail

[root@sangchul netqmail-1.05]# chkconfig --level 35 qmail on

[root@sangchul netqmail-1.05]# chkconfig --list|grep qmail

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

 

[root@sangchul netqmail-1.05]# mv /usr/lib/sendmail /usr/lib/sendmail.org

[root@sangchul netqmail-1.05]# mv /usr/sbin/sendmail /usr/sbin/sendmail.org

[root@sangchul netqmail-1.05]# ln -s /var/qmail/bin/sendmail /usr/lib

[root@sangchul netqmail-1.05]# ln -s /var/qmail/bin/sendmail /usr/sbin

[root@sangchul netqmail-1.05]# echo master > /var/qmail/alias/.qmail-root

[root@sangchul netqmail-1.05]# echo master > /var/qmail/alias/.qmail-postmaster

[root@sangchul netqmail-1.05]# echo master > /var/qmail/alias/.qmail-mailer-daemon

[root@sangchul netqmail-1.05]# chmod 644 /var/qmail/alias/.qmail*

 

[root@sangchul netqmail-1.05]# /var/qmail/bin/maildirmake /etc/skel/Maildir

 

[root@sangchul netqmail-1.05]# /etc/rc.d/init.d/qmail start

Starting qmail

 

Test the Installation

[root@sangchul netqmail-1.05]# telnet localhost 25

Trying 127.0.0.1...

Connected to localhost.localdomain (127.0.0.1).

Escape character is '^]'.

220 mail.sangchul.kr ESMTP

 


[sendmail] Relaying denied. IP name lookup failed 메일서버

sendmail access error







[root@dns1 ~]# tail /var/log/maillog
Mar 30 02:21:29 dns1 dovecot: pop3-login: Login: user=<scbyun>, method=PLAIN, rip=192.168.43.237, lip=192.168.43.8
Mar 30 02:21:29 dns1 dovecot: POP3(scbyun): Disconnected: Logged out top=0/0, retr=0/0, del=0/1, size=579
Mar 30 02:22:53 dns1 sendmail[2463]: p2THMouO002463: ruleset=check_rcpt, arg1=<anti1346@gmail.com>, relay=[192.168.43.237], reject=550 5.7.1 <anti1346@gmail.com>... Relaying denied. IP name lookup failed [192.168.43.237]

[해결 방법]
[root@dns1 ~]# cat /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...
Connect:localhost.localdomain           RELAY
Connect:localhost                       RELAY
Connect:127.0.0.1                       RELAY

Connect:mail.sangchul.kr                RELAY
Connect:sangchul.kr                     RELAY

Connect:192.168.43                      RELAY
[root@dns1 ~]#

[root@dns1 ~]# /usr/sbin/makemap hash /etc/mail/access < /etc/mail/access
(sendmail 재시작 없이 바로 적용됨)


Sendmail 및 SquirrelMail 웹메일 설치하기-1 메일서버

Sendmail 및 SquirrelMail 웹메일 설치하기

1. Sendmail 설치
1.1. 패키지 설치
sendmail, sendmail-cf
[root@mail ~]# rpm -qa | grep sendmail
sendmail-8.13.8-8.el5
[root@mail ~]# yum -y install sendmail sendmail-cf

1.2. Sendmail 서버 환경 설정
1.2.1. sendmail.cf sendmail.mc 백업
[root@mail mail]# pwd
/etc/mail
[root@mail mail]# mv sendmail.cf sendmail.cf.org
[root@mail mail]# cp sendmail.mc sendmail.mc.org

1.2.2. sendmail.mc 수정(smtp 사용자 인증 메커니증 설정)
[root@mail mail]# vi sendmail.mc
<변경 전 : 주석(dnl) 제거>
     52 dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
     53 dnl define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
<변경 후>
     52 TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
     53 define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl

<변경 전 : 릴레이 IP 수정>
    116 DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
<변경 후>
    116 DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl

1.2.3. sendmail.cf 생성
m4 유틸리티를 사용하여 sendmail.cf 파일 생성
[root@mail mail]# m4 sendmail.mc > sendmail.cf

1.2.4. sendmail.cf 수정
[root@mail mail]# vi sendmail.cf
<변경 전 : 할당받은 도메인 변경>
     95 #Dj$w.Foo.COM
<변경 후>
     95 Djmail.sangchul.kr
※ 도메인을 설정할 시에는 /etc/access, /etc/mail/local-host-names 파일에도 도메인을 입력해 놓아야 한다.

1.2.5. access파일 및 local-host-names파일 수정
[root@mail ~]# vi /etc/mail/access
Connect:127.0.0.1                       RELAY

Connect:mail.sangchul.kr                RELAY
Connect:192.168.0.50                    RELAY

[root@mail mail]# vi local-host-names
# local-host-names - include all aliases for your machine here.
mail.sangchul.kr

1.3. 메일 접속 테스트
[root@mail mail]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 mail.sangchul.kr ESMTP Sendmail 8.13.8/8.13.8; Fri, 10 Dec 2010 03:06:40 +0900
quit
221 2.0.0 mail.sangchul.kr closing connection
Connection closed by foreign host.
[root@mail mail]#

[TIP] 릴레이 설정 확인 방법
[root@mail mail]# telnet relay-test.mail-abuse.org


하드디스크에 배드블록의 존재유무 점검 리눅스

배드블록 검사

[root@ns2 ~]# badblocks -v /dev/sda6
Checking blocks 0 to 1566306
Checking for bad blocks (read-only test): done
Pass completed, 0 bad blocks found.

[root@ns2 ~]#badblocks -v -o badblock.txt /dev/sda2
Checking blocks 0 to 4096575
Checking for bad blocks (read-only test): done
Pass completed, 0 bad blocks found.

-o 옵션 : 지정된 파일에 결과를 저장하다

배드블록이 있으면 inode 주소가 출력 됨


1 2 3