LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-09-2004, 05:07 AM   #1
htm
Member
 
Registered: Mar 2004
Posts: 162

Rep: Reputation: 30
email server problem


Folks,

Finally I got my sendmail works on my redhat 9.0,
it allows me to send email to anywhere. Through
ps -aux | grep imapd, I also notice that my imap server
also up and running

Now I ping my server from outside with
ping mail.real_domainname.com, I find it's just fine.

BTW my server is outside my office's LAN, my sever's firewall
setting is advanced (standard setting) with only http port openedso I use mozailla 1.6
to try to configure email receiving and sending, I set
in & out server as mail.real_domainname.com, but was unable
to connect with my email sever: time out error, why?

One more thing, is if I telnet my_server_real_IP_addr 143 or 25,
I found connection failed? How do I debug it?



Thx,
HTM
 
Old 04-09-2004, 07:11 AM   #2
mcleprechaun
Member
 
Registered: Oct 2003
Location: Missouri
Distribution: Slackware
Posts: 32

Rep: Reputation: 15
I don't understand exactly how you are set up. Is your firewall on the mail server? Our mailserver is also outside of our lan and we access it through a separate PC that is just a firewall/router. The mail server receives mail for all our users and we retrieve it through the firewall using the pop3 protocol. If the http port is the only one open on your mail server, you will not be able to connect using smtp, imap, or pop protocols. We actually have another mail server inside that handles the distribution to lan users and retrieves the mail using fetchmail running as a cron job. You might want to consider a similar setup.
 
Old 04-09-2004, 10:20 AM   #3
htm
Member
 
Registered: Mar 2004
Posts: 162

Original Poster
Rep: Reputation: 30
2 basic questions I don't understand

Sir,

So far I have 2 questions confusing me:

1. At my remote server (outside of my LAN), i can send email to anywhere,
but could not receive email, why? Which basic configuration I should do?

2. Now I need to use impad and smtp for remoting email accessing such
as Mozilla mail client, when I do a telnet mail.my_domain.com 143 at
my remote server locally, it's fine; but connection refused if I telnet remoetly;
why? which ports I need to open besides https to make both smpt and imap work?
Furthermore, at my remote server, when I do a telnet mail.my_domain.com 25,
it fails as well, let alone I do it remotely, why?

I have a static IP< my ISP has configured DNS server to bind www.my_domain.com and
mail.my_domain.com to my static IP, do I need to do anything else to recieve email?

Thx,
HTM

>I don't understand exactly how you are set up. Is your firewall on the mail server? Our >mailserver is also outside of our lan and we access it through a separate PC that is just a >firewall/router. The mail server receives mail for all our users and we retrieve it through the >firewall using the pop3 protocol. If the http port is the only one open on your mail server, you >will not be able to connect using smtp, imap, or pop protocols. We actually have another >mail server inside that handles the distribution to lan users and retrieves the mail using >fetchmail running as a cron job. You might want to consider a similar setup.
 
Old 04-09-2004, 11:15 AM   #4
chaan
LQ Newbie
 
Registered: Jan 2004
Location: Stillwater, OK
Distribution: Slackware, RedHat, Fedora, Knoppix
Posts: 14

Rep: Reputation: 0
/etc/mail/sendmail.mc

Have you modified your sendmail.mc (and done a 'make -C /etc/mail') to allow mail to be sent from machines other than localhost? The following line has to be commented out in that file:
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA') dnl
Comment it out by putting dnl at the beginning of the line.

Chris
 
Old 04-09-2004, 11:20 AM   #5
htm
Member
 
Registered: Mar 2004
Posts: 162

Original Poster
Rep: Reputation: 30
receiving instead of send

Chris,

My current problem on the server side is the receiving problem, not the
sending problem, I can send email to anyone in the wrold with
my_user_name@my_domain_name.com

But I could not receive email, how to open my SMTP (25) port bu starting SMTP
service? Since I did a telnet at 25 port, connection refused.

Now if I can fix my email receiving problem at my local server, my next step
is to use SMTP and imap services to send and receive email remotlely through
an email client like Mozilla.

Anyway I am still at step one.

Thx,
HTM


>Have you modified your sendmail.mc (and done a 'make -C /etc/mail') to allow mail to be sent from machines other than localhost? The following line has to be commented out in that file:
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA') dnl
Comment it out by putting dnl at the beginning of the line.

Chris
 
Old 04-09-2004, 11:43 AM   #6
htm
Member
 
Registered: Mar 2004
Posts: 162

Original Poster
Rep: Reputation: 30
I found your inputs is highly valuable

Chris,

Pls clarify on how I should change my
sendmail.mc, correct me me if I am wrong:

Change
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA') dnl

to by commenting (is dnl equivalent to commenting)

dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA') dnl

Now will that have side effect on stoping my sending email to outside world?
I am afraid

BTW, when I do a telnet mail.my_domain.com 25 at my local server, it says
connection refused, will that also leads to my email receiving problem?

Thx,
HTM







> Have you modified your sendmail.mc (and done a 'make -C /etc/mail') to allow mail to be sent from machines other than localhost? The following line has to be commented out in that file:
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA') dnl
Comment it out by putting dnl at the beginning of the line.

Chris
 
Old 04-09-2004, 11:59 AM   #7
chaan
LQ Newbie
 
Registered: Jan 2004
Location: Stillwater, OK
Distribution: Slackware, RedHat, Fedora, Knoppix
Posts: 14

