Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Context Sensitive Group
freedombone
Commits
97b564bd
Commit
97b564bd
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
onion email configuration
parent
ec0a8898
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-base-email
+43
-0
43 additions, 0 deletions
src/freedombone-base-email
with
43 additions
and
0 deletions
src/freedombone-base-email
+
43
−
0
View file @
97b564bd
...
...
@@ -73,6 +73,48 @@ GPGIT_COMMIT='583dc76119f19420f8a33f606744faa7c8922738'
# refresh gpg keys every few hours
REFRESH_GPG_KEYS_HOURS
=
2
function
add_email_hostname
{
extra_email_hostname
=
"
$1
"
email_hostnames
=
$(
cat
/etc/exim4/update-exim4.conf.conf |
grep
"dc_other_hostnames"
|
awk
-F
"'"
'{print $2}'
)
if
[[
"
$email_hostnames
"
!=
*
"
$extra_email_hostname
"
*
]]
;
then
sed
-i
"s|dc_other_hostnames=.*|dc_other_hostnames='
$emailhostnames
;extra_email_hostname'|g"
/etc/exim4/update-exim4.conf.conf
update-exim4.conf
dpkg-reconfigure
--frontend
noninteractive exim4-config
systemctl restart saslauthd
fi
}
function
configure_email_onion
{
if
[[
$(
is_completed
$FUNCNAME
)
==
"1"
]]
;
then
return
fi
if
[[
$SYSTEM_TYPE
==
"mesh"
*
]]
;
then
return
fi
echo
'HiddenServiceDir /var/lib/tor/hidden_service_email/'
>>
/etc/tor/torrc
echo
'HiddenServicePort 25 127.0.0.1:25'
>>
/etc/tor/torrc
echo
'HiddenServicePort 587 127.0.0.1:587'
>>
/etc/tor/torrc
echo
'HiddenServicePort 465 127.0.0.1:465'
>>
/etc/tor/torrc
function_check onion_update
onion_update
function_check wait_for_onion_service
wait_for_onion_service email
if
[[
$(
onion_service_exists email
)
==
"0"
]]
;
then
echo
$"email onion site hostname not found"
exit
782352
fi
onion_address
=
$(
cat
/var/lib/tor/hidden_service_email/hostname
)
set_completion_param
"email onion domain"
"
${
onion_address
}
"
add_email_hostname
"
$onion_address
"
mark_completed
$FUNCNAME
}
function
check_email_address_exists
{
read_config_param ONION_ONLY
read_config_param MY_USERNAME
...
...
@@ -1706,6 +1748,7 @@ function install_email {
check_email_address_exists
install_email_basic
configure_email_onion
#install_email_with_tor
mark_completed
$FUNCNAME
...
...
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