When I send an e-mail from my server(hostname of the server is syslog) with command (echo "To: blah@example.com"; echo "From: root@example.org"; echo "Subject: test; echo; echo "test"; echo) | sendmail -t, then MTA of example.com complains that domain of sender address root@syslog does not exist. Why doesn't my MTA use the address root@example.org instead of root@syslog? I have specified example.org as a domain in my /etc/resolv.conf file:

root@syslog:~# grep domain /etc/resolv.conf 
domain example.org

There is a difference between the From: header and the envelope sender. Try to use | sendmail -t -f 'root@example.org' to use a different sender address

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.