LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-31-2011, 10:56 PM   #1
saagar
Member
 
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Rep: Reputation: 37
How to change ( masquerade) shell user name when sending mails via Postfix


Hi Happy New Year to all,


My query is as follows:

In my server, where postfix is running, I have a shell account as
sagar, I actually wanted to be seen by the world when they get
mail as "premsaagar@MyOriginatingDomainName.com".


So, I used the canonical_maps in /etc/postfix/main.cf as follows:

Code:
canonical_maps=hash:/etc/postfix/canonical
Then, in /etc/postfix/canonical :

Code:
sagar   premsaagar
then, from command line:

Code:
postmap /etc/postfix/canonical
/etc/init.d/postfix reload
When my friends receive my mail, it appears to them as:
Code:
from:	 sagar premsaagar@OriginatingDomainName.com
to:	 Receiver'sName@gmail.com
date:	 Sat, Jan 31, 2011 at 8:33 AM
It is working fine as far as username@domain.com, but I dont want the name "sagar" there ( that is my shell account name) How can I masquerade in such a way that it appears as premsaagar and not sagar?

Please help

Last edited by saagar; 12-31-2011 at 11:16 PM.
 
Old 01-04-2012, 06:17 PM   #2
VertigoRay
LQ Newbie
 
Registered: Sep 2003
Posts: 17

Rep: Reputation: 0
Smile

I just had a very similar issue. I wanted to masquerade my shell account when sending mail via a script to my customers. Unfortunately, I'm not sure how you're sending e-mail so I'm just going to tell you how I got my issue resolved:
Code:
$ echo "This is a test." | mail -a "From: \"Ray P.\" <vertigoray@mailinator.com>" -s "Test" you@mailinator.com
Hope this helps!
 
Old 01-10-2012, 09:10 PM   #3
saagar
Member
 
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Original Poster
Rep: Reputation: 37
Hi VertigoRay,

Sorry for the belated reply. I will check this out and update you.
Thanks
 
  


Reply

Tags
masquerade shell, postfix, user



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Block sending mails via telent in postfix amratta Linux - Networking 2 03-10-2012 08:54 AM
Thunderbird SMTP error while sending mails in Windows7 to Postfix rytec General 8 01-28-2011 09:24 AM
To restrict a user to send mails only to 3 e-mails IDs using postfix mail server sharath41 Linux - Newbie 2 07-21-2008 07:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration