Exim

지각생 연습장

목차

EXIM

  • 데비안 기본 MTA (Mail Transfer Agent - "메일 서버").
  • sendmail 보다 설정이 간소하고 안전하다.
    • 갠적으론 postfix 가 더 좋다.

시놉시스

exim4 [options] arguments ...
mailq [options] arguments ... (exim의 -bp 옵션과 같음. sendmail 과의 호환성을 위해 제공됨)
rsmtp [options] arguments ... (-bS)
rmail [options] arguments ... (-i and -oee)
runq [options] arguments ... (-q)
newaliases [options] arguments ... (-bi)

실행 옵션

  • -bd : 서버 구동
  • -bh <IP address> : 주어진 IP로 접근하는 마냥 가짜 세션을 실행함
  • -bi : alias 정보를 갱신(파일을 rebuild)
  • -bm : This option runs an Exim receiving process that accepts an incoming, locally-generated message on the current input.
  • -bP : exim의 핵심 설정 내용을 화면(standard output)에 출력
  • -bp : 메일 큐(queue)에 쌓여 있는 메일의 목록을 출력
    • -bpa
    • -bpc / -bpr / -bpra / -bpru / -bpu
  • -bS : SMTP 배치(batch) 입력을 받아 처리
  • -bs : 하나 이상의 SMTP 입력을 받고 결과를 표준 출력으로 돌려줌
  • -bV : 버전 정보등을 보여줌
  • -bv : 주소 검증(verification) 모드
  • -C <filelist> : 다른 설정 파일(runtime configuration) 내용으로 구동
  • -D<macro>=<value> : 지정된 매크로를 재정의해서 처리
  • -d<debug options>
  • -E : This option specifies that an incoming message is a locally-generated delivery failure report. 내부용으로 사용할때.
  • -F <string> : 로컬에서 만들어진 메시지를 받았을때 보낸사람의 full name 을 <string>으로.
  • -f <string> : 로컬에서 만들어진 메시지를 받았을때 봉투의 보낸사람 full name 을 <string>으로. return-path
  • -M <message id> <message id> ... : 차례대로 배달 시도. frozen 메시지는 동결 해제
  • 일단 여기까지.. 사이에 있는거 일단 패스(2007/10/19)
    • -Mrm <message id> <message id> ... : 큐에서 메시지 삭제
    • -Mt <message id> <message id> ... : 동결 해제
    • -Mf <message id> <message id> ... : 메시지 동결
    • -Mg <message id> <message id> ... : 메시지 버림
    • -Mvb / -Mvh / -Mvl <message id> : 스풀 파일에서 메시지 본문/헤더/로그 내용 표시
  • -q : queue에 대기 중인 메일 처리

테스팅

  • -be : 확장 테스팅 모드로 구동
  • -bf <filename> : 사용자 필터 테스팅 모드
  • -brt : retry 룰 테스팅
  • -brw : rewrite 룰 테스팅
  • -bt : 주소 테스팅 모드

디버그 카테고리

  • acl  : ACL interpretation
  • auth  : authenticators
  • deliver  : general delivery logic
  • dns  : DNS lookups (see also resolver)
  • dnsbl  : DNS black list (aka RBL) code
  • exec  : arguments for execv() calls
  • expand  : detailed debugging for string expansions
  • filter  : filter handling
  • hints_lookup  : hints data lookups
  • host_lookup  : all types of name-to-IP address handling
  • ident  : ident lookup
  • interface  : lists of local interfaces
  • lists  : matching things in lists
  • load  : system load checks
  • local_scan  : can be used by local_scan()
  • lookup  : general lookup code and all lookups
  • memory  : memory handling
  • pid  : add pid to debug output lines
  • process_info  : setting info for the process log
  • queue_run  : queue runs
  • receive  : general message reception logic
  • resolver  : turn on the DNS resolver's debugging output
  • retry  : retry handling
  • rewrite  : address rewriting
  • route  : address routing
  • timestamp  : add timestamp to debug output lines
  • tls  : TLS logic
  • transport  : transports
  • uid  : changes of uid/gid and looking up uid/gid
  • verify  : address verification logic
  • all  : almost all of the above (see below), and also -v

설정 파일

  • 기본 위치 : /etc/exim4
  • exim4.conf.template 와 update-exim4.conf.conf 파일을 합성해서 설정 파일 만듬
    • 만들어진 설정 파일 : /var/lib/exim4/config.autogenerated
  • 설정파일 다시만들기 : update-exim4.conf.conf 수정 후 update-exim4.conf 명령 사용 (확인 필요)

exim -Mrm `exim -bpu | awk '/\*\*\* frozen \*\*\*/ {print $3}'` 
혹은
exim -bpu | awk '/\*\*\* frozen \*\*\*/ {print $3}' | xargs exim -Mrm
  • Q0620: Why does Exim bounce messages without even attempting delivery, giving the error retry time not reached for any host after a long failure period?
A0620:  This message means that all hosts to which the message could be sent have been failing for so long 
that the end of the retry period (typically 4 or 5 days) has been reached. 
In this situation, Exim still computes a next time to retry, but any messages that 
arrive in the meantime are bounced straight away. 
You can alter this behaviour by unsetting the delay_after_cutoff option on the smtp transport. 
Then Exim will try most messages for those hosts once before giving up.
  • 위 에러와 관련해서
    • exim4 -q -d 명령으로 자세한 디버깅 정보를 보고
    • mail -v -s "test" email-addr 해서 자세한 정보를 봄
    • 역시 정확한 이유는 알 수 없다. 하지만 역시 바로 frozen 되는 걸로 봐서 뭔가 메일 발송이 오래 안되서 볼 것도 없이 못가는 걸로 단정하고 처리하는 것 같은데.. delay_after_cutoff 옵션을 어떻게 해제한 수 있을까?
    • mail.cast.or.kr 에 보니 postfix 가 죽어있었다. 왜? 그리고 이것과 관련 있나?

참고

online essay service

개인 도구