sendmail : Relaying Denied

Hi, I'm working with RedHat 6.0 and sendmail 8.9.3, pop3d .

This server "should" work as a mail server for 10
differents domains.
When I try to send a mail from the local network to the Internet, it works
But if another domain try to send a mail to the Internet, it gives the message : Relaying Denied.

I know that with sendmail 8.8.7, we have a file : /etc/mail/ip-allow. And if I add networks number in this file, (and add this line in :
F{LocalNames} /etc/mail/ip_allow   ) ,this solve the problem. But it doesn't work with snedmail 8.9.3.
I tried to add these line and file, without success.

Any Ideas ?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

Insert the domains that you wish to relay for into:


Restart sendmail after modifying this file.

sendmail 8.9.x blocks relaying by default (a good thing) and this file controls the domains that you accept relays for.
RH does NOT use that file by default. It uses /etc/mail/access and /etc/mail/name-allow

Add the domains in linuxconf ("relay for by name" in sendmail antispam section)
oh, if you add them manually, dont forget to restart sendmail

/etc/rc.d/init.d/sendmail restart
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

jacobyAuthor Commented:
Thanks for your quicks answers.

Relay-domains was already created, with the correct settings, so this isn't the problem.

access is also in with the following settings:   RELAY
blablabla      RELAY

but I've no name_allow

I'll add it and let you know.

Thanks, Jacoby.
do NOT add it maually. Do this trough linuxconf. and make sure that you are using a RH generated otherwise the RH implementation of sendmail will be "unhappy" ;)
jacobyAuthor Commented:
I added it with linuxconf. and used "original" sendmail provided with RedHat 6.0, but it still doesn't work.

I also have ip_allow file with network numbers.
(the file created by linuxconf was: name_allow, not name-allow)

I'll save my and try to generate one with linuxconf.
Do u think it should help ?
the - _ thing was a typo on my part. also if you use /etc/mail/access the ifo must be BOTH in that file and in the apropriate name_allow / ip_allow.

Linuxconf will complain that "this isnt generated with linuxconf" if it isnt generated with linuxconf. Unless you are getting that message, this isnt the problem.

but AFTER you have added info do a /etc/rc.d/init.d/sendmail restart

This works like a charm in my 6.0 system. And also note that if you use "by domain" you MUST make sure that DNS is correctly configured.
jacobyAuthor Commented:
If I use Linuxconf generated, sendmail won't start !

Then you need to figure out WHY. whats the messages in /var/log/messages?

And once again "Is DNS configured correctly?" without it, sendmail wont run properly.
jacobyAuthor Commented:
about DNS, I think it's OK, but How can I be sure?
Everybody can surf and we can browse every sites hosted by this server.
Bind seems to start.

I'll post messages from /var/log/messages.
jacobyAuthor Commented:
about DNS, after a reboot here is /var/log/messages:
gnome server name [759] starting
""      ""     ""    "" name server starting
""      ""     "" [763] starting
""      ""     ""   ""  name server was running on display, exiting.

and also :

named : sent NOTIFY for; 1 NS; 1 A
named : received NOTIFY answer in SOA

But i found nothing about sendmail except for:

sendmail  : shutting down succeeded
(or starting succeded)

well, you said sendmail doesnt start. and you you say you see "starting succeded"?
jacobyAuthor Commented:
sorry, when i saw that it doesn't start I restore my old and restart.

if I generate with linuxconf nd then ask to leave, linuxconf hangs during the activate changes command.
If I kill it, here is the log:
sendmail : sendmail shutdown succeeded.

then, after /etc/rc.d.init.d/sendmail restart :
I have  
shutting down sendmail         [failed]
(no mysteries: sendmail is already stopped)
and it hangs during sendmail start :

so after 3mns, Ctrl C !!  :=)
the log is now :
sendmail : sendmail shutdown failed and nothing else.

then, after a backup of my old, and a sendmail start

I have :
sendmail : sendmail startup succeeded.

jacobyAuthor Commented:
my files are:

/etc/mail/access :

localhost.localdomain  RELAY  RELAY   RELAY






#access list database
Kaccess hash -o /etc/mail/access

#hosts that will permit relaying ($=R)
FR-o /etc/mail/relay-domains

#file containing IP numbers of machines which can use our relay

F{LocalIP} /etc/mail/ip_allow

(this are only parts of /etc/

access.db was created manually with:
makemap hash /etc/mail/access < /etc/mail/access

then i dont know. I just used linuxconf. and it works for me.

"and it hangs during sendmail start :

so after 3mns, Ctrl C !!  :=) "

usually means DNS problem, it will hang for 2-4 minute per unresolavble domain.
jacobyAuthor Commented:
I tried again with linuxconf and reboot.

sendmail seems to start but in /var/log/maillog I've the following error:  ... cannot alias-non local names.

As I've more than 300 aliases, this may be the cause of this "hang".

How did u setup ur aliases ?
aliases for what? multidomains? or just the "normal" aliases?
jacobyAuthor Commented:
hummm i don't know.
As I told u, I'm hosted some domains.
for exemple :

and they want their e-mail as

before,i had to add a line such as
john.smith@ :

but with linuxconf, it seems to be different (cf maillog report)
Comme vous etes francais, vous pouvez eventuellement utiliser le kit de Jussieu pour creer le fichier
Il est dispo sur
La configuration en est facile et souple.

A propos, comment sont heberges les domaines?
Les machines que vous voulez relayer ont-elles un enregistrement DNS valide (A et PTR) ?
Sinon, sendmail ne peut pas resoudre l'adresse de et donc ne connait pas le domaine de la machine a relayer, et refuse.
Si vous hebergez ces machines, il faut creer une zone pour le domaine et ajouter des enregistrements PTR dans le fichier que je vous ai fait creer, sinon le fichier relay-domains est inutilisable.
jacobyAuthor Commented:
hehe, c'etait ma question de tout a l'heure sur les enregistrement a creer.

En fait, j'ai cree les zones comme suit:
dans /etc/named.conf:

pour lba-sa par exemple:
zone  "" {
      type master;
      file "/var/named/";

et donc dans /var/named, il y a le fichier suivant:      IN      SOA (
                  86400 )      IN      NS      IN      A      IN      A      IN      NS      IN      MX      10 mail

et dans httpd.conf, j'ai l'enregistrement suivant :
      DocumentRoot /www/htdocs/
Le probleme viendrait que sendmail essaye d'envoyer les courriers a, et serval n'existe pas dans le DNS.
jacobyAuthor Commented:
Thanks everybody for your help !!
Please jprohart, answer and I'll grade !!
This is a bad DNS configuration problem.
You have also unwanted records in the access file.

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

From novice to tech pro — start learning today.