4

I'm using CentOS 7. I wanted to test my PostFix mail forwarding so I ran

[root@server /]# echo "Subject: sendmail test" | sendmail -v admin@mydomein.com
Mail Delivery Status Report will be mailed to <root>.

I don't see the email received at my forwarding address and I can't figure out where the log of what happened is. I checked

[root@server /]# ls -al /var/log/maillog
-rw------- 1 root root 0 Mar  6 09:48 /var/log/maillog

But that log file is empty. How do I find out where things went wrong?

2

The message you posted says the Mail Delivery Status Report will be mailed to <root>.

I would check the root user's mail which by default should be /var/spool/mail/root.

0
2

I found it helpful to use sendmail with -f option, like so:

echo "Subject: sendmail test" | sendmail -f errors.here@example.com -v admin@mydomein.com

-f sets the envelope sender address. This is the address where delivery problems are sent to.

2
  • This at least generated an email to the error address. Although the email has no content, so it didn't help me identify why sendmail doesn't send a message to the desired test address. Any suggestions?
    – inspirednz
    Jan 2 at 23:37
  • @inspirednz It should actually come with an error message. Did you check the message headers?
    – not2savvy
    Jan 2 at 23:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.