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
246ea32a
Commit
246ea32a
authored
6 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Remove html formatting from emails
parent
bdda0da9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/freedombone-base-email
+29
-0
29 additions, 0 deletions
src/freedombone-base-email
src/freedombone-upgrade
+1
-0
1 addition, 0 deletions
src/freedombone-upgrade
src/freedombone-utils-setup
+3
-0
3 additions, 0 deletions
src/freedombone-utils-setup
with
33 additions
and
0 deletions
src/freedombone-base-email
+
29
−
0
View file @
246ea32a
...
...
@@ -1960,4 +1960,33 @@ function remove_ip_addresses_from_email_logs {
cron_add_mins 1
'/usr/bin/exim_log_tidy'
}
function
email_remove_html
{
html_remove_script
=
'/usr/bin/remove_html.pl'
if
[
!
-f
"
${
html_remove_script
}
"
]
;
then
if
$INSTALL_PACKAGES
libhtml-strip-perl
;
then
{
echo
'#!/usr/bin/perl'
;
echo
'use HTML::Strip;'
;
echo
"my
\$
hs = HTML::Strip->new();"
;
echo
"my
\$
clean_text =
\$
hs->parse( <STDIN> );"
;
echo
"
\$
hs->eof;"
;
echo
"print
\$
clean_text;"
;
}
>
"
${
html_remove_script
}
"
chmod
+x
"
${
html_remove_script
}
"
fi
fi
if
[
-f
"
${
html_remove_script
}
"
]
;
then
for
d
in
/home/
*
/
;
do
USERNAME
=
$(
echo
"
$d
"
|
awk
-F
'/'
'{print $3}'
)
if
[
-f
"/home/
$USERNAME
/.procmailrc"
]
;
then
if
!
grep
-q
'# remove html begin'
"/home/
$USERNAME
/.procmailrc"
;
then
{
echo
'# remove html begin'
;
echo
':0 f'
;
echo
"|
${
html_remove_script
}
"
;
echo
'# remove html end'
;
}
>>
"/home/
$USERNAME
/.procmailrc"
fi
fi
done
fi
}
# NOTE: deliberately no exit 0
This diff is collapsed.
Click to expand it.
src/freedombone-upgrade
+
1
−
0
View file @
246ea32a
...
...
@@ -153,6 +153,7 @@ if [ -d "$PROJECT_DIR" ]; then
android_update_apps
yes
populate_keyservers
disable_email_encryption_at_rest
email_remove_html
if
[
-f
/var/log/freedns_@_update.log
]
;
then
rm
/var/log/freedns_@_update.log
fi
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-utils-setup
+
3
−
0
View file @
246ea32a
...
...
@@ -1197,6 +1197,9 @@ function setup_email {
function_check import_email
import_email
function_check email_remove_html
email_remove_html
}
function
setup_web
{
...
...
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