LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't pop from sendmail (https://www.linuxquestions.org/questions/linux-newbie-8/cant-pop-from-sendmail-164808/)

Nytehawk 03-31-2004 11:17 PM

Can't pop from sendmail
 
I finally got around to messing with sendmail. I edited the sendmail.mc file and then executed the make command. After a few test runs and playing with my MX record, I am able to send and recieve mail. My problem comes when I try to pop from the Linux box to the Winblows box. I've set up my account parameters to look at the internal ip address instead of looking out and then back in, and even tried using the domain name instead of the ip address (but I suspect that doing so won't work due to how my network is set up). Either way, I get the same result.

Quote:

Your server has unexpectedly terminated the connection. Possible causes for this include server problems, network problems, or a long period of inactivity. Account: 'mydomain.com', Server: 'internal.ip.address', Protocol: POP3, Port 110, Secure (SSL); No, Error Number: 0x800CCC0F
I've Googled the above error with no luck. I have also checked and confirmed that my POP3 is listening (netstat -vat) and can also telnet to localhost 110 and get the correct response.

My question is this: Has anyone run into this when setting up sendmail? If so, do you have any ideas or directions I could look to resolve the issue?

My current set up is:

Fedora Core 1 (kernel 2.4.22-1.2174)
sendmail 8.12.10
ipop3 installed via imap-2002d-3.i386.rpm


Thanks,
Nyte

ScooterB 04-01-2004 07:08 AM

Okay, this may sound stupid, but let me make sure I got this. You have a linux machine running sendmail and acting as a server. You have a windoze machine and you are running, lets say Outlook. And you are trying to retreive mail from the server to your windoze machine via pop3 to be dumped into Outlook. Do I have this correct?

skel 04-01-2004 08:27 AM

sendmail can only send and receive mail from the local machine. If you wan't to be able to receive your email on another machine with the linux box as the server then you need a pop3 or imap server as well.

Nytehawk 04-01-2004 09:24 AM

Quote:

You have a linux machine running sendmail and acting as a server. You have a windoze machine and you are running, lets say Outlook. And you are trying to retrieve mail from the server to your windoze machine via pop3 to be dumped into Outlook. Do I have this correct?
Yes. I have one Fedora Core 1 box and one XP PRO box. I want to grab the mail from the Linux machine with Outlook Express.


Quote:

sendmail can only send and receive mail from the local machine. If you wan't to be able to receive your email on another machine with the linux box as the server then you need a pop3 or imap server as well.
Let me make sure I understand what you said: sendmail can only send and receive mail FROM/TO the local machine, or can only do so ON the local machine? I can send and receive mail from both local users and from users on other domains. I have installed POP3 and changed the file to read like this:
Code:

# default: off
# description: The POP3 service allows remote users

# to access their mail \
# using an POP3 client such as Netscape Communicator, mutt, \
# or fetchmail.
service pop3
{

socket_type = stream
wait = no
user = root
server = /usr/sbin/ipop3d
log_on_success += HOST DURATION
log_on_failure += HOST
disable = no

}


Again, if I netstat -vat I do see that both POP and SMTP are listening. At this point, I'm beginning to think it might be something in the host.allow file. Anyone? Bueller? Bueller?

ScooterB 04-01-2004 09:46 AM

Try doing this: I will assume that you call your mail server mail.server.com. Instead of using the IP address in Outlook, use the name: mail.server.com. Do this for both port 25 and 110. Then go to the server and to a command prompt. Type in: tail -f /var/log/maillog. This will bring up your mail log in a real time fashion. You should be able to see yourself log on. You will have to enter your user name and password the first time. Come to think of it, I forgot something basic. Make sure that the user whom you are trying to retrieve mail for is a valid user on your linux machine. If they aren't then you won't be able to log in. In Outlook you will need to enter the EXACT same user name and password as the account user name and password as you have in Linux. Your email address may be John.doe@mail.server.com but your user name would have to be johndoe. Make sure that is correct in Outlook. Windoze will change the user name to reflect the email address and you must change it back to what is correct. Try that and repost. Also, I almost forgot, make sure that your firewall isn't blocking access. So make sure that ports 25 and 110 are open for receiving/sending mail.

Nytehawk 04-01-2004 10:01 AM

