LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-26-2010, 06:50 AM   #1
medspec
LQ Newbie
 
Registered: Jan 2009
Posts: 11

Rep: Reputation: 0
Angry Postfix installation - not working


hi there .. i am a new user of linux (CentOS 5.5).

I am trying to use Postfix as my first step in the learning to send / receive email. I have tried almost all ways but failed to send email. Linux is indeed quit difficult.

I installed posfix 2.3 using yum install postfix. I dont have any DNS yet.

my postfix main.cf settings are:

myhostname = example.com
mydomain = localhost (even tried example.com, $mydomain here but failed)
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost
mynetworks = 192.168.1.100/24, 127.0.0.1/8
no aliases database but
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases

my /etc/hosts file:
127.0.0.1 example.com localhost.localdomain localhost
#192.168.1.102 example.com
::1 localhost6.localdomain6 localhost6

/etc/resolv.conf
; generated by /sbin/dhclient-script
nameserver 192.168.15.1

service postfix start [ok]

maillog:

Aug 26 10:32:22 domain postfix/master[5333]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
Aug 26 10:32:24 domain postfix/local[5384]: fatal: open database /etc/postfix/aliases.db: No such file or directory
Aug 26 10:32:25 domain postfix/master[5333]: warning: process /usr/libexec/postfix/local pid 5384 exit status 1
Aug 26 10:32:25 domain postfix/master[5333]: warning: /usr/libexec/postfix/local: bad command startup -- throttling

when I try to send local email using mail user, maillog shows:

Aug 26 10:49:47 domain postfix/qmgr[5536]: D6E1B2A0AD: from=<root@example.com>, size=319, nrcpt=1 (queue active)
Aug 26 10:49:47 domain postfix/qmgr[5536]: 2D66029D49: from=<root@localhost>, size=287, nrcpt=1 (queue active)
Aug 26 10:49:47 domain postfix/qmgr[5536]: AC46B29D4A: from=<root@localhost>, size=273, nrcpt=1 (queue active)
Aug 26 10:49:47 domain postfix/qmgr[5536]: 372DE2A0A8: from=<root@example.com>, size=303, nrcpt=1 (queue active)
Aug 26 10:49:47 domain postfix/qmgr[5536]: 920982A0BC: from=<root@example.com>, size=280, nrcpt=1 (queue active)
Aug 26 10:49:48 domain postfix/pickup[5535]: 5DF7229CB3: uid=0 from=<root>
Aug 26 10:49:48 domain postfix/cleanup[5537]: 5DF7229CB3: message-id=<20100826054948.5DF7229CB3@example.com>

and when I telnet localhost 25, it hangs with this message:

Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.

no welcome message at all.

Please help as I am totally trapped ...
 
Old 08-27-2010, 02:03 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

Does the aliases file exist in that directory and did you run the postmap command to create the aliases database?
Code:
locate aliases (to find out if the file exists and where it's located)
postmap /etc/postfix/aliases (to create the db file for postfix to use)
After that, restart or reload postfix and see if it starts without errors.

Kind regards,

Eric
 
Old 08-27-2010, 06:15 AM   #3
medspec
LQ Newbie
 
Registered: Jan 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Re:

Thanks for the reply. Yeh I managed to run it successfully and now can query using telnet as well.

My questions now:

1. How to send outbound email now? Because on the present settings I am unable to do so.
2. How to create virtual emails and domains? If possible, send me a url which has described setup of email server without mysql authentication.

Thanks.
 
Old 08-27-2010, 06:28 AM   #4
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
For the second query read this tutorial.
As far as sending goes, you will need to have a proper dns settings and MX records for the domain pointing to your server. Else the sending of messages will fail with bounced back messages from the destination server. To use external server as relay for sending, search LQ. There is one very big discussion on the same.
 
Old 08-27-2010, 06:30 AM   #5
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

Glad you got that part fixed. Now for the configuration of a 'full blown' mail server, there are various ways, all depending on your choice of software packages you prefer. Here are some links to two pretty complete guides and a site where you'll find lots of howtos, easy to follow, almost copy/paste to obtain what you want. Don't worry too much about the distros used, that's easily changed to your distro if you know your way around the one you use.

How to set up a mail server on a GNU / Linux system
Creating a Linux Mail Server
HowToForge (just look at the left under Email.

Of course when in trouble or with questions when trying out the howtos, you can always turn here for help.

Hope that helps.

Kind regards,

Eric
 
Old 08-28-2010, 01:09 AM   #6
medspec
LQ Newbie
 
Registered: Jan 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Re:

Thank you very much for the links.

Which one is better: Postfix+Dovecot+MySQL or Postfix+Dovecot+LDAP ?

In a server with large databases and frequent mysql access, shouldnt we go for 2nd option because there is always a chance of mysql getting slow.

2ndly, tell me a best site for learning linux Firewall and preventing hacking etc and to make server more secure ..

thanks once again
 
Old 08-28-2010, 01:14 AM   #7
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
I would personally go for LDAP. You can have multiple servers authenticating with LDAP for multiple resources shared over a network. For learning firewalls on linux, you could start with netfilter.org.
 
Old 08-28-2010, 01:18 AM   #8
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

You're welcome! I cannot tell you which one is the 'better' one. In my belief they both have advantages depending on the use. I only setup with MySQL and that works perfect for me. Never suffered slowness in MySQL access but then again I'm not using it on a large scale.

Here at LQ exists a great Security References thread which I think would be a great starting point if you're serious about security. In that thread you'll find lot's of links to Linux firewall howtos also so I suggest you start your reading there.

Kind regards,

Eric
 
  


Reply



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
[SOLVED] Postfix smtpd_recipient_restrictions not working (postfix, amavis, SA, BSD) andrewggrant *BSD 2 08-29-2012 11:41 AM
Postfix TLS working fine but SSL over port 25 not working bob808 Linux - Server 10 07-25-2009 09:20 PM
Postfix not working tdnnash25 Linux - Server 16 04-27-2009 03:34 PM
Help! postfix is not working importboy03 Linux - Software 17 01-03-2009 12:31 PM
Postfix not working rjcrews Debian 3 05-03-2006 09:08 AM

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

All times are GMT -5. The time now is 01:45 AM.

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