Deny Domain_Admin access to Message Viewer

Questions and answers about how to do stuff
Post Reply
ItemsGmbH
Posts: 13
Joined: 20 Dec 2018 14:53

Deny Domain_Admin access to Message Viewer

Post by ItemsGmbH » 30 Oct 2019 09:03

Hi there,

is there a way to deny USER and DOMAIN_ADMIN access to view the content of a mail?
The "main" ADMINISTRATOR can still look inside the mail content

I mean the link at "Path to message"

ItemsGmbH
Posts: 13
Joined: 20 Dec 2018 14:53

Re: Deny Domain_Admin access to Message Viewer

Post by ItemsGmbH » 30 Oct 2019 10:35

Found it myself :lol:

/var/www/html/mailscanner/

detail.php

Code: Select all

 // Domain admins can view the file only if enabled
            if (
                (
            //      $item['dangerous'] === 'N' ||
                    $_SESSION['user_type'] === 'A' ||
                    (defined('DOMAINADMIN_CAN_SEE_DANGEROUS_CONTENTS') && true === DOMAINADMIN_CAN_SEE_DANGEROUS_CONTENTS && $_SESSION['user_type'] === 'D' && $item['dangerous'] === 'Y')
                ) && preg_match('!message/rfc822!', $item['type'])
            ) {

conf.php

Code: Select all

// Give Domain Admins ability to release dangerous content, like viruses
define('DOMAINADMIN_CAN_RELEASE_DANGEROUS_CONTENTS', true);
define('DOMAINADMIN_CAN_SEE_DANGEROUS_CONTENTS', false);

User avatar
pdwalker
Posts: 1160
Joined: 18 Mar 2015 09:16

Re: Deny Domain_Admin access to Message Viewer

Post by pdwalker » 31 Oct 2019 11:02

Thanks for posting the answer to your problem. That'll help the next person who needs it.

ItemsGmbH
Posts: 13
Joined: 20 Dec 2018 14:53

Re: Deny Domain_Admin access to Message Viewer

Post by ItemsGmbH » 31 Oct 2019 11:49

That was my intention
I really hate these people "Found it, thanks and bye" :lol:

Post Reply