LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (https://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   mail received at sendmail has relay=localhost [[UNIX: localhost]] check_rcpt fails (https://www.linuxquestions.org/questions/linux-distributions-5/mail-received-at-sendmail-has-relay%3Dlocalhost-%5B%5Bunix-localhost%5D%5D-check_rcpt-fails-4175459462/)

chingupt 04-24-2013 01:44 PM

mail received at sendmail has relay=localhost [[UNIX: localhost]] check_rcpt fails
 
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=<chingupt1@gmail.com>, relay=localhost [[UNIX: localhost]], reject=550 5.7.1 <chingupt1@gmail.com>... 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?

heinblöd 04-25-2013 03:28 AM

Well I only know postfix, but if you try to relay mail for a gmail address, shouldn't the SMART HOST be gmail.com in this case, logically ?

chingupt 04-25-2013 04:47 AM

Not sure i get you properly. I need to send all my outbound mails to a central server where some scanning will take place. Hence i have set my SMART HOST as the central server .

heinblöd 04-25-2013 05:36 PM

Yes but if I understand the doc rigth, the SMART HOST is not your mailserver, but the mailserver your MTA will use to send outgoing mail, instead of sending it directly.
I understood that this is the same as the 'relayhost' parameter in postfix.

Look at this, they use it in the way I would use it :

http://www.dnsexit.com/support/mailrelay/sendmail.html


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