Operating System - HP-UX
1833777 Members
2422 Online
110063 Solutions
New Discussion

E-mail sent not receivable by client

 
Shahril M
Frequent Advisor

E-mail sent not receivable by client

Hi folks,

Typically, I would use the flwg command to send out e-mails:
echo 'test'|mailx -s 'subject' abc@def.com

However, in a server I recently started to support, I need an extra parameter, so the command becomes:
echo 'test'|mailx -s 'subject' -r sender@def.com abc@def.com

Plus, I discovered that if I use sendmail instead, I need the -f option:
echo 'test'|/usr/sbin/sendmail -fsender@def.com abc@def.com

Without these 2 options, outgoing mails leave the server (mailq is empty), but I never receive these mails. These 2 options (-r and -f) are not required in my existing servers.

Thus, I would like to learn how I can eliminate the need for these 2 options in this server I am just taking over support of. Which configuration file can allow me to do this?


TIA,
Shahril
2 REPLIES 2
BONNAFOUS Jean Marc
Trusted Contributor

Re: E-mail sent not receivable by client

Hi,

What are differences between the servers? OS Version? Trusted system? Sendmail version?

Sendmail config file is /etc/mail/sendmail.cf

Normally you must specify sender if user is a trusted user like root. All other users have a warning included in the mail message header.

Compare sendmail.cf files of the servers, specially 'From' header.

See sendmail.cf information:
http://www.unix.org.ua/orelly/networking/sendmail/ch05_01.htm

Rgds
JMB
Si vous ne faites jamais de bétises, c'est que vous ne faites rien de difficile. Et ça c'est une grosse bétise.
RAC_1
Honored Contributor

Re: E-mail sent not receivable by client

Options -r for mailx and option -f for sendmail sends the so that it appears as coming from "particular address" Which may not be a case.

In case you want all outgoing emails appear as coming from "xyv@abc.com", you can set DM macro. In case you want to avoid using -r option on mailx eveytime you use it, you can set aliase for it.

alias mx='mailx -r abc@xyz.com'

echo "something" | mx -s "subject" email_Address

You do same for sendmail. (For -f option)

Anil
There is no substitute to HARDWORK