【问题标题】:OTRS PostmasterMailbox.pl parsing/MIME typeOTRS PostmasterMailbox.pl 解析/MIME 类型
【发布时间】:2014-08-12 04:47:08
【问题描述】:

从 Ubuntu Server 12.04 升级到 Ubuntu 14.04 LTS 后,我开始遇到解析问题 与我的 otrs 安装。 我使用 mysql 5.5 和 perl 5.18 运行 OTRS 3.1.1。 我认为这可能是因为我有一个旧的 OTRS 版本,所以请按照以下步骤操作 OTRS 手册决定升级到 OTRS 3.2.1、mysql 5.6 并将几乎所有 perl 模块 + apache 升级到 2.4.7

我这样做了,一切正常,但解析问题仍然存在。 OTRS 通过 cronjob 使用脚本从邮箱中获取电子邮件并创建票证。 在许多票证上,它无法解析它们导致系统挂在特定邮件上 并连续打开同一张票,然后死掉(不解析队列中的其他邮件)。

有什么想法吗?

    # /opt/otrs/bin/otrs.PostMasterMailbox.pl -f 1
    Useless use of '\'; doesn't escape metacharacter '{' at /opt/otrs/Kernel/System/VariableCheck.pm line 290.
    In '(?...)', splitting the initial '(?' is deprecated in regex; marked by <-- HERE in m/
            (                                          # $1 greater-than and less-than sign
                > | < | \s+ | \#{6} |
                (?: &[a-zA-Z0-9]+; )                   # get html entities
            )
            (                                          # $2
                (?:                                    # http or only www
                    (?: (?: http s? | ftp ) :\/\/) |   # http://,https:// and ftp://
                    (?: (?: www | ftp ) \.)            # www. and ftp.
                )
            )
            (                                          # $3
                (?: [a-z0-9\-]+ \. )*                  # get subdomains, optional
                [a-z0-9\-]+                            # get top level domain
                (?:                                    # file path element
                    [\/\.]
                    | [a-zA-Z0-9\-]
                )*
                (?:                                    # param string
                    [\?]                               # if param string is there, "?" must be present
                    [a-zA-Z0-9&;=%]*                   # param string content, this will also catch entities like &amp;
                )?
                (?:                                    # link hash string
                    [\#]                               #
                    [a-zA-Z0-9&;=%]*                   # hash string content, this will also catch entities like &amp;
                )?
            )
            (                                          # $4
                ? <-- HERE =(?:
                    [\?,;!\.\)] (?: \s | $ )           # \)\s this construct is because of bug# 2450
                    | \"
                    | \]
                    | \s+
                    | '
                    | >                               # greater-than and less-than sign
                    | <                               # "
                    | (?: &[a-zA-Z0-9]+; )+            # html entities
                    | $                                # bug# 2715
                )
                | \#{6}                                # ending LinkHash
            )
        / at /opt/otrs/Kernel/System/HTMLUtils.pm line 867.

IMAP: Connection to mailserver closed.

IMAP: Connection to mailserver closed.

IMAP: Connection to mailserver closed.

IMAP: Connection to mailserver  closed.

IMAP: Connection to mailserver  closed.

IMAP: Message 1/5 (account/mailserver )
No valid 'utf-8' string: ' ....

...

open body: Invalid argument at /opt/otrs/Kernel/cpan-lib/MIME/Entity.pm line 1872.

编辑: 检查了 apache 日志,我得到了很多重新定义,如下所示:

[Sat Jun 21 19:44:20 2014] GeneralCatalog.pm: Subroutine ItemAdd redefined at /opt/otrs/Kernel/System/GeneralCatalog.pm line 461.
[Sat Jun 21 19:44:20 2014] GeneralCatalog.pm: Subroutine ItemUpdate redefined at /opt/otrs/Kernel/System/GeneralCatalog.pm line 569.
[Sat Jun 21 19:44:20 2014] GeneralCatalog.pm: Subroutine GeneralCatalogPreferencesSet redefined at /opt/otrs/Kernel/System/GeneralCatalog.pm line 678.
[Sat Jun 21 19:44:20 2014] GeneralCatalog.pm: Subroutine GeneralCatalogPreferencesGet redefined at /opt/otrs/Kernel/System/GeneralCatalog.pm line 697.
[Sat Jun 21 19:44:20 2014] LayoutImportExport.pm: Subroutine ImportExportFormInputCreate redefined at /opt/otrs//Kernel/Output/HTML/LayoutImportExport.pm line 31.
[Sat Jun 21 19:44:20 2014] LayoutImportExport.pm: Subroutine ImportExportFormDataGet redefined at /opt/otrs//Kernel/Output/HTML/LayoutImportExport.pm line 66.
[Sat Jun 21 19:44:20 2014] LayoutImportExport.pm: Subroutine _ImportExportLoadLayoutBackend redefined at /opt/otrs//Kernel/Output/HTML/LayoutImportExport.pm line 100.
[Sat Jun 21 19:44:20 2014] PreferencesDB.pm: Subroutine new redefined at /opt/otrs//Kernel/System/GeneralCatalog/PreferencesDB.pm line 72.
[Sat Jun 21 19:44:20 2014] PreferencesDB.pm: Subroutine GeneralCatalogPreferencesSet redefined at /opt/otrs//Kernel/System/GeneralCatalog/PreferencesDB.pm line 105.
[Sat Jun 21 19:44:20 2014] PreferencesDB.pm: Subroutine GeneralCatalogPreferencesGet redefined at /opt/otrs//Kernel/System/GeneralCatalog/PreferencesDB.pm line 152.

【问题讨论】:

    标签: perl ubuntu encoding mime otrs


    【解决方案1】:

    您发布了很长的错误消息,主要是 perl 5.18 中正则表达式功能的折旧警告。

    实际问题是这样的:

    open body: Invalid argument at /opt/otrs/Kernel/cpan-lib/MIME/Entity.pm line 1872.
    

    该问题也是由 Perl 5.18 中的更改引起的,并已在 OTRS 3.2.12 中修复。您应该将您的 3.2.1 升级到 3.2.x 的最新补丁版本。 http://bugs.otrs.org/show_bug.cgi?id=9832

    编辑:它也已在 3.3.1 中修复,因此如果您升级到最新的 3.3.x 补丁级别版本(即此时的 3.3.8),您也可以!

    顺便说一句,在后来的 3.2.x 版本中,正则表达式折旧警告也消失了!

    【讨论】:

    • ps:上帝保佑人类,我挣扎了好几个小时
    • 手动将此修复应用到 OTRS 2.4 安装也很容易,只需查看此提交:github.com/OTRS/otrs/commit/…
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-05-31
    • 2010-12-21
    • 2014-08-12
    • 2012-07-18
    • 1970-01-01
    • 1970-01-01
    • 2010-11-05
    相关资源
    最近更新 更多