Skip to main content

QMAIL port 25 and 110 are closed

Qmail installation went fine .But I was unable to connect to port 25 and 110.They were in closed state.When I tried to connect with telnet I got the “Connection refused” message.



# qmailctl stat
/service/qmail-send: up (pid 2219) 37 seconds
/service/qmail-send/log: up (pid 2311) 37 seconds
/service/qmail-smtpd: up (pid 2917) 1 seconds
/service/qmail-smtpd/log: up (pid 2723) 37 seconds
/service/qmail-pop3d: up (pid 2724) 1 seconds
/service/qmail-pop3d/log: up (pid 2989) 37 seconds
messages in queue: 0
messages in queue but not yet preprocessed: 0

Looks good but when I try to connect on the mail server I got the connection problem.

]# telnet localhost 110
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused


# telnet localhost 25
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused



I have checked the logs for qmail-smtpd and qmail-pop3d and contains a lots of error lines like the following:
tcpserver: fatal: temporarily unable to figure out IP address for 0.0.0.0: file does not exist

I tried nmap

# nmap localhost

Starting nmap 3.70 ( http://www.insecure.org/nmap/ ) at 2007-11-05 10:47 IST
Interesting ports on localhost.localdomain (127.0.0.1):
(The 1655 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
80/tcp open http
111/tcp open rpcbind
143/tcp open imap
443/tcp open https
877/tcp open unknown
3306/tcp open mysql

Nmap run completed -- 1 IP address (1 host up) scanned in 0.224 seconds

Here the ports 25 and 110 are closed


# qmailctl stop
Stopping qmail...

qmail-smtpd
qmail-send
qmail-pop3d

# qmailctl start
Starting qmail...

Starting qmail-send
Starting qmail-smtpd
Starting qmail-pop3d


# qmailctl stat
/service/qmail-send: up (pid 2921) 37 seconds
/service/qmail-send/log: up (pid 2926) 37 seconds
/service/qmail-smtpd: up (pid 3144) 1 seconds
/service/qmail-smtpd/log: up (pid 2934) 37 seconds
/service/qmail-pop3d: up (pid 3149) 1 seconds
/service/qmail-pop3d/log: up (pid 2938) 37 seconds
messages in queue: 0
messages in queue but not yet preprocessed: 0


# nmap localhost

Starting nmap 3.70 ( http://www.insecure.org/nmap/ ) at 2007-11-05 10:47 IST
Interesting ports on localhost.localdomain (127.0.0.1):
(The 1655 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
80/tcp open http
111/tcp open rpcbind
143/tcp open imap
443/tcp open https
877/tcp open unknown
3306/tcp open mysql

Nmap run completed -- 1 IP address (1 host up) scanned in 0.224 seconds

Finally I've got the solution from
QmailRocks

For the can't find IP address, fix this by "touch /etc/dnsrewrite"

I did the same "touch /etc/dnsrewrite" and a QMAIL RESTART.


# touch /etc/dnsrewrite
# qmailctl restart


It worked. Great.


# nmap localhost

Starting nmap 3.70 ( http://www.insecure.org/nmap/ ) at 2007-11-05 10:47 IST
Interesting ports on localhost.localdomain (127.0.0.1):
(The 1655 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
25/tcp open smtp
80/tcp open http
110/tcp open pop3
111/tcp open rpcbind
143/tcp open imap
443/tcp open https
877/tcp open unknown
3306/tcp open mysql

Nmap run completed -- 1 IP address (1 host up) scanned in 0.224 seconds

Comments

Popular posts from this blog

Check remote UDP connectivity from Linux

Hi there, You all know how to check TCP port connectivity from a Linux or UNIX machine to a remote machine using telnet as per th example below $ telnet 127.0.0.1 25 but we can't adopt TELNET to check UDP connectivity. Linux and most of the UNIXes come with a network layer utility called nc (abbreviation for netcat) which is very useful to check UDP connectivity and to explore a lot with both TCP and UDP. An example is shown below # nc -v -u -z -w 3 172.24.16.131 123 Connection to 172.24.16.131 123 port [udp/ntp] succeeded!

The best putty package available

Bored of Black screened Task bar filling putty? Issues with porting Saved sessions from machine to machine? Do you like tabbed SSH sessions? Start using portaputty instead of normal putty and link it with puttycm . Puttycm supports sessions to be saved in its own Database files. You can use the Putty sessions you have saved already right inside putty. You can have any number of databases which allow you to arrange Remote servers in folders and convenient namings. I personally recommend creating Database with puttycm rather than using the sessions saved in putty which doesn't offer any option to create folders and saving sessions under that directory tree. You can even save username/password to get it logged automatically and there is an option to pass commands to be run soon after login. I can't recommend this since some bug was found with these options. Portaputty is a variant of putty which stores all the Configuration data in text files instead of MS Window

PING.sh

#!/usr/bin/env bash ## Ping all machines in a Network PING="$(which ping) -c 1 -W 1" echo "Enter Subnet(eg:192.168.0)" read Subnet echo "Do you want to PING the entire network or a RANGE of IPs ? Enter your choice" echo 1. Ping Entire Network echo 2. Ping a RANGE read choice if [ $choice = 1 ]; then { echo Pinging..... for((i=1;i<255;i++)); do ${PING} ${Subnet}.${i} > /dev/null 2> /dev/null if [ $? -eq 0 ]; then echo -e "${Subnet}.${i} is up" fi done } fi if [ $choice = 2 ]; then { echo Enter the Starting IP of Range read a echo Enter the Last IP of Range read b echo Pinging..... for((i=$a;i<$b;i++)); do ${PING} ${Subnet}.${i} > /dev/null 2> /dev/null if [ $? -eq 0 ]; then echo -e "${Subnet}.${i} is up" fi done } fi exit 0