티스토리 뷰

1. sudo apt-get update

2. sudo apt install -y mailutils

여기까지만 하면 일단 설치는 완료

이후에

3. Postfix configuration 화면에서 internet site 선택 후에 도메인명 입력

 

4. sudo nano /etc/postfix/main.cf

inet_interfaces = all 부분을

inet_interfaces = loopback-only 로 수정

 

5. do systemctl restart postfix

 

일단 여기까지 처리하면 발신은 가능함

 

php로 테스트

 

<?php
$to      = 'choi5781@nate.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@icdn.ml' . "\r\n" .
    'Reply-To: webmaster@icdn.ml' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);
?>

 

6. 수신 관련해서는 아래 사이트 참조해서 작업해볼것

https://hiseon.me/linux/ubuntu/ubuntu-mail-server/

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/03   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함