Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
Posts: 344
Rep:
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?
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.
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?
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
Posts: 344
Rep:
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.
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*
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. So, I'll keep plugging along. I'm also wondering how pop3s works with Outlook.
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.
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.
Last edited by DavidPhillips; 04-02-2004 at 02:29 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.
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.
Last edited by DavidPhillips; 04-02-2004 at 11:47 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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.