Operating System - HP-UX
1833811 Members
3773 Online
110063 Solutions
New Discussion

sendmail and domain routing

 
SOLVED
Go to solution
Bruno DESQUESNE
Advisor

sendmail and domain routing

Hi all,

I have a set of machines sending mails to two different domains (let say A and B). Roughly the configuration was easy :

- mails to admin team are routed to aliases with explicit mail gateway (e.g. dba@mailgate.A.com)

- mails to users are automatically send to addresses including another gateway (e.g. account@smtpgate.B.com)

We do not wish to use DNS to avoid reverse resolution of any connected PC and so on. But it worked without DNS or SmartRelay.

Now we are upgrading from Oracle Financial 10.7 to 11.0 and the old InterOffice is replaced by Oracle Workflow. With this tools, I have to find a solution to be able to route correctly mails to account@B.com (the mail gateway disappear from address). This means routing to smtpgate.B.com any mails sent to anyone@B.com without loosing the capability to send directly mails to mailgate.A.com. Note that smtpgate.B.com does not know mailgate.A.com and we prefer avoig going to B and go back to A (thousands miles trip) for our EMS notifications !

Any help would be really appreciated

Regards
1 REPLY 1
Berlene Herren
Honored Contributor
Solution

Re: sendmail and domain routing

Try using the domain tables.

The domaintable feature is currently not documented in sendmail.cf shipped by HP. Nevertheless, the config file has been build with the FEATURE(domaintable) and has all needed rulesets. If you want to use the domaintable you need to

Enable the mailertable lookup by removing the comment in the line following
# Domain table (adding domains)

Remove the comments in the lines belonging to the comment in ruleset 96
# look up domains in the domain table

Create an external database containing the transition information for domains, eg /etc/mail/domaintable.txt and build the database with
makemap hash /etc/mail/domaintable < /etc/mail/domaintable.txt>

A domaintable can temporarily be used when trasitioning from an old domain to a new one. The domaintable enables transitions to operate smoothly by rewriting the old domain to the new. An example input file might look as follows:
my.old.domain my.new.domain

The use of the domaintable should be limited to your own domains. The LHS of each line is a domain name or one of possibly many fully qualified hostnames and the RHS is the new domain name or one of your local hostnames. Anything in domain tables is reflected into headers as the lookup is called in ruleset 3 via ruleset 96.
There are two other database lookups introduced with sendmail 8.8:

GenericsTable to transform sender addresses.
Looks up every sender in the database if enabled. Changes the sender part of the header.
VirtUserTable for virtual domains.
This is again a hook into ruleset 0 and only reroutes delivery but does not change headers.
Refer to the O'Reilly sendmail book for further information regarding those. The appropriate rules are in the sendmail.cf shipped with the latest patches but the are not active.

Berlene
http://www.mindspring.com/~bkherren/dobes/index.htm