Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
secrules
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenVMS
tools
secrules
Commits
1786d706f8ee
Commit
1786d706f8ee
authored
5 years ago
by
Jean-Francois Pieronne
Browse files
Options
Downloads
Patches
Plain Diff
secrules/get_mail_info.py initial version
parent
d2155fa445bd
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
secrules/get_mail_info.py
+35
-0
35 additions, 0 deletions
secrules/get_mail_info.py
with
35 additions
and
0 deletions
secrules/get_mail_info.py
0 → 100644
+
35
−
0
View file @
1786d706
import
os
from
vms
import
starlet
from
vms.rtl
import
lib
from
vms
import
user
from
FindFile
import
FindFile
def
getMailObjectInfo
():
all_users
=
user
.
all_users
()
maxsysgroup
=
lib
.
getsyi
(
syidef
.
SYI__MAXSYSGROUP
)[
1
]
def
file_exists
(
fn
):
try
:
with
FindFile
(
fn
)
as
ifn
:
ifn
.
__next__
()
return
True
except
VMSError
,
e
:
return
False
objectMailPresent
=
False
objectMailAccount
=
False
objectMailUser
=
''
with
os
.
popen
(
'
MCR NCL SHOW SESSION CONTROL APPLICATION MAIL
'
)
as
p
:
r
=
[
x
[:
-
1
]
for
x
in
p
]
for
l
in
r
:
if
'
= MAIL
'
in
l
:
objectMailPresent
=
True
if
objectMailPresent
:
for
u
in
all_users
.
values
():
if
u
.
username
==
'
MAIL$SERVER
'
:
objectMailUser
=
u
objectMailAccount
=
True
return
objectMailPresent
,
objectMailAccount
,
objectMailUser
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment