Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 01-26-2012, 10:13 PM   #1
LQ Newbie
Registered: Jun 2007
Posts: 6

Rep: Reputation: 1
message 'Relaying denied' when receving external e-mail

Hopefully someone can help. I just set up a sendmail e-mail server on a debian squeeze system. I pretty much have a stock file the only things I have added were the following:

define(`confAUTH_OPTIONS', `A p')dnl
FEATURE(`authinfo',`hash -o /etc/mail/authinfo.db')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl

I've also removed the Addr= from the following options so sendmail will listen on all network interfaces:

DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp')dnl
DAEMON_OPTIONS(`Family=inet, Name=MSP-v4, Port=submission, M=Ea')dnl

At this point I am only concerned about why I can't receive e-mail. I keep getting the folloing in my mail log file when I try to send mail from my external yahoo account:

Jan 26 22:46:56 webserver sm-mta[17431]: q0R3kslH017431: ruleset=check_rcpt, arg1=<>, [], reject=550 5.7.1 <>... Relaying denied. Proper authentication required.
Jan 26 22:46:56 webserver sm-mta[17431]: q0R3kslH017431: from=<>, size=0, class=0, nrcpts=0, proto=SMTP, daemon=MTA-v4, []

I'm sure I'm missing something here because I don't understand why an e-mail being sent to me is tyring to be relayed by my own server. I though only if a mesage is being passed on is relayed.

Just so you know my setup, I am behind a NAT router and I do have the ports forward to the mail server (port 25).
Old 01-26-2012, 11:02 PM   #2
Senior Member
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
have you added your client machine IP in access file?

#vi /etc/mail/access

Connect:localhost.localdomain           RELAY
Connect:localhost                       RELAY
Connect:                       RELAY
Connect:                   RELAY
Connect:                     RELAY
#makemap -r hash access.db < access

#service sendmail restart
Old 01-27-2012, 07:37 AM   #3
LQ Newbie
Registered: Jun 2007
Posts: 6

Original Poster
Rep: Reputation: 1
As for now the the access database is being skipped I have the following FEATURE:

FEATURE(`access_db', , `skip')dnl

I'm obviously going to add a database in once I get sendmail working to this point. That's kind of the funny part because without it checking the database I would think at this point it would allow everyone to relay.

The part I am struggling with is the "relaying" aspect of this. I don't know why my server thinks the mail needs to be relayed because it should be the destination.
Old 01-27-2012, 09:18 AM   #4
LQ Newbie
Registered: Jun 2007
Posts: 6

Original Poster
Rep: Reputation: 1
Well I figured it out. I had to add my domain to the /etc/mail/local-host-names

Looks like sendmail was trying to relay "" to and since I'm behind a firewall with port forwarding the name was being resolved as the internet IP. I'm not sure of the resolving order, but it looks like sendmail uses this file first. I did have my full qualifed domain name in the file "" but the mail coming in was address to ""

Thanks for your help it got the weels turning in my head!
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Mail problem-Relaying denied.Proper authentication required.Error Number 0x800CCC79 mladja04 Linux - Server 1 11-24-2008 02:54 PM
Relay access denied while sending from external mail clients spokz Linux - Server 2 11-16-2008 08:47 AM
mail problem (Relaying denied) ice99 Linux - Networking 3 01-21-2006 11:29 AM
Relaying denied when sendig mail outside Wynand1 Linux - Networking 5 09-14-2004 11:59 PM
I get a "relaying denied" message when I try to send mail from a remote computer robmainella Linux - Software 4 09-09-2003 10:39 AM > Forums > Linux Forums > Linux - Server

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

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