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=<[email protected]>, relay=localhost [[UNIX: localhost]], reject=550 5.7.1 <[email protected]>... 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 sendmail.cf 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?