[Mimedefang] Convert "special" characters within attachment
Jason Englander
jason at englanders.cc
Fri Aug 9 13:35:00 EDT 2002
On Fri, 9 Aug 2002, Matt A. Gargett wrote:
> Would there be a way to convert multi-doted attachments such at
> "this.is.my.attachment.doc" into "this-is-my-attachment.doc"? Multi-dotted
I'm sure there's a better way to write this, but this should work:
if ($fname && $fname =~ /\./) {
my $one = substr($fname,0,rindex($fname,'.'));
my $two = substr($fname,rindex($fname,'.'));
$one =~ s/\./-/g;
$fname = $one . $two;
# ...and then the mime stuff and action_rebuild().
}
Jason
--
Jason Englander <jason at englanders.cc>
394F 7E02 C105 7268 777A 3F5A 0AC0 C618 0675 80CA
More information about the MIMEDefang
mailing list