- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How do I mask "From" while using mailx
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2004 02:17 AM
09-01-2004 02:17 AM
I send a lot of email from the command line from one particular account using something like:
mailx -s "Subject" you@yourcompany.com < inputfile
I'd like to change it so that account ALWAYS uses a different "from" address (Its a ServiceGuard package and I want the return email to come to name of the package not the name of the machine its running on).
If there isn't a way to change this for the whole user account then I'd like to know how to mask it using mailx (since thats what I use).
Thanks,
Oz
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2004 02:23 AM
09-01-2004 02:23 AM
Re: How do I mask "From" while using mailx
mailx -s "Subject" -r me@mycompany.com you@yourcompany.com < inputfile
This should solve your problem.
MB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2004 02:24 AM
09-01-2004 02:24 AM
Re: How do I mask "From" while using mailx
DMyourdomain.com
Which will then have a from address of user@yourdomain.com instead of user@machine.yourdomain.com
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2004 02:24 AM
09-01-2004 02:24 AM
Re: How do I mask "From" while using mailx
Also check DM macro in sendmail.cf.
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2004 02:27 AM
09-01-2004 02:27 AM
Re: How do I mask "From" while using mailx
mailx -s "test" -r me@somewhere.com gwild
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2004 02:27 AM
09-01-2004 02:27 AM
Re: How do I mask "From" while using mailx
If you want to be more complicated you can spoof: -
telnet mailserver 25
helo mydomain.com
mail from:brokenthing@serviceguard.com
rcpt to:admin@mydomain.com
data
Subject: It broke
It's all gone wrong
.
quit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2004 02:30 AM
09-01-2004 02:30 AM
Re: How do I mask "From" while using mailx
eg:-
cat <
To: "Undisclosed Recipients"
I like my software, so there!
EOF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2004 02:40 AM
09-01-2004 02:40 AM
Re: How do I mask "From" while using mailx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2004 02:59 AM
09-01-2004 02:59 AM
Re: How do I mask "From" while using mailx
How about setting the masquerade function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2004 03:23 AM
09-01-2004 03:23 AM
Re: How do I mask "From" while using mailx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2004 04:41 AM
09-01-2004 04:41 AM
Re: How do I mask "From" while using mailx
No we're not using the same email for all users on the system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2004 05:15 AM
09-01-2004 05:15 AM
SolutionIf you want to change the FROM on a user only basis, say you want user imuser to go out Ima_User@mycompany.com you would:
Create /etc/mail/userdb file with the following:
imuser:mailname Ima_User
Ima_User:maildrop imuser
Now build the userdb.db file by running:
makemap btree /etc/mail/userdb.db < /etc/mail/userdb
Uncomment the following line in ~sendmail.cf file
0 UserDatabaseSpec=/etc/mail/userdb.db
Stop & Restart sendmail:
/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start
And do a couple emails to test.
====================
Another thing you can 'play with' is the appearance of the contents /etc/passwd file,. Try editing via Sam or vipw the first line/part your real name. Have fun...
Rgrds,
Rita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2004 05:46 AM
09-01-2004 05:46 AM
Re: How do I mask "From" while using mailx
alias mailx="mailx -r `whoami`\@pkg_name"
-denver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2004 06:21 AM
09-01-2004 06:21 AM
Re: How do I mask "From" while using mailx
I will probably go with Denver's solution because its simple to implement but Rita's also matches what I'm looking for.
Best regards,
Kent M. ostby