Overwriting sender's information for mailx

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Overwriting sender's information for mailx
# 1  
Old 06-08-2010
Overwriting sender's information for mailx

Hello Forum members.

We currently have a reusable script called "send_email.sh" that is used to send us alerts when our daily jobs are completed. Script uses the mailx utility and below is a sample message:

-----Original Message-----
From: Servacct ETL process owner - Manager Database System [mailto:abc@google.com]
Sent: Tuesday, June 08, 2010 10:09 AM
To: Data-Warehousing-Support


Is there a way that I can overwrite the sender info to the following:
From: "Servacct ETL process owner - Manager Database System"
To: "EDW Prod"

Thank you.

---------- Post updated at 03:38 PM ---------- Previous update was at 01:11 PM ----------

Please close post. I was able to find the solution.

# 2  
Old 06-08-2010
My only suggestion would have been that it comes from the Gecos field if /etc/passwd (or wherever that's defined), but it would be nice if you shared your answer... Smilie
# 3  
Old 06-09-2010
Used the -r option in mailx. Google is my friend. Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Mailx command to include sender address

Hi, I m using mailx to send email. I am using sender=server name(display name) echo "body" | mailx -s "subject" -b "bcc address" "to address" -- -f "$sender". I should get email with sender as only display name. In stead i am getting displayname@server address. Please suggest Use code... (1 Reply)
Discussion started by: usrrenny
1 Replies

2. UNIX for Beginners Questions & Answers

How to customize sender name in mailx command?

Hi, Is there anyway to customize the sender name when sending a mail from solaris or linux or any other unix box using mailx command? Thanks in advance. (1 Reply)
Discussion started by: ssk250
1 Replies

3. Shell Programming and Scripting

File overwriting

Hi, An application is transferring a file to linux system with same file name. As file is transferring with same name always file will be overwritten. In this case we want to know what times file was overwirtten like below. Modify: 2014-05-12 00:52:01.000000000 Modify: 2014-05-12... (2 Replies)
Discussion started by: Satyak
2 Replies

4. Shell Programming and Scripting

mailx giving error domain of sender do not exists

Hi , mailx is unable to send mail , I am getting the following error Diagnostic-Code: SMTP; 553 5.1.8 <bc00644@dev-app01-wms.domain.fds>... Domain of sender address bc00644@dev-app01-wms.domain.fds does not exist Can anyone tell me what can be the possible fix for this (2 Replies)
Discussion started by: swayam123
2 Replies

5. Shell Programming and Scripting

Sender name in the format "MAC [mac@yahoo.com]" in mailx command.

Hi Guys, I want the sender name in the format of "MAC " in the mailx command. I tried the below command but it is throwing error. > mailx -s "Test" -r 'MAC ' xxx@gmail.com EOT contains invalid character 'xxcd:~> Can somebody help me out here. Cheers!!!! ---------- Post... (0 Replies)
Discussion started by: mac4rfree
0 Replies

6. UNIX Desktop Questions & Answers

overwriting on a file

I have loads of files in different directories which I do miner changed on them and till now I have to create totally new directories for them, specially as I deal with a whole directory at once :wall::wall::wall::wall: it creates such as mess really e.g. FILES="F1/*" for X in $FILES do... (2 Replies)
Discussion started by: A-V
2 Replies

7. Cybersecurity

Overwriting sudo

Hi all, I have configured a user and provided him the priviledge to vi a file owned by root account. The settings are as below $ id uid=1661(conuser) gid=6615(staff) $ sudo -l (root) NOPASSWD: /usr/bin/vi /opt/DBconserver/etc/conserver.cf I just realised that when the user execute... (5 Replies)
Discussion started by: mohzub
5 Replies

8. Shell Programming and Scripting

Overwriting File

How to overwrite every time a particular portion of a file? ---------- Post updated at 02:16 PM ---------- Previous update was at 02:07 PM ---------- I have a file whose contents are something like: Output of "apachectl fullstatus" command: ---------------------------------------------... (3 Replies)
Discussion started by: proactiveaditya
3 Replies

9. UNIX for Dummies Questions & Answers

mailx error message : mailx: NUL changed to @

If I use the "Mail" link instead of the "mail" link to ../mailx I get this error. Mail so-n-so @whatever.com mailx: NUL changed to @ Unknown command: "postmaster" The email still goes through but i get the error. If I use "mail" it goes thru without the error. Any ideas?? (2 Replies)
Discussion started by: BG_JrAdmin
2 Replies

10. UNIX for Dummies Questions & Answers

mailx sender address customisation

Hi All, I'm on UNIX -Solaris... I'm trying to send mail usin Mailx..... The script is working fine and attachments are also being sent.... BUT, when I receive the mail,, the sender address shown is the unix login id name.... Any way by which I could manipulate this in my script command or any... (1 Reply)
Discussion started by: vasan_srini
1 Replies
Login or Register to Ask a Question

Featured Tech Videos