우분투에서
$ sudo apt-get install mailutils libsasl2-2 ca-certificates libsasl2-modules
명령어로 관련패키지를 설치한뒤
$ sudo apt-get install postfix
명령어로 포스트픽스를 설치한 뒤 /etc/postfix/main.cf 파일의 설정을 맨 밑에와 같이 해 주었는데도 메일서버가 동작하지를 않네요.
이상하게 다음의 mail 명령어로 메일을 보내도 프롬프트가 뜨면서 메일이 전달이 안되네요.
linaro@linaro-ubuntu-desktop:~$ mail blrun@chol.com
Cc:
Subject: 테스트
이것은 테스트 메일입니다...
이 메일이 보내지는지 확인합니다.
^d
linaro@linaro-ubuntu-desktop:~$
====================================================================================
[/etc/postfix/main.cf]
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = linaro-ubuntu-desktop, localhost.localdomain, , localhost
relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_use_tls = yes
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
====================================================================================
이 설정 후에 다음 명령어로 다음과 같이 패스워드 설정을 해주었고
$ sudo nano /etc/postfix/sasl_passwd
[smtp.gmail.com]:587 blrun72@gmail.com:PASSWORD
^x
아래와 같은 명령어로 권한 변경 및 Postfix 설정 업데이트를 해주었습니다.
$ sudo chmod 400 /etc/postfix/sasl_passwd
$ sudo postmap /etc/postfix/sasl_passwd
그 다음 인증서 오류를 회피하기 위해 마지막으로 아래의 명령을 실행해 주었습니다.
$ cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem | sudo tee -a /etc/postfix/cacert.pem
최종적으로 $ sudo /etc/init.d/postfix reload 명령어로 서비스를 리스타트해 준 다음 메일을 보내봤습니다만 제대로 메일이 전달이 안됩니다.
요새 이 문제 때문에 구글링을 계속 해보았는데도 도무지 해결점이 나오지 않네요. 이게 예전엔 $ sudo apt-get install postfix 와 $ sudo dpkg-reconfigure postfix 설정만으로 메일서버가 동작을 했는데 최근 우분투 업데이트 이후 메일서버가 갑자기 동작하지 않아서 상기 포스트 대로 포스트픽스 설정을 해주었는데도 이상하게 메일 서버가 동작하지 않습니다. 그 우분투 업데이트 이후 처음엔 아예 mail 명령어가 존재하지 않는다는 에러가 떠서 상기 포스트 대로 설정을 다 하고 나니 mail 명령어는 먹는데 이상하게 수신 메일을 열어보면 메일이 도착한게 없습니다. 여러 멜 주소를 다 테스트 해보았는데 마찬가지 입니다.
혹시 이 문제 해결법 아시는 분 있나요? 혹시 우분투 업데이트 후 새로 생긴 버그는 아닌지 의심스럽기도 합니다.




덧글