Operating System - HP-UX
1752783 Members
6259 Online
108789 Solutions
New Discussion

mailx with mailrc with from= setup does not work

 
Steven_181
Advisor

mailx with mailrc with from= setup does not work

Hi,

Currently all the mailx send out from the server from all user have the following format:
username@locahost.FQDN

We are trying to setup mailx to send out email to have the email all from no-reply-servername@domainA.com.

username@localhost.FQDN ==> no-reply-servername@domainA.com

We have edited the sendmail.cf to have localhost change to @domainA.com successfully.
However we are not manage to change username ==> no-reply-servername.

By the way, we don't one to use the mailx -r option as we have to change all script which are everywhere.

In our .mailrc file we have the following

set smtp=smtp://mail.gr.domainA.com
set from=no-reply-servername@domainA.com
set replyto=no-reply-servername@domainA.com

when we tried to send using following command

mailx -d -s "Testing" first.last@domainA.com

assign(MAILRC)=/root/.mailrc
assign(smtp)=smtp://mail.gr.domainA.com
value(autoprint)=
value(flipr)=
assign(from)=no-reply-servername@domainA.com
value(autoprint)=
value(flipr)=
assign(replyto)=no-reply-servername@domainA.com
value(autoprint)=
assign(smtp)=smtp://mail.gr.domainA.com
value(autoprint)=
value(flipr)=
assign(from)=no-reply-servername@domainA.com
value(autoprint)=
value(flipr)=
assign(replyto)=no-reply-servername@domainA.com
value(autoprint)=

It is able to read the mailrc file with the field from, however when the email is send out it have only
username@domainA.com.

Any idea how to make it work?

We tried the aliases setup, genericstable however it does not work.


 

 

 

1 REPLY 1
Saajan_d
HPE Pro

Re: mailx with mailrc with from= setup does not work

COnfigure genericstable and it should work.

rebuild the genericstable in the sendmail.cf with the /usr/newconfig/etc/mail/cf/cf/gen_cf setup and theh copy sendmail.gen.cf file to /etc/mail/sendmail.cf and reconfigure sendmail again with DS and DM entry and then create a file called genericstabel and provide the appropraite entry and then rebuild the genericstable database as below 

 makemap dbm /etc/mail/genericstable < /etc/mail/genericstable

and then restart the senemail service and then recheck again

if still not working, kindly raise a consultancy ticket with HPE as it is a configuration and system admin task


I am a HPE Employee

Accept or Kudo