0

I'm forwarding all e-mails for a domain owned by a friend to his real e-mail address. This works fine for his example.com itself (with the @example.com virtusertable entry):

% sendmail -C new.cf -bv AE@example.com
AE@example.com... deliverable: mailer relay, host [myrelay], user his@real.address

We'd like to expand the functionality to work for anything.example.com too, and are facing unexpected difficulties...

The DNS record * IN MX 5 myserver.mydomain exists for his domain and works -- the Internet is trying to give e-mails intended for foo.example.com to my server.

But sendmail on my server does not know, that those subdomains should be handled the same as the domain itself -- how do I teach it?

The rule suggested here seems to be just, what I need -- but it does not help -- the address is not rewritten...

LOCAL_NET_CONFIG
R $+ < @ $+ .example.com. > $*    $: $1 < @ example.com > $3

If I insert the rule into LOCAL_RULE_0 instead of the LOCAL_NET_CONFIG, I get the address modified, but the virtuserable entry for the domain (his@real.address) is ignored:

% sendmail -C new.cf -bv AE@Foo.example.com
AE@Foo.example.com... deliverable: mailer relay, host [myrelay], user AE@EXAMPLE.com

Seems like something small -- and silly -- is missing, but what is it?

Mikhail T.
  • 2,272
  • 1
  • 22
  • 49

0 Answers0