yeonghoon.kim

  • 게시판
  • 갤러리
  • aws

CentOS8 postfix 설치 - centos8_postfix.yml

김영훈 2019.10.04 15:46 조회 수 : 321

---
- hosts: centos8_init
  user: ioniere
  become: yes

  vars:
    myhostname: mail.25ni.site
    mydomain: 25ni.site

  tasks:

  - name: postfix 및 saslauthd 설치
    yum:
      name: ['postfix', 'cyrus-sasl', 'cyrus-sasl-plain']
      state: latest

  - name: main.cf 복사
    get_url:
      url: http://data.yeonghoon.kim/centos8_postfix/source/main.cf
      dest: /etc/postfix/main.cf
      force: yes

  - name: master.cf 복사
    get_url:
      url: http://data.yeonghoon.kim/centos8_postfix/source/master.cf
      dest: /etc/postfix/master.cf
      force: yes


  - name: main.cf 설정 - 도메인 추가
    blockinfile:
      path: /etc/postfix/main.cf
      insertafter: EOF
      block: |
        myhostname = {{ myhostname }}
        mydomain = {{ mydomain }}

  - name: saslauthd 구동
    service:
      name: saslauthd
      state: started
      enabled: yes

  - name: postfix 구동
    service:
      name: postfix
      state: started
      enabled: yes

 -메일 테스트(계정 인증) - 성공

[root@25ni ~]# telnet 222.239.xxx.xxx 587
Trying 222.239.xxx.xxx...
Connected to 222.239.xxx.xxx.
Escape character is '^]'.
220 mail.25ni.site ESMTP Postfix
auth login
334 VXNlcm5hbWU6
id(base64형식)
334 UGFzc3dvcmQ6
password(base64형식)
235 2.7.0 Authentication successful
mail from:ioniere@25ni.site
250 2.1.0 Ok
rcpt to:me@yeonghoon.kim
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
abcdefg_test
.
250 2.0.0 Ok: queued as 5B15820F78E3
quit
221 2.0.0 Bye
Connection closed by foreign host.
 

 -메일 테스트(계정 인증 X) - 실패

[root@25ni ~]# telnet 222.239.xxx.xxx 587
Trying 222.239.xxx.xxx...
Connected to 222.239.xxx.xxx.
Escape character is '^]'.
220 mail.25ni.site ESMTP Postfix
mail from:ioniere@25ni.site
250 2.1.0 Ok
rcpt to:me@yeonghoon.kim
554 5.7.1 <mail.25ni.pe.kr[115.68.xxx.xxx]>: Client host rejected: Access denied
quit
221 2.0.0 Bye
Connection closed by foreign host.

 host, user, myhostname, mydomain은 상황에 맞게 수정 후 사용


방화벽 설정은 별도로 진행(25, 587)


  • 추천 0

  • 비추천 0
이 게시물을
목록

댓글 0

사진 및 파일 첨부

여기에 파일을 끌어 놓거나 왼쪽의 버튼을 클릭하세요.

파일 용량 제한 : 0MB (허용 확장자 : *.*)

업로드 중... (0%)

0개 첨부 됨 ( / )
 
번호 제목 글쓴이 날짜 조회 수
공지 2025 일본 여행 계획 김영훈 2024.10.10 1308
공지 현금, 저축, 투자, 지출, 예산, 보험 내역(2024-05-30) 김영훈 2024.03.10 1030
266 CentOS8 초기 설정 - centos8_init.yml 김영훈 2019.09.29 280
265 CentOS7 docker_ce 설치 - centos7_docker.yml 김영훈 2019.09.29 408
264 인터넷 익스플로러 cockpit 사용 불가 김영훈 2019.09.30 87
263 kvm virt-install 예시 김영훈 2019.09.30 381
262 CentOS8 npm 설치(저사양) - centos8_npm.yml 김영훈 2019.09.30 4694
261 CentOS8 MariaDB 저사양용 - /etc/my.cnf.d/mariadb-server.cnf 김영훈 2019.09.30 113
260 CentOS8 svn 설치 - centos8_svnserver.yml 김영훈 2019.09.30 135
259 CentOS8 vsftpd 설치 - centos8_vsftpd.yml 김영훈 2019.10.01 348
258 CentOS8 network-scripts 김영훈 2019.10.04 99
257 맥OS 미리알림 동기화 안되는 문제 김영훈 2019.10.04 150
» CentOS8 postfix 설치 - centos8_postfix.yml 김영훈 2019.10.04 321
255 도메인 만료 관련 피싱 메일 김영훈 2019.10.06 300
254 도메인 기관 이전 절차 김영훈 2019.10.06 409
253 제습기 - 신일 SDH-PM360 김영훈 2019.10.09 288
252 CentOS8 dovecot 설치 - centos8_dovecot.yml 김영훈 2019.10.10 370
251 CentOS8 nagios 설치(yum/dnf) 김영훈 2019.10.11 263
250 맥 카탈리나 사이드카 구동 시 속도 저하 문제 김영훈 2019.10.12 262
249 맥 카탈리나 업그레이드 이후 svn 작동 안되는 현상 해결법 김영훈 2019.10.13 131
248 마우스 - 애플 매직마우스2 김영훈 2019.10.13 498
247 CentOS8 bind 설치 - centos8_bind.yml 김영훈 2019.10.15 326
쓰기 태그
 첫 페이지 1 2 3 4 5 6 7 8 9 10 끝 페이지