Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.
우분투 sendmail전송시 421 4.3.0 collect: Cannot write ./dfv5BA2EBS010579 (bfcommit, uid=0, gid=114): No such file or directory 발생시 조치사항
sendmail및 postfix 설치후 "telnet localhost 25"를 입력하여 메일을 전송을 테스트 할때 아래와 같은 오류가 발생할 수 있다.
sendmail이 특정위치에 쓰기 권한이 없어서 발생하는 문제이므로
root@gsda4:/root# ls -al /tmp /var/tmp /var/spool/mqueue /var/mail를 이용하여 권한을 확인하여 변경해준다.
특히 /var/tmp폴더의 권한을 잘 확인하여 변경해준다.
root@gsda4:/root# ls -al /var/tmp
/var/tmp:
total 8
drwxr-xr-x 2 root root 4096 Apr 13 2016 .
drwxr-xr-x 14 root root 4096 May 22 14:46 ..
인경우 "root@gsda4:/root# chmod 661 /var/tmp"을 실행하여 아래 처럼 변경시켜준다.
root@gsda4:/root# ls -al /var/tmp
total 8
drw-rw---x 2 root root 4096 Apr 13 2016 .
drwxr-xr-x 14 root root 4096 May 22 14:46 ..
----메일 테스트(비정상적인 경우#1)----------
oot@gsda4:/var/spool# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail.gdime.com ESMTP Sendmail 8.15.2/8.15.2/Debian-3; Sun, 11 Jun 2017 19:24:41 +0900; (No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1]
ehlo gdime.com
250-mail.gdime.com Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
mail from: root@gdime.com
250 2.1.0 root@gdime.com... Sender ok
rcpt to: admin@gdime.com
250 2.1.5 admin@gdime.com... Recipient ok
data
354 Enter mail, end with "." on a line by itself
he한글
.
421 4.3.0 collect: Cannot write ./dfv5BA2EBS010579 (bfcommit, uid=0, gid=114): No such file or directory
Connection closed by foreign host.
----메일 테스트(비정상적인 경우#2)----------
oot@gsda4:/var/spool# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail.gdime.com ESMTP Sendmail 8.15.2/8.15.2/Debian-3; Sun, 11 Jun 2017 19:24:41 +0900; (No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1]
ehlo gdime.com
250-mail.gdime.com Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
mail from: root@gdime.com
250 2.1.0 root@gdime.com... Sender ok
rcpt to: admin@gdime.com
250 2.1.5 admin@gdime.com... Recipient ok
data
354 Enter mail, end with "." on a line by itself
he한글
.
Connection closed by foreign host.
----메일 테스트(정상적인 경우)----------
root@gsda4:/root# telnet lcoalhost 25
telnet: could not resolve lcoalhost/25: Name or service not known
root@gsda4:/root# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 localhost.localdomain ESMTP Sendmail 8.15.2/8.15.2/Debian-3; Sun, 11 Jun 2017 20:52:21 +0900; (No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1]
ehlo gdime.com
250-localhost.localdomain Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
mail from: root@gdime.com
250 2.1.0 root@gdime.com... Sender ok
rcpt to: admin@gdime.com
250 2.1.5 admin@gdime.com... Recipient ok
data
354 Enter mail, end with "." on a line by itself
sldkfsjdlfkshdf
.
250 2.0.0 v5BBqLiu014557 Message accepted for delivery
--------------오류내용-----------------------
421 4.3.0 collect: Cannot write ./dfv5BA2EBS010579 (bfcommit, uid=0, gid=114): No such file or directory