sendmail - group-based send/receive-handling
I run sendmail 8.12.3 on SuSE Linux.
My task is to have sendmail distinguish between two user groups:
“Standard” group:
Standard users; sendmail accepts inbound mail from any sender host
and delivers outbound mail directly via DNS.
“Protected” group:
Users protected by mail filtering services running on external mail servers.
Sendmail accepts inbound mail from 2 defined sender hosts only
and forwards all outbound mail to an external mail relay.
Sendmail must check every mail (inbound and outbound) based
either on the local Linux user involved or on the full email address (name@domain.com) and act according to the group membership.
The following pseudo-code illustrates this check.
a) inbound mail:
if getGroup(userID) == ‘protected’ then {
if hostAccepted(senderHost) == true then processMail()
else rejectMail() }
else processMail();
b) outbound mail:
if getGroup(userID) == ‘protected’ then forwardMailToExternalRelay()
else deliverMailDirectly();
Please note that sendmail runs on a leased server hosted and maintained by our ISP.
Therefore I have only restricted control over sendmail (configuration, modifications, etc.).
What is the easiest and least “invasive” way to implement this in sendmail?
Many thanks, regards
nuxv
|