Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re6stnet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
re6stnet
Commits
3009b420
Commit
3009b420
authored
Jun 29, 2018
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
registry: new SMTP options for authentication and starttls
parent
5e30be77
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
re6st/cli/registry.py
re6st/cli/registry.py
+7
-1
re6st/registry.py
re6st/registry.py
+4
-0
No files found.
re6st/cli/registry.py
View file @
3009b420
...
...
@@ -79,10 +79,16 @@ def main():
_
(
'--key'
,
required
=
True
,
help
=
"CA private key in .pem format. For example:
\
n
openssl"
" genpkey -out ca.key -algorithm rsa -pkeyopt rsa_keygen_bits:2048"
)
_
(
'--mailhost'
,
default
=
None
,
_
(
'--mailhost'
,
help
=
"SMTP host to send confirmation emails. For debugging"
" purpose, it can also be an absolute or existing path to"
" a mailbox file. If unset, registration by mail is disabled."
)
_
(
'--smtp-user'
,
help
=
"SMTP login."
)
_
(
'--smtp-pwd'
,
help
=
"SMTP password."
)
_
(
'--smtp-starttls'
,
action
=
'store_true'
,
help
=
"Use STARTTLS for SMTP connections."
)
_
(
'--prefix-length'
,
default
=
16
,
type
=
int
,
help
=
"Default length of allocated prefixes."
" If 0, registration by email is disabled."
)
...
...
re6st/registry.py
View file @
3009b420
...
...
@@ -353,6 +353,10 @@ class RegistryServer(object):
m
.
close
()
else
:
s
=
smtplib
.
SMTP
(
self
.
config
.
mailhost
)
if
self
.
config
.
smtp_starttls
:
s
.
starttls
()
if
self
.
config
.
smtp_user
:
s
.
login
(
self
.
config
.
smtp_user
,
self
.
config
.
smtp_pwd
)
s
.
sendmail
(
self
.
email
,
email
,
msg
.
as_string
())
s
.
quit
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment