[Mimedefang] Forward entiry Spam message to Administrator
    David F. Skoll 
    dfs at roaringpenguin.com
       
    Wed Mar 26 12:47:01 EST 2003
    
    
  
On Wed, 26 Mar 2003, Ueli Kessler wrote:
> the action must be as follows: if identified as spam, the entire
> e-mail should be sent to the administrator and the origin message
> should be discarded.
This code redirects spam to 'spam-admin at mydomain.com' and adds an
X-Orig-Recipients: header with the list of original recipients:
sub filter_end {
	my($entity) = @_;
	my $recip;
	# Do usual SpamAssassin scanning here...
	if ($hits >= 5) {
		# Delete original recipients
		foreach $recip (@Recipients) {
			delete_recipient($recip);
		}
		# Add spam-trap recipient
		add_recipient('<spam-admin at mydomain.com>');
		# Add a header with list of original recipients
		$recip = join(", ", @Recipients);
		action_change_header("X-Orig-Recipients", $recip);
	}
}
--
David.
    
    
More information about the MIMEDefang
mailing list