LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 08-25-2008, 02:53 AM   #1
avinash.rao
Member
 
Registered: Jun 2008
Posts: 197

Rep: Reputation: 30
Problem installing Postfix on Ubuntu 8.04


Hi all,

I am installing postfix from https://help.ubuntu.com/community/Po...efault%20setup and i am stuck at "Test your default setup" I am not able to telnet localhost 25, the error is telnet localhost 25
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

This worked immediately after i installed mailx. But, after a reboot the telnet just doesnt work. how can i test the default postfix setup. Also, is there way to remove the default sendmail attached to each user account. Because, sendmail was installed on this machine and i guess sendmail is the default mail service for each user account?

Thanks
Avinash
 
Old 08-25-2008, 08:24 PM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 62
Sendmail isn't attached to a user account. You can uninstall the sendmail package if you want.

Is postfix running ?

ps -elf | grep postfix

Is postfix listening on all interfaces?

netstat -anl --tcp | grep 25

Is a iptables blocking the port?

iptables -L
 
Old 08-26-2008, 02:46 AM   #3
avinash.rao
Member
 
Registered: Jun 2008
Posts: 197

Original Poster
Rep: Reputation: 30
Hi,

Is postfix running ?
NO! I am not able to start the service also, if i execute /etc/init.d/postfix start, i don't get any message, the prompt comes back.


How do i get this started?

netstat -anl --tcp | grep 25

No its not listening!

Is a iptables blocking the port?
The output of iptables -L

root@servername:~# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Quote:
Originally Posted by Mr. C. View Post
Sendmail isn't attached to a user account. You can uninstall the sendmail package if you want.

Is postfix running ?

ps -elf | grep postfix

Is postfix listening on all interfaces?

netstat -anl --tcp | grep 25

Is a iptables blocking the port?

iptables -L
 
Old 08-26-2008, 02:58 AM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 62
Look in /var/log/messages and /var/log/mail* for any messages related to the attempt to start postfix. Post those.
 
Old 09-11-2008, 03:40 AM   #5
avinash.rao
Member
 
Registered: Jun 2008
Posts: 197

Original Poster
Rep: Reputation: 30
#more mail.err.0

Aug 16 12:14:18 ns1 sendmail[7250]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 0: cannot open: No such file or direct
ory
Aug 16 13:01:42 ns1 sm-mta[7815]: NOQUEUE: SYSERR(root): hash map "access": missing map file /etc/mail/access.db: No such fil
e or directory
Aug 16 13:04:31 ns1 sm-mta[7820]: NOQUEUE: SYSERR(root): hash map "access": missing map file /etc/mail/access.db: No such fil
e or directory
Aug 16 13:13:34 ns1 sm-mta[7941]: NOQUEUE: SYSERR(root): hash map "access": missing map file /etc/mail/access.db: No such fil
e or directory
Aug 16 13:16:42 ns1 sm-mta[8300]: NOQUEUE: SYSERR(root): hash map "access": missing map file /etc/mail/access.db: No such fil
e or directory
Aug 16 13:34:02 ns1 postfix/sendmail[6102]: fatal: open /etc/postfix/main.cf: No such file or directory
Aug 16 13:37:37 ns1 postfix/sendmail[6108]: fatal: open /etc/postfix/main.cf: No such file or directory

All other log files are empty

Quote:
Originally Posted by Mr. C. View Post
Look in /var/log/messages and /var/log/mail* for
any messages related to the attempt to start postfix. Post those.
 
Old 09-11-2008, 03:54 AM   #6
avinash.rao
Member
 
Registered: Jun 2008
Posts: 197

Original Poster
Rep: Reputation: 30
Ok, i figured out that smtp was not installed (a package called apcaccess), after installing this i can atleast telnet to localhost. But, here's what is happening.

root@ns1:~# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
sendmail: fatal: open /etc/postfix/main.cf: No such file or directory
Connection closed by foreign host.

How do i solve this, i want to test this before i go ahead with the postfix installation.

Thanks!
Avinash
 
Old 09-11-2008, 12:44 PM   #7
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 62
You are using postfix, but do not have postfix's critical "main.cf" parameter configuration file. How did you install postfix?

It doesn't make sense to attempt to test postfix before you install postfix. Install postfix, and then test telnet localhost 25.
 
Old 09-13-2008, 05:08 AM   #8
avinash.rao
Member
 
Registered: Jun 2008
Posts: 197

Original Poster
Rep: Reputation: 30
I am installing Postfix from the link https://help.ubuntu.com/community/Po...efault%20setup

and the first step in this page is to install Postfix and mailx unless the apt-get install is meant for something else!!

Install Postfix

In this setup I assume that your domain is yourdomain.com and it has a valid MX record call mail.yourdomain.com. Remember to replace yourdomain.com with your actual domain in the example codes in this howto. Also I assume that you know what an MX record is. To find out MX your type in a terminal:

dig mx yourdomain.com

To install postfix

sudo apt-get install postfix

Intall mailx package for use as command mail utility program. Mail command is installed with this package.

sudo apt-get install mailx

And for sure postfix is installed on my machine as i did it myself.


Quote:
Originally Posted by Mr. C. View Post
You are using postfix, but do not have postfix's critical "main.cf" parameter configuration file. How did you install postfix?

It doesn't make sense to attempt to test postfix before you install postfix. Install postfix, and then test telnet localhost 25.
 
Old 09-13-2008, 05:20 AM   #9
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 62
Do you have a Sendmail installed and configured also ?

Postfix will not output the line in bold:

Code:
root@ns1:~# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
sendmail: fatal: open /etc/postfix/main.cf: No such file or directory
when you telnet to port 25. Postfix's sendmail compatibility binary is not used in this situation.

So this seems to leave one to believe your you have two MTAs installed. Perhaps the alternatives/mta setup is incorrect (more about this here: http://87.249.105.167/mirror/linuxtr...l/LiB0159.html).
 
  


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
Problem installing Ubuntu 8 Juvencio Linux - Newbie 5 07-05-2008 02:30 AM
problem with installing ubuntu 7.04... opmeena Linux - Newbie 4 01-12-2008 10:48 AM
problem while installing ubuntu 7.10 akt7488 Linux - Newbie 4 10-22-2007 08:39 AM
Problem installing Ubuntu 6.10 BehindUsDidnt Linux - Newbie 1 01-08-2007 12:15 AM
postfix srpm installing problem LinuxLover Linux - Software 3 01-30-2006 10:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

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