[Mimedefang] replace_with_url with multiple small attachments
Matthew S. Cramer
mscramer at armstrong.com
Wed Dec 20 16:14:11 EST 2006
On Wed, Dec 20, 2006 at 01:06:13PM -0500, David F. Skoll wrote:
> Matthew S. Cramer wrote:
> > Since filter is called for each attachment, there is no need to build
> > in iteration beyond that which MIMEDefang naturally performs (David,
> > you rock!). The code above will keep getting executed until the
> > entire mail is < 10MB since filte ris called once for each attachment.
> Actually, if the original message was >= 10MB, the code would execute
> all the time. MIMEDefang doesn't modify INPUTMSG. It just
> manipulates the in-memory MIME entities, and creates a new message
> after the filtering has finished.
Oops, good catch. Yes the code I posted will remove ALL non-text
attachments if the entire message size is > 10MB, not just as many
needed to reduce the message below that size.
But what I hope will help rolf is the understanding that the way you
wrote MIMEDefang to call filter means he doesn't have to worry about
writing his own iteration to handle all the attachments. Our cranky,
picky users are OK with this solution, because they get the email and
they get the attachments via the links.
We did have one irate user call the Helpdesk because his "other
attachments were missing". He didn't scroll down beyond the first
link. I told my management that to avoid that (put all the links
together) would require writing more code than I had done, and they
decided that it wasn't worth the effort.
I haven't really thought about it until now, so if anyone else wants
to comment with suggestions or with sample code to handle this situation
with all links together (in one text part replacement, ideally I
guess), please do! That would be more elegant than what I've done.
Matthew S. Cramer <mscramer at armstrong.com> Office: 717-396-5032
Project Manager, Planning and Service Management Fax: 717-396-5590
Armstrong World Industries, Inc. Cell: 717-917-7099
More information about the MIMEDefang