Sendmail won't receive mail from outside...

I am running Web server on Linux Mandrake6.1 box for my company. Recently I got DNS name registration for my IP and now www and ftp servers work fine. But my sendmail server won't receive emails from outside of my local LAN. You can send mail everywhere but you can't receive it. This I get from my external mail provider:
"This Message was undeliverable due to the following reason:
Each of the following recipients was rejected by a remote mail server.
The reasons given by the server are included to help you determine why each recipient was rejected.
    Recipient: <>
    Reason:    <>... Relaying denied "
If you want to send mail inside of our company everything works fine. I use regular sendmail distribution. My Linux box acts as Firewall-Proxy for my local LAN.
Please advise me how to solve the problem.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Here is a comment that may lead to the answer. It seems like the spam control in sendmail is doing what it is suppose to and stopping your mail. Look to the sendmail configuration files for your solution. I am not going to begin to dive into sendmail configuration. There is a 4 inch thick O'Reilly book on it. But spam control sounds like your problem. Personally I use a free multi-Unix web based admintool. It lets me configure the relay and spam control with ease. 
"Relaying Denied" means your network feed (ISP) is refusing to send the packets on.  It is the Anti-spam tools the previous commenter refered to, but it's not your configuration, it's the upstream's.  You usually deny relaying because it gives spammers a way to hide their identity.  Some one at your upstream connection needs
to be told that your domain either needs a forwarding rule, or you need an MX record updated to tell the world to route mail directly to your machine (probably with the upstream acting as a secondary server, to hold mail if you are unreachable (down) ).

It sounds more like you have not opend the correct ports in the firewall daemon that Mandrake installs as a default.  That you can send mail and ftp and web works ( both anonymous ervices by default you will need to open the ports to let the internet into your machine.
shuraAuthor Commented:
I already solved that problem and comments sent by throughput@lc and rwenzla@lc were right 100%. I established spam control and fixed problems with my ISP and now everything works fine. The only one problem is that I have to define in spam control IP address of users that uses my mail server. But it is difficult if you don't know exectly their IP's. May be do you know how to enable to my users to read mail from enywhere?
Thanks in advance,
the 8.9.3 sendmail release uses by defualt the /etc/mail/relay-domains file to allow or deny relay on your server.
Relay is denied by default so you need to add in that file the IP or FQDN of the machines that uses that server as relay for outgoing mail.
hope it helps.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.