Mark Nellemann writes: 

>  
> I am trying to figure out how to filter out spam mails using the
> blacklists feature in esmtpd.
>  
> I have added the following to etc/esmtpd file:
> BLACKLISTS='-block=blackholes.mail-abuse.org,BLOCK2
> -block=relays.mail-abuse.org,BLOCK2'
>  
>  
> Is it correctly understood that when maildrop gets the mail for
> delivery, there should be a $BLOCK2 variable if the mail was cought in
> the blacklists?

You'll need to use the import statement first, to import it from the 
environment. 

>  
> My intention is to add an extra mailheader (for later filtering) if the
> $BLOCK2 variable is present. Is it enough just to test if the $BLOCK2
> variable is present or should I test if it contains something?
>  
> if($BLOCK2)
> {
>    echo "blacklisted "
>    xfilter "/home/courier/bin/reformail -a'X-Spam: true'"
> }
>  
> or 
>  
> if($BLOCK2 ne "")

This is the way to do it. 


-- 
Sam 

_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to