Visit Our UNIX and Linux User Community

Changing the sender Email address to Alias

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Changing the sender Email address to Alias
# 1  
Old 09-07-2010
Changing the sender Email address to Alias

Hi All,

I want to change the email address of the sender to some alias
for eg: needs to be changes to TEST

Please help me.

# 2  
Old 09-07-2010
I am not sure where you want to do the change. Is it a textfile, a variable, a command to actually send the mail, ... ?

Please explain your problem as exactly as we are expected to explain the solution to you.

# 3  
Old 09-07-2010
I am using the below nawk, to Send notifications.

Currently ,if Ind='Y' Then a member will be notified with a message which uses a template1 and FROM display would be I want to change this to TEST1

and if Ind!='Y' Then a member should be notified with a message which uses a template2 and FROM display should be :TEST2 instead of

   sEmail = substr($0, 21, 50);
   sRefNo = substr($0, 1, 20);
   sAppID = substr($0, 71,6);
   InD = substr($0, 81,1);
   mail = "/usr/bin/mailx -b -r -s \"subject\" to_addr";   
   gsub("to_addr", sEmail, mail);
   if ( sAppID == "MOS   " )
   if ( InD == "Y" )
   gsub("subject","TEST 1 Notification ", mail);
      system("sed \'s/<<ref_no>>/" sRefNo "/g\' template1 | " mail);
   gsub("subject","TEST 2 Notification ", mail);
      system("sed \'s/<<ref_no>>/" sRefNo "/g\' template2| " mail);

# 4  
Old 09-07-2010
Uh, i would like to do the same.
Is it even possible ?

Last edited by anid; 09-11-2010 at 04:29 PM..

Previous Thread | Next Thread
Test Your Knowledge in Computers #11
Difficulty: Medium
IBM chose the name System/360 (or S/360) because it was one of the first computers to focus on graphics processing.
True or False?

10 More Discussions You Might Find Interesting

1. Forum Support Area for Unregistered Users & Account Problems

Problem changing the email address associated with my account

Hello I have had an account for many years. I have attempted to change the email address associated with my account. After logging-in to and revising my email address, I received a 're-verification' email at that new address. The first link in that email took me to a page with the... (1 Reply)
Discussion started by: irb
1 Replies

2. Shell Programming and Scripting

Adding 'from' email address alias in Linux.

Hi Experts, We want to add the 'from' email address to mailx command in all our linux script. After searching this site I am able to find the command '-- -f' to add the from the email address. Bu the problem is our from email address is :- "Proper Support Name <>" Now when I... (6 Replies)
Discussion started by: Amey Joshi
6 Replies

3. Forum Support Area for Unregistered Users & Account Problems

Problem after changing email address

Hi, I updated my email address and since then I am not able to post in any other area than here, see the adds and am not able to edit my profile in the User CP. After saving the password change the page was redirected rather fast, so not sure if I need to do anything or if I have to wait for... (3 Replies)
Discussion started by: cero
3 Replies

4. Red Hat

How to change sender email address in mail -s command

Just having trouble trying to figure out what the option is. When I do mail -s "Subject" I can't seem to specify "from" or "sender" option as I need it for my task. I tried using --f or -f though it didn't work. Can someone please tell me what other option... (0 Replies)
Discussion started by: rockf1bull
0 Replies

5. UNIX for Advanced & Expert Users

postfix sender address rewriting

Hi, I have a postfix server that relays to an exchange server. All of my unix/linux systems send to this server, the problem is the form the mail is sent with, the sender address is username@hostname.domain.local I need to rewrite every sender address to for... (0 Replies)
Discussion started by: funksen
0 Replies

6. Shell Programming and Scripting

Sender email address has to changes

I am sending email with attachment using mail and uuencode command. Ex: (echo "$EMAIL_BODY"; uuencode $FILE ATTACH.TXT) || mail "$EMAIL_ID" -s "$EMAIL_SUB" I am getting email from "". I want to change this email address into... (1 Reply)
Discussion started by: balajiora
1 Replies

7. UNIX for Dummies Questions & Answers

Different Sender Address

Hello Following command send link to division managers. echo http://severname:8081/account-reports/2008Jun19-2008Jun25.2/index.html | mail -s "Weekly Division Sales Report" QUESTION. Above command send a body which is link of division report in email with... (1 Reply)
Discussion started by: paulds
1 Replies

8. Post Here to Contact Site Administrators and Moderators

changing my email address

Hello, Is there a link somewhere to my profile where I can change my email address to my new work email address? I have a new job and would like to receive a notification of responses to my new work address - how can I get that address to you without posting it online for everyone to see? ... (1 Reply)
Discussion started by: tekster757
1 Replies

9. AIX

Change sender e-mail address

When sending emails to the outside world, aix present itself as This is causing some issue with our e-mail server. So we need to change the name to Does any one know how this can be accomplished? Thank you (3 Replies)
Discussion started by: cchiang12
3 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

Featured Tech Videos