일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 리눅스마스터 1급 필기
- C#\
- 산업제어시스템 보안
- 산업제어시스템
- node.js
- c#
- 정보처리기능사
- C# SELCT
- Vue.js
- 리눅스 마스터 1급 필기
- 프론트엔드
- 웹 구현
- 리눅스마스터
- C# 문법 기초
- MySQL
- 웹 앱 만드는법
- 제어시스템 보안
- C# 문법
- 웹 앱 개발
- mysql 기초문법
- 백엔드
- 리눅스마스터 1급 실기
- 웹 개발
- 데이터베이스 생성 예제
- html
- 리눅스 마스터 1급 합격 후기
- 리눅스 마스터 2급 실기
- C# SELECT 문
- 리눅스 마스터 1급 실기
- 웹앱 구현
- Today
- Total
보안 루피
리눅스 마스터 1급 실기 : 메일 작업 /etc/mail/virtusertable, /etc/aliases 본문
/etc/mail/access
/etc/mail/Virtusertable : 같은 이름, 다른 도메인
/etc/aliases : 메일링
/etc/mail/local-host-names : 메일 서버에 사용하는 도메인 등록(다른 파일들이 이걸 참고함)
이 두개 문제 유형이 오묘하게 다름
[ rpm -qc sendmail ]
[root@localhost ~]# rpm -qc sendmail
/etc/mail/Makefile
/etc/mail/access
/etc/mail/domaintable
/etc/mail/helpfile
/etc/mail/local-host-names
/etc/mail/mailertable
/etc/mail/make
/etc/mail/sendmail.cf
/etc/mail/sendmail.mc
/etc/mail/submit.cf
/etc/mail/submit.mc
/etc/mail/trusted-users
/etc/mail/virtusertable
/etc/pam.d/smtp.sendmail
/etc/sasl2/Sendmail.conf
/etc/sysconfig/sendmail
/var/log/mail/statistics
/etc/mail/access
- OK 무조건 허용
- RELAY 허용
- REJECT 폐기
- DISCARD 폐기후 메시지 X
이 파일 수정후 makemap hash /etc/mail/access < /etc/mail/access 설정
m4는 > 방향
/etc/mail/virtusertable : 하나 메일서버에 다른사용자가 같은 메일 계정을 요구한경우
수정후 makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable
[root@user ~ ]# vi /etc/mail/virtusertable
# A domain-specific form of aliasing, allowing multiple virtual domains to be
# hosted on one machine.
#
# info@foo.com foo-info 예시
# info@bar.com bar-info 예시
# joe@bar.com error:nouser 550 No such user here
# jax@bar.com error:5.7.0:550 Address invalid
# @baz.org jane@example.net
#
# then mail addressed to info@foo.com will be sent to the address foo-info,
# mail addressed to info@bar.com will be delivered to bar-info, and mail
# addressed to anyone at baz.org will be sent to jane@example.net, mail to
# joe@bar.com will be rejected with the specified error message, and mail to
# jax@bar.com will also have a RFC 1893 compliant error code 5.7.0.
#
# The username from the original address is passed as %1 allowing:
#
# @foo.org %1@example.com
#
# Additionally, if the local part consists of "user+detail" then "detail" is
# passed as %2 and "+detail" is passed as %3 when a match against user+* is
# attempted, so entries like
문제
가. ihd.or.kr 계정(도메인)과 kait.or.kr 계정(도메인) 모두 ceo 라는 메일 계정을 요구한 상태이다. ihd.or.kr 의 ceo 메일계정은 ihduser 로 포워딩시키고 , kait.or.kr 의 ceo 메일 계정은 kaituser로 포워딩시킨다.
#vi /etc/mail/virtusertable
ceo@ihd.or.kr ihduser
ceo@kait.or.kr kaituser
/etc/aliase : 특정 계정으로 들어오는 메일 다른 쪽으로 보내기
newaliase, sendmail -bi 필수
name 이메일 계정을 user1, user 에게 보내는 경우
vi /etc/aliases
name: user1, user2
사용자 리스트 파일이 있는 경우 (/etc/ mail_admin)
name::inclue:/etc/mail_admin
위 내용으로 /etc/aliases 수정후 newaliases, sendmail -bi 필수 !
/etc/mail/sendmail.cf
파일설정 항목
- Cw : 호스트지정
- Fw : 파일 지정
- Dj : 특정 도메인 강제지정
'리눅스 마스터 1급' 카테고리의 다른 글
리눅스마스터 1급 실기 : 허가권 (0) | 2023.05.04 |
---|---|
리눅스마스터 1급 실기 : TCP Wrapper ( /etc/hosts.deny allow) (0) | 2023.05.03 |
리눅스 마스터 1급 실기 : 아파치 (0) | 2023.05.03 |
리눅스 마스터 1급 실기 : 백업 (0) | 2023.05.03 |
리눅스마스터 1급 실기 : ssh, sysctl -w, lsattr, chattr + a (0) | 2023.05.03 |