Latest LQ Deal: Linux Power User Bundle
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 03-22-2013, 05:05 PM   #1
Registered: Sep 2005
Location: New Jersey, USA
Distribution: Centos 7 , Linux Mint 18.1 Under VMware in Win7
Posts: 479

Rep: Reputation: 34
Placing correct name in a variable.


I'm a newbie and following the directions on the CentOS Wikie in order to set up a mail server using Postfix. Below is an example of the items in the Postfix file which the instructions state have to be changed.

myhostname =
mydomain =
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks =,
relay_domains =
home_mailbox = Maildir/

When I issue the following command in a terminal window I see the following:
type hostname

My question is, do I need to replace the entries with the results of the hostname command listed above or just

When I type in the following nothing comes back as it appears these variables aren't sent anywhere:
Type $myhostname
Type $mydomain

Any help getting a clear answer to the above will be greatly appreicated.
Old 03-22-2013, 08:46 PM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,907

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Look at file /etc/hosts. You will find the hostname and domain name of your installation in that file. Those are the hostname and domain name to use in setting up Postfix.
Old 03-22-2013, 09:31 PM   #3
Senior Member
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Take backup of and then make following changes and try again:
myhostname = centos63
mydomain =
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks =,
relay_domains =
home_mailbox = Maildir/
Also set the same in /etc/hosts. Then chack using following cmds:
~$ hostname
~$ domainname


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
placing array into rows eoc92866 Programming 2 11-02-2010 11:02 AM
passing a shell variable into awk - syntax for correct interpretation? johnpaulodonnell Programming 3 06-19-2007 12:13 PM
Openoffice page placing 144419855310001 General 5 06-13-2007 11:34 AM
calling a function and passing a variable the correct way Programming 2 06-07-2007 09:44 PM
placing ksmoothdock on top? pablowablo Linux - Newbie 3 08-01-2004 10:42 AM > Forums > Linux Forums > Linux - Newbie

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