서버 설정 · 2 min read · Feb 12, 2026

완벽한 설정 - SUSE 9.2 - 페이지 5

Postfix With SMTP-AUTH And TLS

apt-get install cyrus-sasl cyrus-sasl-crammd5 cyrus-sasl-devel cyrus-sasl-digestmd5 cyrus-sasl-gssapi cyrus-sasl-otp cyrus-sasl-plain cyrus-sasl-saslauthd

chkconfig –add saslauthd
/etc/init.d/saslauthd start

mkdir /etc/postfix/ssl
cd /etc/postfix/ssl/
openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024
chmod 600 smtpd.key
openssl req -new -key smtpd.key -out smtpd.csr
openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt
openssl rsa -in smtpd.key -out smtpd.key.unencrypted
mv -f smtpd.key.unencrypted smtpd.key
openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650

postconf -e ‘mydomain = example.com’
postconf -e ‘myhostname = server1.$mydomain’
postconf -e ‘smtpd_sasl_local_domain =’
postconf -e ‘smtpd_sasl_auth_enable = yes’
postconf -e ‘smtpd_sasl_security_options = noanonymous’
postconf -e ‘broken_sasl_auth_clients = yes’
postconf -e ‘smtpd_recipient_restrictions =
permit_sasl_authenticated,permit_mynetworks,check_relay_domains’
postconf -e ‘inet_interfaces = all’
postconf -e ‘alias_maps = hash:/etc/aliases’
postconf -e ‘smtpd_tls_auth_only = no’
postconf -e ‘smtp_use_tls = yes’
postconf -e ‘smtpd_use_tls = yes’
postconf -e ‘smtp_tls_note_starttls_offer = yes’
postconf -e ‘smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key’
postconf -e ‘smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt’
postconf -e ‘smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem’
postconf -e ‘smtpd_tls_loglevel = 1’
postconf -e ‘smtpd_tls_received_header = yes’
postconf -e ‘smtpd_tls_session_cache_timeout = 3600s’
postconf -e ‘tls_random_source = dev:/dev/urandom’

이제 Postfix를 재시작하십시오:

/etc/init.d/postfix restart

SMTP-AUTH와 TLS가 제대로 작동하는지 확인하려면 다음 명령을 실행하십시오:

telnet localhost 25

Postfix 메일 서버에 연결한 후 다음을 입력하십시오:

ehlo localhost

다음 줄이 보이면

250-STARTTLS

250-AUTH

모든 것이 정상입니다.

quit를 입력하여 시스템 셸로 돌아갑니다.

Courier-IMAP/Courier-POP3

Maildir 지원이 있는 POP3/IMAP 데몬을 사용하고 싶습니다. 그래서 Courier-IMAP과 Courier-POP3를 사용합니다.

apt-get install courier-imap fam-server

/etc/init.d/courier-authdaemon start
/etc/init.d/courier-imap start
/etc/init.d/courier-imap-ssl start
/etc/init.d/courier-pop3 start
/etc/init.d/courier-pop3-ssl start
chkconfig –add courier-authdaemon
chkconfig –add courier-imap
chkconfig –add courier-imap-ssl
chkconfig –add courier-pop3
chkconfig –add courier-pop3-ssl

그런 다음 Postfix를 구성하여 사용자의 Maildir로 이메일을 배달하도록 합니다:

postconf -e ‘home_mailbox = Maildir/‘
postconf -e ‘mailbox_command =’

/etc/init.d/postfix restart

참고: 시스템에서 ISPConfig를 사용할 계획이라면 이 작업을 수행할 필요가 없습니다. ISPConfig는 procmail 레시피를 사용하여 필요한 구성을 수행합니다. 그러나 ISPConfig 웹 인터페이스의 Management -> Settings -> EMail에서 Maildir*을 활성화해야 합니다.

Apache

apt-get install apache2 apache2-devel apache2-mod_perl apache2-mod_php4 apache2-prefork libapr0 perl-HTML-Parser perl-HTML-Tagset perl-Tie-IxHash perl-URI perl-libwww-perl php4

apt-get install php4-bcmath php4-zlib php4-yp php4-xslt php4-wddx php4-unixODBC php4-sysvshm php4-sysvsem php4-swf php4-sockets php4-snmp php4-shmop php4-session php4-servlet php4-qtdom php4-pgsql php4-pear php4-mysql php4-mime_magic php4-mhash php4-mcrypt php4-mcal php4-mbstring php4-ldap php4-imap php4-iconv php4-gmp php4-gettext php4-gd php4-ftp php4-filepro php4-fastcgi php4-exif php4-domxml php4-devel php4-dbx php4-dbase php4-curl php4-ctype php4-calendar php4-bz2 ImageMagick curl (1 line!)

chkconfig –add apache2

/etc/mime.types 파일을 편집합니다. 다음 2줄의 주석을 제거합니다:

| # application/x-httpd-php phtml pht php # application/x-perl pl pm |

/etc/apache2/httpd.conf 파일을 편집하고

DirectoryIndex index.html index.html.var

DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.php3 index.pl index.html.var**

로 변경합니다.

/etc/sysconfig/apache2 파일을 편집하고 APACHE_MODULES 줄에 rewrite를 추가합니다:

| APACHE_MODULES="access actions alias auth [...] setenvif ssl suexec userdir php4 php5 rewrite" |

또한 APACHE_SERVER_FLAGS 줄에 SSL을 추가합니다:

| APACHE_SERVER_FLAGS="SSL" |

그런 다음 실행합니다

SuSEconfig
/etc/init.d/apache2 start

Share: X/Twitter LinkedIn

새 게시물을 받은 편지함에서 받기

스팸은 없습니다. 언제든지 구독 해지 가능합니다.