Question : Help configuring Sendmail for an ISP environment (inbound MX routers)

Hello,
I need help getting sendmail configured for an ISP environment.  I need to accept inbound mail for multiple domains (no outbound, no local), I wasn't sure how to accumplish this so I recently tried RELAY_DOMAINS but I am thinking there might be a better way?  I'm setting up an inbound mail relay to forward all mail to our internal mail hub.  I purchased the o'riley black bat book for sendmail and after reading through it, I'm having information overload ;)

Here's my sendmail.mc file:
divert(0)dnl
VERSIONID(`1.0.1')
OSTYPE(freebsd4)
DEFINE(`confEBINDIR', `/usr/local/libexec')
DEFINE(`confLOG_LEVEL', `15')dnl Increase the logging level to help diagnose troubles..
DEFINE(`confPRIVACY_FLAGS', `authwarnings,needmailhelo,goaway')dnl
DEFINE(`MAIL_HUB', `mailhub.domain.com')
DEFINE(`confDONT_PROBE_INTERFACES',true)
DEFINE(`confSMTP_LOGIN_MSG', `')
RELAY_DOMAIN_FILE(`/etc/mail/relay-domains')
dnl FEATURE(`use_cw_file')
dnl FEATURE(`nullclient', `mailhub.mydomain.com')
dnl First make sendmail work, then play with filters... MAIL_FILTER(`mimedefang', `S=local:/var/spool/MIMEDefang/mimedefang.sock, T=C:15m;S:4m;R:4m;E:10m')
dnl DEFINE(`confINPUT_MAIL_FILTERS', `mimedefang')
dnl MAILER(`local')
MAILER(`smtp')


At first I tried using use_cw_file but found this was an error in my thinking, this is only for accepting local mail?


Question is:
What should I change to configure this for our requirements?
Inbound relay -> internal mail hub
No outbound mail on inbound relay
No local mail on inbound relay

OS is FreeBSD 4.9

Answer : Help configuring Sendmail for an ISP environment (inbound MX routers)

There are several ways this can be done. My preference would be to user virtusertable to forward email only for valid accounts and to reject mail for unknown users. In that case you'd set the mail server up as if it was the mail server for each of your domains and use a virtusertable that looked similar to:

[email protected]      [email protected]
...
@virt1.tld              error: nouser No such user
[email protected]      user2#internal.domain.tld
..
@virt1.tld              error: nouser No such user
...

Of course this means that the MX for all domains must point to the Sendmail relay server and the real mail server must accept mail addressed to [email protected].

Since I don't know what OS you are running sendmail on I can't suggest a reasonable sendmail.mc file, could you elaborate?
Random Solutions  
 
programming4us programming4us