Rep: Reputation: 0
Yes, dnl is equivalent to commenting in that file - you should see many such commented lines in there. Commenting that line will just open the SMTP port (port 25) to connections from outside hosts. If outside hosts cannot connect to port 25, they can't send mail to you.
That directive basically limits connections to port 25 to localhost, 127.0.0.1, so if you comment the line, it makes it possible for any host to connect to that machine for mail delivery. It will not prevent you from sending e-mail to other hosts. When you send e-mail to another host, your local port 25 is not involved. You machie establishes a connection to the remote host's port 25.

Port 25 receives e-mail from other host as well as from PCs that use this server as their outgoing mail server. Basically, any mail that enters your mail server goes through that port. After the server receives the incoming mail, it determines what to do with it based on the address rules built in. In basic terms, if it's for local users (who retrieve their mail from this server) it will use procmail (usually) to copy the message into their inbox, and if it's for a user on another host, the server will attempt to contact that host to deliver the message.

Anyway, just try commenting the line and running 'make -C /etc/mail' then restart your sendmail (probably '/etc/rc.d/init.d/sendmail restart') and see if that takes care of the problem. If not, you can change it back easily, but I think this is the problem.

Let me know if it you still have trouble after trying this and I will see what else I can think of.

Chris
 
Old 04-09-2004, 10:20 PM   #8
htm
Member
 
Registered: Mar 2004
Posts: 162

Original Poster
Rep: Reputation: 30
email receiving now works

Chris,

Thx a lot, just by commenting the line in sendmail.cf, now I can receive
email on my remote server, thx a lot.

However, somehow I found now I cannot send email to outside, e.g. my yahoo
email account cannot recieve my email any more, why? That is why I hesitate
to change the configuration file. My /etc/hosts file is like this:

real_ip_addr my_domain my_domain.com my_domain

Shall I change to

real_ip_addr my_domain my_domain.com mail.my_domain.com

(I do have mail.my_domain.com done by my ISP's DNS setup)

One more thing, suppose I can recover email sending capability, I plan to use
Mozilla 1.6 as my local mail client (my server is remote), currently I can
telnet real_ip_addr 25 remotely, which means I am able to send email remoetly
through Moziall (correct me if I am wrong), but I cannot telnet telnet real_ip_addr 143
(I am using imap, I am sure imapd is running) remoetly

Now when I login to my remote server, I did 2 telnets:

1. telnet 127.0.0.1 25 - connection refused, why?

2. telnet real_ip_addr 25 - just fine, why?

Again I really appreciate your help as well as this super forum

HTM
 
Old 04-09-2004, 10:52 PM   #9
htm
Member
 
Registered: Mar 2004
Posts: 162

Original Poster
Rep: Reputation: 30
sending email through Mozialla problem

Chris,

One more thing, since I can telnet real_ip_addr 25 remotely, I just
tried the configuring Mozailla to test remote email sending, when I send email
to my yahoo account, I foudn such problem:

An error occurred while sending email.
The mail server responded: 5.7.1
<frafromcrowded@yahoo.com> ... Relaying denied
IP name lookup failed [another_ip_addr}

That another_ip_address I am sure is my ISP's ip address assigned to
me among others in sharing the same port, not my internet IP address,
how should I resolve this? Shall I talk to them to use 2-level relay
(from my remote server to theirs, and from their to my local server)?

Thx,
HTM
 
Old 04-10-2004, 12:28 AM   #10
htm
Member
 
Registered: Mar 2004
Posts: 162

Original Poster
Rep: Reputation: 30
both sending & receiving email works on remote server

Chris,

Thxs again, since Yahoo regards my email as spam, the email I sent
went to Bulk email, so actually now both arec OK

Regarding imap port problem, since I am starting to work on
remote email access problem using Mozilla client, just repeat my problem:

telnet 127.0.0.1 143 - connection refused

telnet real_ip_addr 145 - fine (at remote server)

telnet real_ip_addr 145 - connection refused (from my local sever of my LAN)

Since I install currier-imap by myslf, shall I change 2 things:

1. /etc/xinetd.d/imap file, from "disable yes" to "disable no"

2./mail/etc/imapd, from "ADDRESS=0" to "ADDRESS=real_ip_address"

Looks like I've made great progress with your highly valuable inputs

Thx,
HTM
 
Old 04-10-2004, 03:02 AM   #11
chaan
LQ Newbie
 
Registered: Jan 2004
Location: Stillwater, OK
Distribution: Slackware, RedHat, Fedora, Knoppix
Posts: 14

Rep: Reputation: 0
Hmm, well, you might need to check your iptables settings to make sure that you are allowing traffic to reach the port for the imapd. Also, /etc/hosts.allow and /etc/hosts.deny (config files for tcpwrappers) could be limiting those connections as well. That's the only thing I can think of that would prevent you from connecting to port 143. As far as what you said above, yes, you do need to change disable yes to disable no. I'm not familiar with courier-imap, so I don't know about configuring it specifically. I looked for a bit of info on it, but didn't find an ADDRESS config option.

I'm reaching the limits of my experience, so I hope someone else out there who has used courier-imap can pitch in!

Chris
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What email program can work with email header on pop3 server TruongAn Linux - Software 0 01-13-2005 11:48 AM
How do I configure postfix master to forward all email to an email server ? hello321_1999 Linux - Software 1 11-18-2004 04:43 AM
problem configuring email server unhappyStar Linux - Networking 5 07-02-2004 08:04 PM
Problem receiving email from email server sharon Linux - Newbie 3 07-11-2003 03:57 AM
Web Server Email Problem peterfig Linux - General 1 01-22-2002 02:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration