Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 7th August 2007, 17:47
klonos klonos is offline
Member
 
Join Date: Apr 2007
Posts: 78
Thanks: 5
Thanked 3 Times in 3 Posts
Unhappy telnet localhost 25 not responding

Hello Falco and once again thank you for your great work on your Howto's.

I am a happy owner (or at least was till today) of a mail server setup as instructed in your "Virtual Users And Domains With Postfix, Courier And MySQL (Ubuntu 6.10 Edgy Eft)" tutorial.

I cannot connect to the mail server's smtp at all. Trying to troubleshoot it myself I tryied conecting locally through ssh and telneting port 25

The server replies:

Quote:
root@mail:~# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
but
no mater what I type next there is no response

If I telnet port 110, I get:

Quote:
root@mail:~# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
+OK Hello there.
quit
+OK Better luck next time.
Connection closed by foreign host.
root@mail:~#
as normally expected.

Same happens for both port 110 and 25 if I telnet from outside (internet). Pop replies and works fine, smtp replies but doesn't respond to any input.

What could be going wrong? Can you please guide me to troubleshoot this one?

Thank you in advance for your time.
Reply With Quote
Sponsored Links
  #2  
Old 8th August 2007, 02:54
geekman geekman is offline
Member
 
Join Date: Sep 2006
Location: Sydney, Australia
Posts: 56
Thanks: 1
Thanked 10 Times in 10 Posts
Send a message via ICQ to geekman Send a message via MSN to geekman
Default

Can you post the output of netstat -tap and your /var/log/mail.err and /var/log/mail.log files? Probably only need that second one, but it can't hurt

Thanks.
Reply With Quote
  #3  
Old 8th August 2007, 08:16
klonos klonos is offline
Member
 
Join Date: Apr 2007
Posts: 78
Thanks: 5
Thanked 3 Times in 3 Posts
Default

netstat has as follows:

Quote:
root@mail:~# netstat -tap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 localhost.localdo:10024 *:* LISTEN 3163/amavisd (maste
tcp 0 0 localhost.localdo:mysql *:* LISTEN 3258/mysqld
tcp 0 0 *:domain *:* LISTEN 3686/(squid)
tcp 0 0 *:smtp *:* LISTEN 3593/master
tcp 0 0 mail.[domain.gr]:smtp [other.domain1.gr]:57789 SYN_RECV -
...
tcp 71 0 localhost.localdom:smtp localhost.localdo:46880 CLOSE_WAIT -
tcp 1 0 mail.[domain.gr]:smtp [other.domain2.gr]:42504 CLOSE_WAIT -
...
tcp 1 0 mail.[domain.gr]:smtp [other.domain3.gr]:41484 CLOSE_WAIT -
tcp6 0 0 *:imaps *:* LISTEN 3476/couriertcpd
tcp6 0 0 *op3s *:* LISTEN 3514/couriertcpd
tcp6 0 0 *op3 *:* LISTEN 3493/couriertcpd
tcp6 0 0 *:imap2 *:* LISTEN 3457/couriertcpd
tcp6 0 0 *:www *:* LISTEN 13959/apache2
tcp6 0 0 *:ssh *:* LISTEN 3625/sshd
tcp6 0 0 *:https *:* LISTEN 13959/apache2
tcp6 0 0 mail.[domain.gr]:ssh [www.mydomain.gr]:4614 ESTABLISHED26799/0
...the only things I've changed there is that I deleted a few dozens of entries in CLOSE_WAIT state and replaced with "..." and replaced the real domain names for security sake.
Reply With Quote
  #4  
Old 8th August 2007, 08:57
klonos klonos is offline
Member
 
Join Date: Apr 2007
Posts: 78
Thanks: 5
Thanked 3 Times in 3 Posts
Default

The /var/log/mail.err kept on repeating of missing forwardings and transports files so I checked and they weren't there somehow

Quote:
Aug 8 08:23:35 mail postfix/proxymap[26889]: fatal: open /etc/postfix/forwardings.cf: No such file or directory
Aug 8 08:24:36 mail postfix/proxymap[26893]: fatal: open /etc/postfix/transports.cf: No such file or directory
Recreated them, chmod'ed them and chgrp'ed them to postfix group as instructed in falco's howto.

After restarting the server smtp is now working fine once again .

Words are not enough to thank you for pointing me to the right direction!!!

P.S. what could have deleted those files in the first place? The server was running fine for 2 months now without a problem.
Reply With Quote
  #5  
Old 8th August 2007, 08:59
klonos klonos is offline
Member
 
Join Date: Apr 2007
Posts: 78
Thanks: 5
Thanked 3 Times in 3 Posts
Default

Rechecking the /var/log/mail.err logfile it spits:

Quote:
Aug 8 08:31:27 mail dccifd[3521]: fopen(/var/run/dcc/dccifd.pid): No such file or directory
at the end. Any idea what needs to be done to resolve this??? or is it something I can safely ignore?

P.S. googling about /var/run/dcc/dccifd.pid gives some sites talking about spamassassin. Am I looking at the right direction this time?
Reply With Quote
  #6  
Old 8th August 2007, 09:59
geekman geekman is offline
Member
 
Join Date: Sep 2006
Location: Sydney, Australia
Posts: 56
Thanks: 1
Thanked 10 Times in 10 Posts
Send a message via ICQ to geekman Send a message via MSN to geekman
Default

