[Mimedefang] Change "warning1.txt" attachment name when usingaction_replace_with_url
Matthew.van.Eerde at hbinc.com
Matthew.van.Eerde at hbinc.com
Thu Dec 16 14:42:18 EST 2004
Renaud PASCAL wrote:
>>>> and translating the name (some of our customers don't open
>>>> "warning1.txt" thinking it's a mail-virus, or something so).
> OK, then I guess you'll have to adapt a bit this part of
> mimedefang.pl :
> where it dwells with the mime parms of the added part,
> (check yours, this one's form 2.48) :
>
> sub action_replace_with_warning ($) {
> my($msg) = @_;
> ...
> $ReplacementEntity->head->mime_attr("Content-Type.name" =>
> "MY_SPANISH_NEW_WARNING_NAME$WarningCounter.txt");
> $ReplacementEntity->head->mime_attr("Content-Disposition" =>
> "inline");
> $ReplacementEntity->head->mime_attr("Content-Disposition.filename" =>
> "MY_SPANISH_NEW_WARNING_NAME$WarningCounter.txt"); return 1; }
Hmmm... could the next version of MIMEDefang support an optional filenameprefix argument, like this:
sub action_replace_with_warning ($;$) {
my($msg, $filenameprefix) = @_;
$filenameprefix ||= "warning"; # default
...
$ReplacementEntity->head->mime_attr(
"Content-Type.name" =>
"$filenameprefix$WarningCounter.txt"
);
$ReplacementEntity->head->mime_attr(
"Content-Disposition" => "inline"
);
$ReplacementEntity->head->mime_attr(
"Content-Disposition.filename" =>
"$filenameprefix$WarningCounter.txt");
...
}
Matthew.van.Eerde (at) hbinc.com 805.964.4554 x902
Hispanic Business Inc./HireDiversity.com Software Engineer
perl -e"map{y/a-z/l-za-k/;print}shift" "Jjhi pcdiwtg Ptga wprztg,"
More information about the MIMEDefang
mailing list