Sending mail as another user (username masquerading)


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Sending mail as another user (username masquerading)
# 1  
Old 02-07-2010
Sending mail as another user (username masquerading)

I have sendmail as the smtp server. I want that all mails sent from user1 actually appears to come from user2(also should be reflected in mail header). How can i accomplish the task by tweaking sendmail or are there any other means to do so?
# 2  
Old 02-07-2010
Code:
/usr/lib/sendmail -fuser2  recipient <headers+text_of_email

Create the email including:

To: recipient@domain.com
From: user2
Reply-to: user2
Subject: aaaaa
text of email
# 3  
Old 02-07-2010
But the mail header is still reporting user1 in a particular section:

Received: (from user1@localhost)
by wiki.domain.com (8.13.8/8.13.8/Submit) id o181fs8H032195
for recipient@domain.com; Mon, 8 Feb 2010 05:41:54 +0400

How to get rid of this portion of the header or masquerade this portion of the header to report user2 instead of user1?

Last edited by proactiveaditya; 02-07-2010 at 10:04 PM..
# 4  
Old 02-08-2010
Set up an alias for user1.
# 5  
Old 02-10-2010
@jgt

Thanks.
Could you please guide me on how to set up an alias for a linux user.

If you wanna mean /etc/alliases, then i am confused for the fact that its meant for incoming mails and not for outgoing ones.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

/var/spool/mail/<username> files' content wipeout impact

Hi Guys!!! ->I am using AIX 6.1. One of the file system full which is /var filesystem. ->/var total size is 5.00 GB. ->And inside the /var file system spool/mail folde is taking around 2.9 GB. ->There 3 big size of file as shown below, which shows that these files are taking more size.... (4 Replies)
Discussion started by: manjusharma128
4 Replies

2. Red Hat

Problems sending mail: Difference between Mail and Mailx?

Whats the difference between mail and mailx? I'm trying to troubleshoot a problem where I can send mail from server A with this `echo $MESSAGE | mail -s "$SUBJECT" -r $FROM $RECIPIENTS` command but executing the same command from server B throws me this error (Both servers are RHEL) ... (1 Reply)
Discussion started by: RedSpyder
1 Replies

3. Shell Programming and Scripting

Stop sending mail after certain number of mail

Hi guys... I am busy writing a script to notify me via an mail if my application is down. I have done that. Now I want this script to stop sending mails after five mails were sent but the script should keep on checking the application. When the application is up again that count should be... (5 Replies)
Discussion started by: Phuti
5 Replies

4. Shell Programming and Scripting

Sending mail

Hi there, How can I send the automated log file, daily at 7 am to the respective mail . Thanks in Advance, Neha (2 Replies)
Discussion started by: NehaKrish
2 Replies

5. UNIX for Dummies Questions & Answers

How to get the username if I know only the user's UID?

Hi, I know the user's UID, but I need to know the user's username which has this UID. How can I do it?? Any ideas? Thanks! (7 Replies)
Discussion started by: rodrigoroma
7 Replies

6. Solaris

how to forward mail in /var/mail/username to external mail

Dear All, Now I use solaris 10 and I try to forward mail from /var/mail/username to their external mail so what should I do? thank u in advance (2 Replies)
Discussion started by: unitipon
2 Replies

7. HP-UX

hp ux not sending mail

Hi.. In Hp ux box,, mails are not being sent. they are getting queued up in mail queue. (3 Replies)
Discussion started by: kkhan
3 Replies

8. HP-UX

Sending mail thru HP-UX

I got stuckup with the issue of sending mail with attachment from HP-UX. Can any one please help me in resolving the issue. I am giving the criteria which i want below, 1. To address. 2. Cc address. 3. Subject 4. File attachment(the file i am using is :-- filename_`date +%Y%m%d`.CSV)... (1 Reply)
Discussion started by: medisetti
1 Replies

9. UNIX for Dummies Questions & Answers

sending a mail to a mail client

Hi everyone! I'm trying to create a database monitoring script that reads an alert file and sends an error message if it can 'grep' a particular string. Is there a way to send this message to a mail client using SMTP? Even better, is there any place on this site that has these kinds of... (5 Replies)
Discussion started by: solaris73
5 Replies
Login or Register to Ask a Question