Kernel::System::Ticket::Article::Backend::Email::Security

NAME

Kernel::System::Ticket::Article::Backend::Email::Security – class for E-Mail security checks

DESCRIPTION

This is a class provides methods to check email security, store results, update articles after decryption and provide email security information.

PUBLIC INTERFACE

new()

Don't use the constructor directly, use the ObjectManager instead:

    my $EmailSecurityObject = $Kernel::OM->Get('Kernel::System::Article::Backend::Email::Security');

EmailSecurityContentGet()

Evaluate E-Mail security information and return decrypted and cleaned body if we have an encrypted e-mail. If e-mail was not encrypted, it returns undef.

    my $DecryptedBody = $EmailSecurityObject->EmailSecurityContentGet(
        Email      => '...',     # plain email
        SenderType => 'customer',       # or 'agent' or 'system'
    );

EmailSecurityContentUpdate()

Compile E-Mail security information and store them.

    my $SecurityCheckResult = $EmailSecurityObject->EmailSecurityContentUpdate(
        ArticleID  => 1,
        Body       => '...',            # current plain body of article
        SenderType => 'customer',       # or 'agent' or 'system'
    );

Returns:

    $SecurityCheckResult = 'ok';   # or 'updated' in case of article updates or undef in case of errors

EmailSecuritySet()

Store information about E-Mail security.

    my $Success = $EmailSecurityObject->EmailSecuritySet(
        ArticleID => 123,
        Crypted => {                                            # only exists if mail was crypted
            State       => 'ok',                                # or 'error'
            Type        => 'SMIME',                             # or 'PGP'
            MessageFlag => 'ok',                                # optional, issue indicator for translatable message prefix
            MessageRaw  => 'Decryption successful...',          # optional, detailed backend information
        },
        Signed => {                                             # only exists if mail was signed
            State       => 'ok',                                # or 'error' or 'warning'
            Type        => 'SMIME',                             # or 'PGP'
            MessageFlag => 'ok',                                # optional, issue indicator for translatable message prefix
            MessageRaw  => 'Verification successful...',        # optional, detailed backend information
        },
    );

EmailSecurityGet()

Get information about E-Mail security.

    my %EmailSecurityOptions = $EmailSecurityObject->EmailSecurityGet(
        ArticleID  => 123,
        Body       => '...',            # optional, current plain body of article
        SenderType => 'customer',       # or 'agent' or 'system'
        NoRecalc   => 0,                # optional, 0 or 1
    );

Returns:

    %EmailSecurityOptions = (
        ArticleID => 123,
        Crypted   => {                                            # only exists if mail was crypted
            State       => 'ok',                                # or 'error'
            Type        => 'SMIME',                             # or 'PGP'
            MessageFlag => 'ok',                                # optional, issue indicator for translatable message prefix
            MessageRaw  => 'Decryption successful...',          # optional, detailed backend information
        },
        Signed => {                                             # only exists if mail was signed
            State       => 'ok',                                # or 'error' or 'warning'
            Type        => 'SMIME',                             # or 'PGP'
            MessageFlag => 'ok',                                # optional, issue indicator for translatable message prefix
            MessageRaw  => 'Verification successful...',        # optional, detailed backend information
        },
    );
Scroll to Top