1832647 Members
3018 Online
110043 Solutions
New Discussion

mailx

 
Jose_129
Regular Advisor

mailx

I am using mailx to send mail in my server hpux, but the mail arrives to me as root@dominio and I want to change so that root@nombre.com arrives to me.

Regards
Change password in way single user, beginning in multiuser way console
4 REPLIES 4
RAC_1
Honored Contributor

Re: mailx

mailx -r abc@xyz.com -s "Subject" mailaddress@xcv.com

That is from command line.

for making permanent changes. Check sendmail.cf. you will have to change DM macro.

There is no substitute to HARDWORK
Stuart Abramson_2
Honored Contributor

Re: mailx

3. Set site hiding:

a. Site hiding is the ability to send emails with no "hostname" in the
outgoing email address:

user@domain.com

rather than:

user@host.domain.com

b. cp sendmail.cf sendmail.cf.old
vi sendmail.cf
Set:
DMdomain.com
Unset:
CE root


5. Stop/Start sendmail:

# /sbin/init.d/sendmail stop; /sbin/init.d/sendmail start

Sendmail pid is 6743
Killing sendmail...
Sendmail killed.
/etc/mail/aliases: 13 aliases, longest 35 bytes, 307 bytes total
sendmail

6. Clean out the old "mail.log":

o Mail log info goes in:

/var/adm/syslog/mail.log

o Clean it out:

cd /var/adm/syslog # move old logs
mv mail.log mail.log.old
mv syslog.log sylog.log.old
cd /sbin/init.d # restart syslog daemon
./syslogd stop; ./syslogd start

Rita C Workman
Honored Contributor

Re: mailx

Since you just want to change the FROM address, have you considered using the userdb file option...
It comes from DOC 1200503211 and I found it quite handy for when reports are emailed..but the user wants to send the report back to the developer and tell them there's a problem. We created a mail account in GroupWise for the return mail, and used this 'flip' of the address in the userdb file. It worked well for us.
Here's how it goes:
1. Create the file /etc/mail/userdb that contains two
entries for user "adm" on the system. The entries
should be in the following format:

adm:mailname
:maildrop adm

2. Build the /etc/mail/userdb.db file with the makemap
routine:

makemap btree /etc/mail/userdb.db < /etc/mail/userdb

3. Uncomment the following line in the /etc/mail/sendmail.cf
file:

UserDatabaseSpec=/etc/mail/userdb.db

4. To change the "@host.domain" part, use masquerading and
edit the /etc/mail/sendmail.cf file to add a valid domain
after DM: DMhp.com

5. Restart sendmail:

/sbin/init.d/sendmail stop

/sbin/init.d/sendmail start

Rgrds,
Rita
Jose_129
Regular Advisor

Re: mailx

Any news,

Please, send the DOC 1200503211
Change password in way single user, beginning in multiuser way console