how to know if the mailx command really sends the mail to the email address?

Hi guys,

I have a question about the returning message of the mailx command.
if I run a mailx command, how can I know if the email has been sent to the email address? If the email address doesn't exist, is there any error message returned? If yes, how can I get the error message?

Thanks
Shine

You can check the log of your Message Transfer Agent (MTA) like sendmail, postfix or mailman etc.. Usually they write their log into /var/log/mail.log or something similar on Linux. Other OS can have different logfiles or directories for that.

OK, Thanks, Zaxxon

Error messages should be sent back to you by email if you used a proper From: header and your box is correctly configured. Of course, that's a big if.