메일은 작동하지만 sendmail은 작동하지 않습니다! (접미사)

메일은 작동하지만 sendmail은 작동하지 않습니다! (접미사)

서버에 postfix를 설치했는데 명령으로 이메일을 보내면 sendmail전달되지 않지만 명령으로 보내면 mail전달됩니다. 더 나쁜 것은 postfix 로그가 다음을 사용할 때 전달되었다고 주장합니다.

로그에 표시되는 내용은 다음과 같습니다.echo "test email" | sendmail [email protected]

Sep  4 14:33:03 howtocode1 postfix/pickup[271977]: 38418406E2: uid=0 from=<root>
Sep  4 14:33:03 howtocode1 postfix/cleanup[272164]: 38418406E2: message-id=<[email protected]>
Sep  4 14:33:03 howtocode1 postfix/qmgr[231761]: 38418406E2: from=<[email protected]>, size=295, nrcpt=1 (queue active)
Sep  4 14:33:03 howtocode1 postfix/smtp[272166]: 38418406E2: to=<[email protected]>, relay=mail2.mailinator.com[45.33.83.75]:25, delay=0.06, delays=0.03/0.01/0.01/0.01, dsn=2.0.0, status=sent (250 Ok)
Sep  4 14:33:03 howtocode1 postfix/qmgr[231761]: 38418406E2: removed

분명히 맞는 것 같습니다. 하지만 메일은 절대 배달되지 않습니다. 하지만 이건 정말 잘 작동해요! 메일이 전송됩니다!echo "test email 2" | mail [email protected]

그래서 나는 왜 세상에서 mail명령이 작동하지만 작동하지 않는지 이해하지 못합니다 sendmail. 어떤 아이디어?

답변1

좋습니다. 직접 테스트해 보겠습니다.

$ host -t mx mailinator.com
mailinator.com mail is handled by 1 mail.mailinator.com.
mailinator.com mail is handled by 1 mail2.mailinator.com.
➜  ~ telnet mail.mailinator.com 25
Trying 23.239.11.30...
Connected to mail.mailinator.com.
Escape character is '^]'.
220 mail.mailinator.com ESMTP Postfix
EHLO LutzWillek
250-mail.mailinator.com
250-8BITMIME
250-STARTTLS
250 Ok
MAIL FROM:<[email protected]>
250 Ok
RCPT TO:<[email protected]>
250 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
Subject: Test from command line

Hello. This is a test message.
.
250 Ok
Connection closed by foreign host.

메시지는 다음에서 볼 수 있듯이 작동합니다.https://www.mailinator.com/v4/public/inboxes.jsp?to=sendmail

귀하의 로그에는 ID가 포함된 메시지 38418406E도 전송되었으며 원격 서버가 이 메일을 수락했음이 표시됩니다.

그러니 다시 시도해 보세요.그것은 효과가 있을 것이다.

답변2

좋아, 이건 정말 이상한 일이야. 이것은 작동하지 않습니다:

echo "Subject: 1hello people" | sendmail [email protected]

하지만 이것은 작동합니다:

echo "Subject: hello people
>this is the body" | sendmail [email protected]

그래서 어떤 이유에서는 몸체가 없고 주체만 있으면 작동하지 않습니다. 전송되었다고 주장하지만 어떻게든 받아들여지지 않습니다. 메일리네이터가 아닌 다른 곳으로 보내려고 했으나 같은 문제가 발생했습니다.

관련 정보