XE(라이믹스)

7. Sendmail 설치하기

KoreanVlog 2021. 1. 3. 19:01
반응형

1. Sendmail 설치

sudo apt-get install sendmail

SSH에서 명령어를 입력합니다.

 

After this operation, 5185 kB of additional disk space will be used. 
Do you want to continue? [Y/n] Y

 

sudo sendmailconfig

SSH에서 명령어를 입력합니다.

 

Configure sendmail with the existing /etc/mail/sendmail.conf? [Y] Y

Configure sendmail with the existing /etc/mail/sendmail.mc? [Y] Y

Reload the running sendmail now with the new configuration? [Y] Y

 

sudo nano /etc/php/7.2/fpm/php.ini

명령어를 입력 후 컨트롤+W 눌리고 sendmail_path 를 검색합니다.

 

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
sendmail_path = "env -i /usr/sbin/sendmail -t -i"

앞에 ; 를 삭제 후 sendmail_path = 뒤에 "env -i /usr/sbin/sendmail -t -i" 를 입력합니다.

컨트롤+X 눌리고 Y 눌리고 ENTER를 칩니다.

 

sudo systemctl restart php7.2-fpm

PHP-FPM을 재시작 합니다.

 

sudo service sendmail start

Sendmail을 구동합니다.

 

sudo service sendmail status

Active: active (running) since Mon 2020-09-21 12:50:27 KST; 1 weeks 1 days ag 이 나오면 정상적으로 작동하는 것입니다. 컨트롤+C로 빠져나옵니다.

 

(echo "Subject: 오라클 메일에서 테스트 완성"; echo ; echo "Oracle Email Test 완성") | sendmail -i -v 나의 메일 주소

나의 메일 주소에 테스트 메일 받을 메일주소를 입력해서 메일이 정상적으로 온다면 설치 완료입니다.

 

 

+

본 게시글은 아래 출처내용을 조금 수정보완한 내용입니다.

출처 : https://itreport.tistory.com/624

반응형