I installed postfix on a server and when I send an email with the sendmail
command it doesn't get delivered, but when I send with the mail
command it does get delivered. What's worse, postfix logs claim it got delivered when using:
This is what the logs show for echo "test email" | sendmail sendmail@mailinator.com
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=<20210904143303.38418406E2@codingschool.tk>
Sep 4 14:33:03 howtocode1 postfix/qmgr[231761]: 38418406E2: from=<root@codingschool.tk>, size=295, nrcpt=1 (queue active)
Sep 4 14:33:03 howtocode1 postfix/smtp[272166]: 38418406E2: to=<sendmail@mailinator.com>, 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
Obviously it looks right. But no mail ever gets delivered. But this one: echo "test email 2" | mail bobo@mailinator.com
works great! The mail gets sent!
So I don't understand why in the world them mail
command works, but not sendmail
. Any idea?