Deny Domain_Admin access to Message Viewer

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

Deny Domain_Admin access to Message Viewer

Post by ItemsGmbH »

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: 24
Joined: 20 Dec 2018 14:53

Re: Deny Domain_Admin access to Message Viewer

Post by ItemsGmbH »

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: 1553
Joined: 18 Mar 2015 09:16

Re: Deny Domain_Admin access to Message Viewer

Post by pdwalker »

Thanks for posting the answer to your problem. That'll help the next person who needs it.
ItemsGmbH
Posts: 24
Joined: 20 Dec 2018 14:53

Re: Deny Domain_Admin access to Message Viewer

Post by ItemsGmbH »

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