[Mimedefang] OT:

Kees Theunissen theuniss at rijnh.nl
Wed Jul 5 16:33:13 EDT 2006


On Wed, 5 Jul 2006, Kayne Kruse wrote:

>Normally, I wouldnt send off topic emails here but figured someone here
>has to know something I'm missing.
>
>Im trying to use a sendmail+mimedefang box here to replace a broken
>exiscan.  Problem I have is that I need to have /etc/aliases override
>mailertable entry forwarding the mail to another server.
>
>Normally I could rewrite via virtusertable but thats not an option in
>this case.
>

I'm using sendmail's ldap_routing feature on my incomming server
to do mail-routing (and address-rewriting if needed) on a per user
basis. And I reject mail for unknown users with this feature at the
same time.
The documentation of the feature looks quite complicated, but it's
easy to use with local static tables instead of ldap-lookups.

>So:
>mailertable:
>domain.com esmtp:[realserver.domain.com]
>
>Aliases:
>list: user1 at domain1.com,user2 at gmail.com

Put something in your sendmail.mc file like:

LDAPROUTE_DOMAIN_FILE(`/etc/mail/mail-routing-domains')dnl
FEATURE(`ldap_routing', `hash  /etc/mail/mailhosts',
  `hash /etc/mail/mailroutingaddresses',
  `bounce',`preserve')dnl

and create a new sendmail.cf.
Create a file /etc/mail/mail-routing-domains that contains the name
of your domain (domain.com).
At last you must create two new hash tables:
-- /etc/mail/mailroutingaddresses containing:

   list at domain.com    list

-- /etc/mail/mailhosts containing:

   list at domain.com    localhost
   @domain.com        realserver.domain.com

This will do the job I guess. Maybe you can leave the mailroutingaddresses
table empty. But I'm not sure about that; you might create a loop by
doing so.
You don't need the mailertable anymore (at least not for this routing
problem) but you must keep the "list: user1 at domain1.com,user2 at gmail.com"
alias.


Regards,

Kees.

--
Kees Theunissen
F.O.M.-Institute for PlasmaPhysics "Rijnhuizen", Nieuwegein, Netherlands
E-mail: theuniss at rijnh.nl,  Tel: (+31|0)306096724,  Fax: (+31|0)306031204




More information about the MIMEDefang mailing list