LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-21-2015, 03:07 AM   #1
daveginorge
Member
 
Registered: Oct 2006
Location: Porsgrunn, Norway
Distribution: CentOS 5 / 6 / 7
Posts: 107

Rep: Reputation: 16
Remapping root account email


Hi All
Postfix mail server.
I have mapped
Quote:
root@mydomain.com to fw@mydomain.com
but when sending emails it sill has root as the username eg
Quote:
root <fw@mydomain.com>
is there a way to map out the root username, if so how.
Thanks in advamce

Last edited by daveginorge; 12-21-2015 at 03:08 AM. Reason: Added mail server type
 
Old 12-21-2015, 04:53 AM   #2
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
Code:
root <fw@mydomain.com>
That is not the username, but the name. When you send mails from fw@mydomain.com, you'll need to specify 'Some Name <fw@mydomain.com>' or change the name for fw/root.

An email client will take whatever name it can when that is not properly setup.
 
Old 12-21-2015, 07:33 AM   #3
daveginorge
Member
 
Registered: Oct 2006
Location: Porsgrunn, Norway
Distribution: CentOS 5 / 6 / 7
Posts: 107

Original Poster
Rep: Reputation: 16
Hi Robert
Actually that is the username, it's being sent from the root account, so the name & username are the same in this case. I was just asking is it possible to map the root part to another name when sending emails from the root account.
 
Old 12-22-2015, 03:31 AM   #4
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
You can do this:

Code:
echo 'Some message here' | mailx -s 'My subject' -r 'Some name <fw@mydomain.com>' 'somebody@example.org'
mailx needs to be installed if you dont have it, 'somebody@example.org' is the person who you are writing to. Basically you need to control the 'From' header when sending a mail and you can put whatever you want.
 
Old 12-23-2015, 02:04 AM   #5
greenbergmethew
LQ Newbie
 
Registered: Dec 2015
Posts: 2

Rep: Reputation: Disabled
The system administrator can define email aliases in the file /etc/aliases. This file contains lines like root: cwd@mailhost.example.com, /root/mailbox; the effect is the same as having cwd@mailhost.example.com, /root/mailbox in ~root/.forward. You may need to run a program such as newaliases after changing /etc/aliases.

Note that the workings of .forward and /etc/aliases depend on your MTA. Most MTAs implement the main features provided by the traditional sendmail, but check your MTA's documentation.
 
Old 12-23-2015, 02:05 AM   #6
greenbergmethew
LQ Newbie
 
Registered: Dec 2015
Posts: 2

Rep: Reputation: Disabled
root@mydomain.com to fw@mydomain.com
but when sending emails it sill has root as the username eg
Quote:
root <fw@mydomain.com>
 
  


Reply


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
sending email still send to email to control account although it deleted from useres ahmedsa Linux - Server 3 04-10-2015 04:22 AM
Postfix: forward all account email within domain to another email account? 18Googol2 Linux - Software 3 03-04-2011 01:10 PM
is it legitimate and allowed and can be done to make another user account set uid and gid to null 0 to make another root account with different name and possibly not damage the debian system creating and using that new account BenJoBoy Linux - Newbie 12 01-29-2006 10:02 AM
cyrus email account linux account nobu Linux - Enterprise 0 10-31-2005 03:16 AM
issue sending email with non-root account xunzi Linux - Newbie 2 07-02-2004 09:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:19 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