Raspberrypi 3B+ 시스템에서 Debian Stretch 기반 mit OpenMediaVault(ARM)를 사용하는 데 문제가 있습니다.
다음 명령은 오류를 반환하지 않으며 이메일도 반환하지 않습니다.
root@raspberrypi:~# echo "Content" | mail -s "Subject" root
root@raspberrypi:~# mail
No mail for root
root@raspberrypi:~# cat /var/spool/mail/root
root@raspberrypi:~#
이메일로 로그인
cat /var/log/mail.log
Jul 13 08:12:16 raspberrypi postfix/pickup[1809]: BA9A76059: uid=0 from=<root>
Jul 13 08:12:16 raspberrypi postfix/cleanup[1952]: BA9A76059: message-id=<[email protected]>
Jul 13 08:12:16 raspberrypi postfix/qmgr[1638]: BA9A76059: from=<[email protected]>, size=435, nrcpt=1 (queue active)
Jul 13 08:12:16 raspberrypi postfix/error[1954]: BA9A76059: to=<[email protected]>, orig_to=<root>, relay=none, delay=0.09, delays=0.04/0.03/0/0.02, dsn=5.0.0, status=bounced (raspberrypi.localdomain)
Jul 13 08:12:16 raspberrypi postfix/cleanup[1952]: CBF576061: message-id=<[email protected]>
Jul 13 08:12:16 raspberrypi postfix/bounce[1955]: BA9A76059: sender non-delivery notification: CBF576061
Jul 13 08:12:16 raspberrypi postfix/qmgr[1638]: CBF576061: from=<>, size=2447, nrcpt=1 (queue active)
Jul 13 08:12:16 raspberrypi postfix/qmgr[1638]: BA9A76059: removed
Jul 13 08:12:16 raspberrypi postfix/error[1954]: CBF576061: to=<[email protected]>, relay=none, delay=0, delays=0/0/0/0, dsn=5.0.0, status=bounced (raspberrypi.localdomain)
Jul 13 08:12:16 raspberrypi postfix/qmgr[1638]: CBF576061: removed
도움을 주시면 감사하겠습니다.
답변1
해결책은 /etc/postfix/main.cf에 있는 다음 줄입니다:
myhostname = localhost
mydomain = localdomain
mydestination = $myhostname, localhost.$mydomain, localhost
inet_interfaces = $myhostname, localhost
mynetworks_style = host
default_transport = error: outside mail is not deliverable
postfix 서비스 다시 시작
root@raspberrypi:~# systemctl restart postfix.service
바라보다
root@raspberrypi:~# echo Test | mail -s test root
root@raspberrypi:~# mail
Mail version 8.1.2 01/15/2001. Type ? for help.
"/var/mail/root": 1 message 1 new
>N 1 [email protected] Sat Jul 13 15:55 17/547 test