I opened the ports on the router, but I'll have to wait til I get home to check the firewall on the box itself (work prevents me from telnetting/sshing out of the building). Since I'm using a gateway router prior to the linux box, I use the internal ip address to access it from my winblows machine. Otherwise, I get the prompt to login to the router. I only have two users on the Linux box at the moment, root and nytehawk, and I'm using the nytehawk accout to test the POP.

Thanks for the suggestions. Now I just need the rest of the day to hurry along so I can go home and try them.


**EDIT** My wife just pointed out to me that if I get mail from outside sources, the ports are not being blocked by the firewall on the machine. *SMACK FORHEAD*


DavidPhillips 04-01-2004 01:24 PM

If you get mail into the sendmail server it comes in on port 25. If you using pop3 it is on port 110. Be sure to forward port 110 to the mail server.


Let me also say this. pop3 is not a good choice. Your password can be sniffed and then someone could use it to do all sorts of stuff.

You should use pop3s.


ScooterB 04-01-2004 04:40 PM

David, where can one learn more about pop3s and how does Outlook handle it? TIA!

Nytehawk 04-01-2004 10:56 PM

Well, I've tried all sorts of things. Toyed around with some stuff in /etc/host.allow, looked at the suggested pop3s file, confirmed that the service is in fact running, etc. etc. etc.

So far, nothing. :scratch: So, I'll keep plugging along. I'm also wondering how pop3s works with Outlook.

Thanks,

Nyte

**EDIT** and lokkit isn't very helpful either ;)

Nytehawk 04-01-2004 11:28 PM

No sooner had I posted the previous post than I toyed around with xinetd stuff and the firewall again. I noticed that once I disabled pop3 and then enabled pop3s, that I couldn't telnet to port 110, even from the local machine. So, I changed all that back, ran lokkit again and added pop3:tcp as one of the allowed protocols. Then I issued the following two commands

Code:

service xinetd restart
and

Code:

service iptables restart
I verified that I could telnet to both ports (25 and 110) from the local machine, and then I checked from the winblows machine. BINGO!! I started Outlook and was able to pop the 3 e-mails from /var/spool/mail/nytehawk.

So, thanks to all that helped. All the suggestions led me to look in the right places. Now on to figure out more about pop3s and the spam protection.

Thanks again,
Nyte

DavidPhillips 04-02-2004 02:23 AM

pop3s does not connect on port 110, that's the unsecure port. It a different server running on port 995

You can run them both if you like while testing, I would close the pop3 port before someone gets the password though.

to enable pop3s, and or disable pop3

chkconfig pop3s on
chkconfig ipop3 off

That's about it really, no setup required on the server end.


I use this, it does not matter what email client you have it will work. And it's secure.


http://www.linuxquestions.org/questi...ticle&artid=50

It is really good for remote users that need to send email through the mailserver. The same method may be applied for any service that you want to access remotely without worrying about someone accessing it.

Nytehawk 04-02-2004 07:59 AM

Thanks for that link. I can already see where it is going to be helpful. Your post actually brings up a new question for me. I think sendmail started including a list of allowed host somewhere around version 8.9. This list was to prevent someone not authorized to use the server from using smtp to route mail. In my case, I'm not going to have anyone other than myself and my wife, so I want to basically lock it down to the internal network for sending. All the while, knowing that I have to allow the inbound side.

Would SMTPs be better in this case?

wijnands 04-02-2004 08:03 AM

:(
I think I now remember why I went for postfix over sendmail.

DavidPhillips 04-02-2004 11:41 AM

Sendmail is a very good mail server, I use postfix and sendmail. I think it's a matter of knowing your needs and then configure it for them.

If it's local only on a very private network and it only allows smtp from the local net you would be okay with the non-auth smtp setup to allow the local lan only.


pop3 would be fine as well on your local net. pop3s and smtps would only actually be needed on a network that's not already secured. I use mine remotely most of the time, and my dialup isp blocks port 25, so I use smtps, and pop3s.

Nytehawk 04-02-2004 11:58 AM

I think I didn't state that clearly....the mail server I just set up will become the primary server for both my wife and I. We will be using it for e-mail with family and friends as well as each other. Basically, the only thing my ISP will soon be is the pipe provider.

But I think I got the jist ( or is that gist) of your post. Bottom line is that I want to make sure that the server isn't allowing anyone other than my wife and I to send (or relay) mail from my box.


All times are GMT -5. The time now is 04:43 AM.