2

I have a problem with my sendmail config. Need to use a smart host, but local services that send mail to local accounts need to post local.

I use this lines

LOCAL_DOMAIN(`localhost.localdomain')dnl
LOCAL_DOMAIN(`acme.com')dnl

… and file /etc/mail/local-host-names

Any idea. Need more info?

nhereveri
  • 151
  • 2
  • 9

1 Answers1

2

According to what I can find around, the following macro directs sendmail to use the esmtp mailer for "local" mail instead of sending it through the smart relay.

LOCAL_NET_CONFIG
R$* < @ $* .$m. > $*    $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3

On my systems, these are the last two lines in the default sendmail.mc, as shipped.

Depending on exactly how local your "local accounts" are, you may want to use $#local in place of $#esmtp, after suitable testing.

This isn't my real name
  • 4,869
  • 3
  • 17
  • 30
  • 1
    Good. Works great! as observation, use a tab in the rule: `R$* < @ $* .$m. > $*[TAB]$#smtp $@ $2.$m $: $1 < @ $2.$m. > $3` – nhereveri Aug 14 '14 at 21:41