LinuxQuestions.org
Visit Jeremy's Blog.
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 03-22-2013, 05:05 PM   #1
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, (Which Exit), USA
Distribution: Centos 5 Under VMware in WinXP CentOS 5.3 all under VMware
Posts: 419

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


Greetings,

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 Main.cf file which the instructions state have to be changed.

myhostname = mail.example.com
mydomain = example.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 192.168.0.0/24, 127.0.0.0/8
relay_domains =
home_mailbox = Maildir/

When I issue the following command in a terminal window I see the following:
type hostname
centos63.xyz.com.

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

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.
Thanks
 
Old 03-22-2013, 08:46 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,838

Rep: Reputation: 340Reputation: 340Reputation: 340Reputation: 340
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
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,797
Blog Entries: 4

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


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
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 ForYouAndI.com Programming 2 06-07-2007 09:44 PM
placing ksmoothdock on top? pablowablo Linux - Newbie 3 08-01-2004 10:42 AM


All times are GMT -5. The time now is 05:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration