Operating System - Linux
1822521 Members
2736 Online
109642 Solutions
New Discussion юеВ

Configuring pop3 mail server

 
SOLVED
Go to solution
steven Burgess_2
Honored Contributor

Configuring pop3 mail server

I have the below services running

ipop3
pop3s
imap
imaps

I've tried to set up this pop3 mail server, but when I try and send mail from the pop3 client. I get a message saying that it cannot connect to port 25 (ssl) on the server. I can retreive my mail from the pop3 server with the client, but not send.
Any ideas of things to try?
take your time and think things through
10 REPLIES 10
Tony Contratto
Respected Contributor

Re: Configuring pop3 mail server

Steven,

Mail is sent via SMTP. You will need to install and configure a SMTP server. The most common of these would be:

Sendmail
Postfix
Exim

Any of those should get you going...

Tony
got root?
Steven E. Protter
Exalted Contributor

Re: Configuring pop3 mail server

service ipchains stop
or
service iptables stop

Make sure the firewall isn't messing with you.

check the configuration of which firewall you are using in /etc/sysconfig

Make sure port 110 is open for popmail and 25 is open for sendmail

When doing sendmail, you need to be strict about what if any servers are allowed to relay on port 25. If you are exposed to the net, you don't want to be a spam relay center.

About half the time when something doesn't work on my two Linux boxes(upon which a web hosting biz rests) its the flipping firewall. Or to be more accurate, what sysadmin(me) did to the firewall.

P
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven E. Protter
Exalted Contributor

Re: Configuring pop3 mail server

A little more backgroud.

contents of /etc/xinetd.conf

[root@jerusalem root]# cd /etc/
[root@jerusalem etc]# more xinetd.conf
#
# Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/

defaults
{
instances = 60
log_type = SYSLOG authpriv
log_on_success = HOST PID
log_on_failure = HOST
cps = 25 30
}

includedir /etc/xinetd.d


pop3s file in the above directory.

Counter intuitive as it is no to let the service enable.

# default: off
# description: The POP3S service allows remote users to access their mail # using an POP3 client with SSL support such as fetchmail.
service pop3s
{
socket_type = stream
wait = no
user = root
server = /usr/sbin/ipop3d
log_on_success += HOST DURATION
log_on_failure += HOST
disable = no
}

For sendmail ...

chkconfig --level 345 sshd on
serivce sendmail start

Actually a littel nicer than HP-UX huh?

Should have been all one post.
P
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven E. Protter
Exalted Contributor

Re: Configuring pop3 mail server

and yeah, that should say

service sendmail start

darn it. them fingers are not listening.

P
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Stuart Browne
Honored Contributor

Re: Configuring pop3 mail server

The other thing you might need to do to get sendmail working (on a RedHat box atleast (You've not said what distribution you are using)) is to make sure it is listening to external interfaces.

RedHat, by default, limits sendmail to listening on the local intarface only.

To change this, you will need to modify /etc/mail/sendmail.mc and rebuilt your sendmail.cf using the 'm4' command. i.e.

m4 /etc/mail/sendmail.mc > /etc/sendmail.cf

(This is assuming RH7 or earlier. sendmail.cf lives in /etc/mail/ on RH8).
One long-haired git at your service...
Steven E. Protter
Exalted Contributor

Re: Configuring pop3 mail server

Here is a script for building the hash databases after you customize relays and such.

Attached, tested and production.

P
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Stuart Browne
Honored Contributor

Re: Configuring pop3 mail server

Umm Steve, you do know that RH7+ comes with a Make script which does everything except for 'newalaises' and the 'm4' for the 'cf' file?

In RH8, it does that as well!

You just need to change to /etc/mail/, and issue 'make'.

To make life even easier, if you start/stop sendmail using /etc/init.d/sendmail start/stop, it does all of that for you anyway!

.. once again, this is on a RH box ..
One long-haired git at your service...
steven Burgess_2
Honored Contributor

Re: Configuring pop3 mail server

Hi chaps

First of all, thanks for the info, but I still have the same problem.
I'm running RH8.

I've switched off the firewall, stopped and started all of the services, but still no joy.
I've had a look at netstat -a, and here is what is says: -

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:32768 *:* LISTEN
tcp 0 0 *:imaps *:* LISTEN
tcp 0 0 *:printer *:* LISTEN
tcp 0 0 *:pop3s *:* LISTEN
tcp 0 0 localhost.localdo:32781 *:* LISTEN
tcp 0 0 *:pop2 *:* LISTEN
tcp 0 0 *:pop3 *:* LISTEN
tcp 0 0 *:imap *:* LISTEN
tcp 0 0 *:sunrpc *:* LISTEN
tcp 0 0 *:x11 *:* LISTEN
tcp 0 0 *:http *:* LISTEN
tcp 0 0 *:ssh *:* LISTEN
tcp 0 0 *:telnet *:* LISTEN
tcp 0 0 localhost.localdom:smtp *:* LISTEN
tcp 0 0 *:https *:* LISTEN


I'm thinking that it might be something to do with the smtp line, but not sure.

I started off trying to configure a pop3 client on a remote machine, but with no joy, so I'm now trying a pop3 client actually on the server, just to try and eliminate any network problems.

Any more help that you might have, or anything you want to know about my machine would be helpful.

Regards

Steve
take your time and think things through
U.SivaKumar_2
Honored Contributor
Solution

Re: Configuring pop3 mail server

Hi Steve ,

your output of netstat clearly suggests that sendmail is only listening in 127.0.0.1 at port 25.

tcp 0 0 localhost.localdom:smtp *:* LISTEN

For sending mails from POP3 client , the POP3 client should be able to connect to the server SMTP port 25.

So to enable sendmail to listen on port 25 on LAN interface IP address , do this.

Edit /etc/sendmail.cf
there is a line like this already

O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA

Put this new line.

O DaemonPortOptions=Port=smtp,Addr=90.0.0.50, Name=MTA

Where 90.0.0.50 is the IP address of the LAN interface.

Replace the IP address of your Server's.

Save the file and reboot.

Now netstat -an will show smtp port listening on the server's IP address also.

Hope your problem is solved.

regards,
U.SivaKumar





Innovations are made when conventions are broken
steven Burgess_2
Honored Contributor

Re: Configuring pop3 mail server

Hi everyone

I have found the problem was that Sendmail was only listing to the local host address.

Thanks again

Steve
take your time and think things through