Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have setup my local sendmail as a Smart Host and trying to relay all incoming mails to a mail server.

However, whenever i try to send a mail to an internet mail address, getting the following error:

ruleset=check_rcpt, arg1=<>, relay=localhost [[UNIX: localhost]], reject=550 5.7.1 <>... Relaying denied

I debugged the sendmail configuration file and found that this rule fails as its receiving the client_addr as localhost and client_resolve is resolving to NULL. and client_name is getting set to client_name which it tries to resolve into some hostname.

My hostname is a.b.c its converting it to localhost.b.c

Logs of check_rcpt:

Relay_ok           input: < email1 @ gmail . com >
rewrite: RHS $&{client_addr} => "localhost"
rewritten as: localhost
rewritten as: [ localhost ]
rewrite: RHS $&{client_resolve} => "(NULL)"
rewritten as: < >
rewrite: RHS $&{client_name} => "localhost"
rewritten as: < @ > localhost
rewritten as: < ? > localhost . b . c
rewritten as: < ? > localhost . b . c
Relay_ok         returns: < ? > localhost . b . c
rewritten as: O $| < ? > localhost . b . c
rewritten as: $# error $@ 5 . 7 . 1 $: "550 Relaying denied"
Basic_check_rcpt returns: $# error $@ 5 . 7 . 1 $: "550 Relaying denied"
rewritten as: $# error $@ 5 . 7 . 1 $: "550 Relaying denied"
check_rcpt       returns: $# error $@ 5 . 7 . 1 $: "550 Relaying denied"

In file, i have set the SMART_HOST to my mail server, yet its getting set to localhost.

Can anyone please provide some pointers on how to resolve this issue?

share|improve this question

See "Anti-Spam Configuration Control" in cf/README file in Sendmail distribution.
IMHO It suggests that the following access table entry should fix you problem.

/etc/mail/access entry (file requires compilation with makemap):

connect:[UNIX:localhost]  RELAY

If it does not work (as you reported) then try

connect:localhost  RELAY
share|improve this answer
didn't work. Tried all possible configurations present on the net, still it remains the same. – chingupt Apr 25 '13 at 9:45
Ask your question at news:comp.mail.sendmail. IMHO It looks like a some subtle bug in your configuration or a bug in senmdail (documentation). – Andrzej A. Filip Apr 25 '13 at 11:02
It seems after looking at cf/m4/proto.m4 that connect:localhost RELAY in access should work. Ask at news:comp.mail.sendmail if it is side effects free. – Andrzej A. Filip Apr 28 '13 at 9:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.