telnet localhost 25 not responding

Discussion in 'HOWTO-Related Questions' started by klonos, Aug 7, 2007.

  1. klonos

    klonos New Member

    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:

    no mater what I type next there is no response

    If I telnet port 110, I get:

    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.
  2. geekman

    geekman New Member

    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 :)

  3. klonos

    klonos New Member

    netstat has as follows:

    ...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.
  4. klonos

    klonos New Member

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

    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.
  5. klonos

    klonos New Member

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

    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/ gives some sites talking about spamassassin. Am I looking at the right direction this time?
  6. geekman

    geekman New Member

    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.

  7. klonos

    klonos New Member

    It really rang a bell to me and I was right about it:

    The above is taken from falko's Howto.

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

    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 :p ). 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. one thing at a time. How do I try these 3 things?
  8. geekman

    geekman New Member

    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.

  9. klonos

    klonos New Member

    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.

    No, no... these three:

    1. which service? how? using what command?

    2. How do I "touch" it??

    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.
  10. geekman

    geekman New Member

    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:
    touch /var/run/dcc/
    This will create the empty file, the I would make sure the ownership is correct:
    chown root:dcc /var/run/dcc/
    Now it would seem as though the problem is this file is not being created when it needs to 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.
  11. geekman

    geekman New Member

    Oh yes, it is in fact just a bash script the system will execute, so you need the shebang line. Something like the following:

    #!/bin/sh -e
    # rc.local
    # This script is executed at the end of each multiuser runlevel.
    # Make sure that the script will "exit 0" on success or any other
    # value on error.
    # In order to enable or disable this script just change the execution
    # bits.
    # By default this script does nothing.
    mkdir /var/lock/mrtg/
    exit 0
    You can see here that I have told the system to make the /var/lock/mrtg directory on startup as that was an issue when trying to create a file for mrtg when it started up.


Share This Page