I'm looking to relay all local mail from host2 to corresponding users on
host1.

Here's host2 smtpd.conf

    table aliases file:/etc/mail/aliases
    listen on lo
    action "relay" relay host smtp://10.9.0.1
    match for local action "relay"

If on host2 I do

    # sendmail -t <<- .
    From: root
    To: root
    Subject: Test

    .

it expands the address to root@host2 and gets rejected by the host1
because it doesn't know what to do with the address. But if I change
"To" explicitly to root@localhost it gets delivered.

Is there a way to change the domain on rcpt-to for local mail being
relayed, similar to "mail-from"?

If not, can the default domain be set to localhost rather than the
actual host name?

Reply via email to