Well I grepped my mail logs for "dcc" and all I saw was something about a report of rejected messages, so I guess you probably are in the right direction. If it's as simple as a missing pid file, make sure the service is running, if its not try manually starting it, if the missing pid file seems to be a critical (fatal) error then try touching the file it's looking for and try again. If that works, then you can tell it to touch the file on startup by adding it to one of the /etc/rc...something files...i'll have to check which one..../etc/rc.local I think? Also better add a chown command to make sure it's owned by root:dcc. I've never heard of this system but it looks like it is on my system too guess it installs with something else or I just can't remember it. I'll have to look into it some more later.

Thanks.
Reply With Quote
The Following User Says Thank You to geekman For This Useful Post:
klonos (8th August 2007)
  #7  
Old 8th August 2007, 11:28
klonos klonos is offline
Member
 
Join Date: Apr 2007
Posts: 78
Thanks: 5
Thanked 3 Times in 3 Posts
Default

Quote:
Well I grepped my mail logs for "dcc" and all I saw was something about a report of rejected messages, so I guess you probably are in the right direction.
It really rang a bell to me and I was right about it:

Quote:
Razor, Pyzor and DCC are spamfilters that use a collaborative filtering network. To install them, run
apt-get install razor pyzor dcc-client
The above is taken from falko's Howto.

runing apt-get install razor pyzor dcc-client gives:

Quote:
root@mail:/var/run# apt-get install razor pyzor dcc-client
Reading package lists... Done
Building dependency tree
Reading state information... Done
razor is already the newest version.
pyzor is already the newest version.
dcc-client is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
root@mail:/var/run#
As I expected, since they were installed.

Now here I come... I am an IT guy comming from the M$ world and those things you suggest that I try sound Greek to me (funny thing to say, since I am Greek myself ). I understand more or less what they mean and why I should do them for, but I don't know how. I will google for them a bit, but it would be great if you told me how to do it, that is if you could speare some time.

Quote:
If it's as simple as a missing pid file, make sure the service is running, if its not try manually starting it, if the missing pid file seems to be a critical (fatal) error then try touching the file it's looking for and try again.
...so one thing at a time. How do I try these 3 things?
Reply With Quote
  #8  
Old 8th August 2007, 11:38
geekman geekman is offline
Member
 
Join Date: Sep 2006
Location: Sydney, Australia
Posts: 56
Thanks: 1
Thanked 10 Times in 10 Posts
Send a message via ICQ to geekman Send a message via MSN to geekman
Default

Which three things do you mean? Installing razor rings a bell, I guess I must have installed those too. Installing those packages should fix your pid problem.

I see what you mean now about "three things", the three things not upgraded? It could just be coincidental that you installed three things and there are three that are out of date. Just run apt-get update see what that says. At least then you should know which packages it's talking about.

Thanks.
Reply With Quote
  #9  
Old 8th August 2007, 11:59
klonos klonos is offline
Member
 
Join Date: Apr 2007
Posts: 78
Thanks: 5
Thanked 3 Times in 3 Posts
Default

Quote:
Which three things do you mean? ... Installing those packages should fix your pid problem.
If you take a look at my previous post I tried runing apt-get install razor pyzor dcc-client and it replied that they are already installed and newest version as well.

Quote:
I see what you mean now about "three things", the three things not upgraded? It could just be coincidental that you installed three things and there are three that are out of date. Just run apt-get update see what that says. At least then you should know which packages it's talking about.
No, no... these three:

Quote:
make sure the service is running
1. which service? how? using what command?

Quote:
try touching the file it's looking for
2. How do I "touch" it??

Quote:
touch the file on startup by adding it to one of the /etc/rc...something files
3. I know you said you'll have to look this one up and find which /etc/rc file it needs to be placed in. So I'll just wait for this one.
Reply With Quote
  #10  
Old 8th August 2007, 12:40
geekman geekman is offline
Member
 
Join Date: Sep 2006
Location: Sydney, Australia
Posts: 56
Thanks: 1
Thanked 10 Times in 10 Posts
Send a message via ICQ to geekman Send a message via MSN to geekman
 
Default

Ok well i'm not so sure how to check if it's running since there is no dcc process and I will haven't researched it enough but basically I think what you need to do i touch it:
Code:
touch /var/run/dcc/dccifd.pid
This will create the empty file, the I would make sure the ownership is correct:
Code:
chown root:dcc /var/run/dcc/dccifd.pid
Now it would seem as though the problem is this file is not being created when it needs to be...so we should add something to make it created when you first start up. I am quite sure the file we need is rc.local, if you can't find it thats ok just create it, i'm quite sure the system will execute any commands within this file when you start up.

vim* /etc/rc.local

and then add in those two commands to the file.

* Use a different editor if you wish.

Hope that makes sense, thanks.
Reply With Quote
The Following User Says Thank You to geekman For This Useful Post:
klonos (8th August 2007)
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
postfix problems with smtp linkdeb Server Operation 13 15th March 2014 18:58
Can't connect to Courier-IMAP dekat Server Operation 11 2nd May 2007 16:00
maildir not created t_ras Installation/Configuration 3 1st July 2006 13:52
Internet Mail Problem deezone Installation/Configuration 9 22nd February 2006 22:09
Virtual Users + Domains With Postfix etc. byw HOWTO-Related Questions 6 20th February 2006 11:10


All times are GMT +2. The time now is 20:31.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.