Страница 1 из 1

Exim - Переписка Subject письма

Добавлено: 2010-09-05 2:00:23
.scu
Вопрос по переписке Subject письма.
Есть такие правила:

Код: Выделить всё

warn  message =  Subject: SPAM-POINTS($spam_score spam points) $h_Subject:
        spam    = maildeliver:true
        condition = ${if >{$spam_score_int}{120}{1}{0}}

       warn  message = Subject: SPAM-CHECKER $h_Subject:        
       spam    = maildeliver
Переписывают тему криво - после этого для русских писем кодировка ломается на что-то вроде:

Код: Выделить всё

SPAM-POINTS(13.7 spam points) йСПЯ АСУЦЮКРЕПЯЙНЦН СВЕРЮ ДКЪ МЮВХМЮЧЫХУ
+ Outlook такие письма не принимает (хотя через тот же вебмайл они видны, т.е. физически есть в папке), видимо из-за кривой переписке хедера.
На линуксе почтовик менее придирчив - все принимает.

Как это побороть (чтобы все принималось)

Полный код правил (vexim-acl-check-content.conf)

Код: Выделить всё

# bounce test
deny    message         = Message that generate bounce not coming from main hosts
        condition       = ${if !match{$message_body}{X-Bounce-ID}{yes}{no}}
        condition       = ${if eq{$sender_address}{}{yes}{no}}

  deny  senders         = :
        hosts           = ! +relay_from_hosts
        !acl            = spf_from_acl
        message         = Your sender is not permitted (read spf.pobox.com)

  # First unpack MIME containers and reject serious errors.
  deny
        !senders = :
        message         = This message contains a MIME error ($demime_reason)
        demime          = *
        condition       = ${if >{$demime_errorlevel}{2}{1}{0}}

  # Reject typically wormish file extensions. There is almost no
  # sense in sending such files by email.
  deny  message         = This message contains an unwanted file extension ($found_extension)
        demime          = scr:vbs:bat:lnk:pif:bz2

  deny  message = Possible CMD file attack ($found_extension)
        demime = cmd

  deny  message = Possible COM file attack ($found_extension)
        demime = com

  deny  message = Possible Microsoft JScript attack ($found_extension)
        demime = js

  deny  message = Possible Windows registry attack ($found_extension)
        demime = reg

  deny  message = Possible compiled Help file-base virus ($found_extension)
        demime = chm

  deny  message = Possible SpeedDial attack ($found_extension)
        demime = cnf

  deny  message = Possible Micrsoft HTML archive attack ($found_extension)
deny  message = Possible Microsoft Internet Settings attack ($found_extension)
        demime = ins

  deny  message = Possible Windows Explorer Command attack ($found_extension)
        demime = scf

  deny  message = Possible Microsoft Windows Script attack ($found_extension)
        demime = sct

  deny  message = Possible Microsoft VBScript attack ($found_extension)
        demime = vbs:vbe

  deny  message = Possible Microsoft Script Host attack ($found_extension)
        demime = wsc:wsf:wsh

  deny  message = Possible Exchange Shortcut attack ($found_extension)
        demime = xnk

  deny  message = Possible Microsoft Access Shortcut attack ($found_extension)
        demime = mad:maf:mag:mam:maq:mar:mas:mat:mav:maw

  # Reject virus infested messages.
  warn  message         = This message contains malware ($malware_name)
        malware         = *
        log_message     = This message contains malware ($malware_name)

  # Always add X-Spam-Score and X-Spam-Report headers, using SA system-wide settings
  # (user "nobody"), no matter if over threshold or not.
  warn  message         = X-Spam-Score: $spam_score ($spam_bar)
        spam            = maildeliver:true

  warn  message = X-Spam-Score: $spam_score ($spam_bar)
        hosts   = !+relay_from_hosts
        spam    = nobody:true
warn  message = Subject: SPAM-CHECKER $h_Subject:
        spam    = maildeliver

  warn  message         = X-Spam-Report: $spam_report
        spam            = maildeliver:true

  warn  message =  Subject: SPAM-POINTS($spam_score spam points) $h_Subject:
        spam    = maildeliver:true
        condition = ${if >{$spam_score_int}{120}{1}{0}}

  deny  message   = Message rejected: virus found. Your message was successfully trashed.
                    hosts       = *
                    malware     = *

  accept hosts          = 127.0.0.1:+relay_from_hosts
  accept authenticated  = *
Спасибо! :)

Re: Exim - Переписка Subject письма

Добавлено: 2010-09-06 9:41:27
Laa
Это очень сложный процесс. Тут надо сперва угадать кодировку в письме, потом раскодировать subject, потом изменить его и потом снова его закодировать. Разные кодировки по-разному кодируют. Короче сложно это. Поройся в украинском списке рассылки exim. Там вроде было что-то по этому поводу.

Re: Exim - Переписка Subject письма

Добавлено: 2010-09-08 2:31:32
.scu
может это быть не из-за кодировки, а из-за чего-то, что дописывается в header письма? Кто-то сталкивался с подобной проблемой?