iCloud 계정의 msmtp가 작동하지 않습니다

iCloud 계정의 msmtp가 작동하지 않습니다

저는 Linux(Raspbian, Raspberry Pi 4 Model B)를 처음 접했고 명령줄을 통해 이메일을 보내려고 합니다. 현재 이 작업은 다음 계정 msmtp에서 수행됩니다.gmx.de이것가이드.

apt-get update && apt-get upgrade -V

apt-get install msmtp msmtp-mta mailutils

/etc/msmtprc그리고~/.msmtprc포함

# Set default values for all following accounts.
defaults
port 587
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile        ~/.msmtp.log

# Mail account
account [email protected]
host mail.gmx.net
from [email protected]
auth on
user [email protected]
password PASSWORD

account default : [email protected]

aliases /etc/aliases

/etc/별칭포함

root: [email protected]
default: [email protected]

/etc/mail.rc포함

set sendmail="/usr/bin/msmtp -t"

1. 테스트

echo "Content of the e-mail" | mail -s "Subject" [email protected]

이것은 꽤 잘 작동합니다! 하지만 이것을 내 iCloud 계정으로 변경하면 인증이 실패합니다(비밀번호가 정확합니다;)).

# Set default values for all following accounts.
defaults
port 587
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
# Mail account
account [email protected]
host smtp.mail.me.com
from [email protected]
auth on
user [email protected]
password PASSWORD

account default : [email protected]

aliases /etc/aliases

2. 테스트

pi@raspberrypi:~ $ echo "Content of the e-mail" | mail -s "Subject" [email protected]
msmtp: authentication failed (method PLAIN)
msmtp: server message: 535 5.7.8 Error: authentication failed
msmtp: could not send mail (account default from /home/pi/.msmtprc)
mail: Sending data to /usr/bin/msmtp -t failed: Process exited with a non-zero status
mail: cannot send message: Process exited with a non-zero status

지금 제가 할 수 있는 일이 있나요? 도움을 주시면 감사하겠습니다!

관련 정보