On Thu, 29 Sep 2016, 10:44:19, Ionel Mugurel Ciobîcă wrote:
> On 28-09-2016, at 10h 09'53", Konstantin Ovsov wrote about "[SPAM?] 
> attachments name non english symbol"
> > Hi!
> > 
> > I forward attachments with the russian name. The recipient receives an 
> > email with an attachment with the wrong name. For example, "шрифт.zip" 
> > converted into "__________.zip"
> > 
> > It is possible to keep the original name?
> > 
> > If i send a new message, the attachment retains the original name.
> > 
> > mutt version: 1.5.23, 1.6.0, 1.7.0
> > Sorry for my bad English.
> > 
> > -- 
> > Konstantin
> 
> 
> Do you forward only the attachments? How do you do that?

Yes, only forwarded attachments. I press 'v' (view-attachments), select the 
attachment, press 'f' and send a mail.
> 
> You can forward the entire e-mail (including attachments) as attachment with 
> F (not f) if you add this lines in your .muttrc:
> 
> # Forward messages as attachment with F.
> macro index f ":set mime_forward=no\n<forward-message>"
> macro pager f ":set mime_forward=no\n<forward-message>"
> macro index F ":set mime_forward=yes\n:set 
> mime_forward_decode=no\n<forward-message>"
> macro pager F ":set mime_forward=yes\n:set 
> mime_forward_decode=no\n<forward-message>"
> 
> In this care the original message remains unaltered.
> 
> If you use f to forward message, you need to re-actach the attachments 
> yourself. What is the setting of the variable mime_forward?

Thanks for the advice. How to use mime_forward/mime_forward_decode me 
understand.
But the other reason. If the filename of the attachment is not 
POSIX-compatible, Mutt substitutes for all not POSIX-symbols on '_'.
====
mutt-1.7.0/lib.c

static const char safe_chars[] = 
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+@{}._-:%/";

void mutt_sanitize_filename (char *f, short slash)
{
  if (!f) return;

  for (; *f; f++)
  {
    if ((slash && *f == '/') || !strchr (safe_chars, *f))
      *f = '_';
  }
}
====

Thank you again, Ionel.

> Kind regards,
>  Ionel
> 

-- 
Konstantin

Reply via email to