Operating System - HP-UX
1833760 Members
2491 Online
110063 Solutions
New Discussion

notification from login owner

 
SOLVED
Go to solution
panchpan
Regular Advisor

notification from login owner

Hello.
I have one UX account under my ownership. On same system IF application send out any e-mail using mailx , In sender it shows my name. I do not want to use mailx -r option and changing in /etc/passwd/ is also seems not possible. What else can be done so that sender could become login@hostname. I have seen it working in some server but I am not able to figure out how is it working?

Thank you!
5 REPLIES 5
Tim Nelson
Honored Contributor

Re: notification from login owner

You can put the following into a file and send it into the sendmail command to effectively change the from: and subject:

Content of mailfile:
from: anyone@mycompany.com
subject: A test
This is a test

sendmail someone@mycompany.com < mailfile

panchpan
Regular Advisor

Re: notification from login owner

Hello.
Is it possible to have a solution from system level I want to avoid any commands e.g. sendmail/mailx , automatically any email sent from that server or login has specific sender name.

Is it possible?
Rasheed Tamton
Honored Contributor
Solution

Re: notification from login owner

Hello,

Did you check the alias option. Is it what you are looking for.

The file is /etc/mail/aliases

Regards,
Rasheed Tamton.
panchpan
Regular Advisor

Re: notification from login owner

Sorry - Nothing favorable could be found from /etc/mail/aliases :-(
Any other tips?
Heironimus
Honored Contributor

Re: notification from login owner

aliases are for forwarding mail to different recipients, not changing the sender on outbound mail. Address rewriting (typically using genericstable) allows you to rewrite the headers so that mail from "myuser" appears to be from "whatever@wherever". But I'm not entirely sure what you're trying to do.

Are you trying to make it say "From: user@host" instead of "From: Your Name "? That's handled entirely by the MUA (mailx), trying to have sendmail change that is a fundamentally wrong approach. However, if this is a generic application account rather than your personal account then it really shouldn't have any individual's name on it in /etc/passwd.