Unix mailx question.

HI,
Whenever I tried to send mail using mailx in unix (Solaris 5.9), from field is missing from email messages. In short, sender's email address is missing from message. Anybody has any idea why this is happening?

Thanks,
NS.

Can you show a sample fo the command you are using?

mailx -s "mail test" xxx@yyy.com < /dev/null

Below is the message that I got in outlook(my email account).

From:

To: xxx@yyy.com
Cc:
Subject: mail test

So basically from field is empty/missing.

Thanks,
Nishit.

I have used the following:

m_subj_1="#AUTO# Full Audit Log"
m_recp_1="jmg@xxx.com"
m_frv='set from=me@xxx.com; set realname="jmg"'
/usr/local/bin/mutt -nx -e "$m_frv" -s "$m_subj_1" "$m_recp_1" <${AUDIT_FILE}_1

to send an audit log to a recipient, and controlling the 'from' field.

This was done because I did not want the email to come from my unix account, but from a more generic account (which was actually a group account).

All of that said, I think a place to research would be if you even have a working email account on your unix login. What happens when you go into mailx? Does it come back and say "No mail for xxx" where xxx is your login?

Yes it did say "no mail for xxx". So what is that mean? Most of the servers works fine with mailx command(display server's email address-root@xxx.com in from field). Only one of the server giving me this problem. I was wondering do mailx use some kind of header file(which has host email address)? I mean how do mailx process/get host's email address while sending mail. Unfortunately all of our BCV scripts use mailx, so I can't use mutt.

Thanks,
NS.

I have figured out the root cause. I had older version of sendmail.cf on server. Updated sendmail.cf with new version and restarted sendmail. So right now, from field is not missing from email messages.

Thanks for help. I am closing this thread.
NS.