[SA-exim] Per user whitelisting or rejection

Marc MERLIN marc at merlins.org
Mon Jun 9 09:50:28 PDT 2003


On Sun, Jun 08, 2003 at 10:58:19PM +0200, Sander Smeenk wrote:
> Quoting Tony Earnshaw (tonni at billy.demon.nl):
> 
> > >Correct - since local_scan is after the SMTP DATA command, we only have
> > >the ability to accept or reject the message as a whole, for all recipients.
> > "Not quite" - the very words Marc used to me when I wrote the same, not 
> > long ago.
> > 
> > Don't forget that you can implement 'localpartlist nosarej' and so on 
> > (see Marc's example Exim config) for people, groups or whatever you 
> > like. The choices are quite powerful.
> 
> Hmm, I hadn't yet thought about per-localpart nosa(rej). But you are
> right, the choices are powerful. Today, I learnt that you shouldn't focus 
> on one approach ;)

I haven't had the time to work on this (and even less test it), but my
guess is that we can implement the per user rejection or accept with no
additional code in sa-exim (sa-exim runs too late to do that anyway)

Here's how it should work:
- for each rcpt, check if it is in the whitelist.
  - if it's the first receipient, set X-SA-Do-Not-Rej
  - if it's not
    - and X-SA-Do-Not-Rej is set, accept
    - and X-SA-Do-Not-Rej is unset, send tempreject

- do the same thing (reversed) if the rcpt is not in the whitelist

- for extra points, check if the user has a ~/.spamassasin/user_prefs 
  If so, accept just this user and tempreject the others
  (and set a header to tell SA-Exim that it should use the user's config
  file)

To support #3, we just need a little code in sa-exim to run spamc -u user

What do you all think?

Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/   |   Finger marc_f at merlins.org for PGP key



More information about the SA-Exim mailing list