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
aedd4a56
Commit
aedd4a56
authored
6 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Resolve domain alias
parent
d631d79e
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
+29
-0
29 additions, 0 deletions
src/freedombone-base-email
with
29 additions
and
0 deletions
src/freedombone-base-email
+
29
−
0
View file @
aedd4a56
...
...
@@ -1042,6 +1042,35 @@ function email_smtp_proxy_through_isp {
if
[
!
"
$isp_smtp_password
"
]
;
then
return
fi
temp_proxy_file
=
/tmp/emailproxy.txt
host
"
$isp_smtp_domain
"
>
$temp_proxy_file
if
[
-f
$temp_proxy_file
]
;
then
temp_proxy_file_lines
=
$(
wc
-l
<
"
$temp_proxy_file
"
)
# shellcheck disable=SC2086
if
[
$temp_proxy_file_lines
-ge
2
]
;
then
alias_str
=
$'alias'
if
grep
-q
"
$alias_str
"
$temp_proxy_file
;
then
# shellcheck disable=SC2002
line_str
=
$(
cat
"
$temp_proxy_file
"
|
awk
'NF>1{print $NF}'
|
grep
"
$alias_str
"
)
if
[
${#
line_str
}
-gt
4
]
;
then
#shellcheck disable=SC2116
last_char
=
$(
echo
"
${
line_str
:
$i
:1
}
"
)
if
[[
"
$last_char
"
==
'.'
]]
;
then
# remove the last character
#shellcheck disable=SC2116
line_str2
=
$(
echo
${
line_str
::-1
}
)
line_str
=
"
$line_str2
"
fi
if
[[
"
$line_str
"
==
*
'.'
*
]]
;
then
isp_smtp_domain
=
"
$line_str
"
fi
fi
fi
fi
rm
$temp_proxy_file
fi
{
echo
'# password file used when the local exim is authenticating to a remote'
;
echo
'# host as a client.'
;
echo
'#'
;
...
...
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