Ole Wolf <[EMAIL PROTECTED]> writes:

>>The logic that I will soon be putting into my "courierperlfilter"
>>is something like this (pseudo-code):
>>
>>  if address in ( <whitelist> )
>>     accept message
>>  else if envelope-domain != sender-domain
>>     reject messasge
>>  else if envelope-domain in ( hotmail.com excite.com [ etc ... ] )
>>     reject message
>>  endif
>
> I presume the last "else if" in the pseudocode above should be:
>
>    else if envelope-domain in ( <blacklist> )

Well, yes.  I just would call this a "domain blacklist" to distinguish
it from a simple "blacklist".  This domain blacklist only contains
domain names such as hotmail.com. etc.  The simple blacklist is the TMDA
blacklist which contains full addresses (i.e., [EMAIL PROTECTED]).


> Also, you need a default action in the pseudocode. I believe the default
> action should be to accept the message at the MTA level, unless I'm missing
> something. Accepting the message by default would then make it unnecessary
> to check the whitelist. In its entirety, the pseudocode then becomes:
>
>   if envelope-domain != sender-domain
>      reject message
>   else if envelope-domain in ( <blacklist> )
>      reject message
>   else
>      accept message
>   endif
>
> What do you think?

Yep.  My code was an oversimplification.  There is more testing that is
done after my "endif".  I think that the TMDA blacklist might be used,
as well.  Also note that all whitelisted addresses must be accepted.
For example, this allows me to accept email from [EMAIL PROTECTED],
irrespective of whether his or her envelope domain and sender domain
match.

So how 'bout this?

  if address in ( <whitelist> )
     accept message
  else if envelope-domain != sender-domain
     reject message
  else if envelope-domain in ( <domain-blacklist> )
     reject message
  else
     (perform system-specific testing, possibly including tests
      via the TMDA blacklist)
     if testing fails
       reject message
     else
       accept message
     endif
  endif


-- 
 Lloyd Zusman
 [EMAIL PROTECTED]
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users

Reply via email to