[Mimedefang] How to resend a quarantined messages later?

David F. Skoll dfs at roaringpenguin.com
Thu Aug 1 12:58:01 EDT 2002


On Thu, 1 Aug 2002, Bryan Evans wrote:

> If the message contained attachments and was quarantined due to the
> file extension, but it is a valid message that we want to resend, can you
> just send the message with a command like this?

> sendmail -f`cat SENDER` `cat RECIPIENTS` < HEADERS \
> PART.1.HEADERS PART.1.BODY PART.2.HEADERS \
> PART.2.BODY  <continuing through attachments>

No, for quite a few reasons:

1) Shell redirection doesn't work like that (you can't supply a list of files)
It would have to be:

	cat HEADERS PART.1.HEADERS ... etc | sendmail -f`cat SENDER` ...

BUT:

2) Even that won't work, because:

   a) Presumably, the quarantined PART's are the ones you DON'T want, and
   b) Concatenating a bunch of headers with binary PART's does not make
      a valid MIME message.

If you want to slice-and-dice quarantined messages and resend them, the
easiest way is to use different rules for messages originating from
localhost.  Something like:

sub filter {
	# blahblahblah
	if ($RelayAddr eq "127.0.0.1") {
		# Slice-and-dice and send message on
	} else {
		# Normal quarantining of suspicious messages
	}
}

This assumes your mail server is a sealed box with no local shell
accounts, and that you take adequate preventative measures on your
firewall to prevent IP address spoofing.

Regards,

David.




More information about the MIMEDefang mailing list