Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 12-31-2011, 10:56 PM   #1
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 "".

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

Then, in /etc/postfix/canonical :

sagar   premsaagar
then, from command line:

postmap /etc/postfix/canonical
/etc/init.d/postfix reload
When my friends receive my mail, it appears to them as:
from:	 sagar
to:	 Receiver'
date:	 Sat, Jan 31, 2011 at 8:33 AM
It is working fine as far as, 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
LQ Newbie
Registered: Sep 2003
Posts: 17

Rep: Reputation: 0

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:
$ echo "This is a test." | mail -a "From: \"Ray P.\" <>" -s "Test"
Hope this helps!
Old 01-10-2012, 09:10 PM   #3
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.


masquerade shell, postfix, user

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:49 AM.

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