Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mailinabox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mailinabox
Commits
5f17abc8
Commit
5f17abc8
authored
Jul 11, 2015
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #463 from PortableTech/master
outgoing_mail_header_filters use local hostname and ip
parents
a91995f0
07beef3d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
postfix_outgoing_mail_header_filters
conf/postfix_outgoing_mail_header_filters
+1
-1
mail-postfix.sh
setup/mail-postfix.sh
+6
-0
No files found.
conf/postfix_outgoing_mail_header_filters
View file @
5f17abc8
# Remove the first line of the Received: header. Note that we cannot fully remove the Received: header
# Remove the first line of the Received: header. Note that we cannot fully remove the Received: header
# because OpenDKIM requires that a header be present when signing outbound mail. The first line is
# because OpenDKIM requires that a header be present when signing outbound mail. The first line is
# where the user's home IP address would be.
# where the user's home IP address would be.
/^\s*Received:[^\n]*(.*)/ REPLACE Received: from authenticated-user (
unknown [127.0.0.1
])$1
/^\s*Received:[^\n]*(.*)/ REPLACE Received: from authenticated-user (
PRIMARY_HOSTNAME [PUBLIC_IP
])$1
# Remove other typically private information.
# Remove other typically private information.
/^\s*User-Agent:/ IGNORE
/^\s*User-Agent:/ IGNORE
...
...
setup/mail-postfix.sh
View file @
5f17abc8
...
@@ -93,6 +93,12 @@ tools/editconf.py /etc/postfix/master.cf -s -w \
...
@@ -93,6 +93,12 @@ tools/editconf.py /etc/postfix/master.cf -s -w \
# Install the `outgoing_mail_header_filters` file required by the new 'authclean' service.
# Install the `outgoing_mail_header_filters` file required by the new 'authclean' service.
cp
conf/postfix_outgoing_mail_header_filters /etc/postfix/outgoing_mail_header_filters
cp
conf/postfix_outgoing_mail_header_filters /etc/postfix/outgoing_mail_header_filters
# Modify the `outgoing_mail_header_filters` file to use the local machine name and ip
# on the first received header line. This may help reduce the spam score of email by
# removing the 127.0.0.1 reference.
sed
-i
"s/PRIMARY_HOSTNAME/
$PRIMARY_HOSTNAME
/"
/etc/postfix/outgoing_mail_header_filters
sed
-i
"s/PUBLIC_IP/
$PUBLIC_IP
/"
/etc/postfix/outgoing_mail_header_filters
# Enable TLS on these and all other connections (i.e. ports 25 *and* 587) and
# Enable TLS on these and all other connections (i.e. ports 25 *and* 587) and
# require TLS before a user is allowed to authenticate. This also makes
# require TLS before a user is allowed to authenticate. This also makes
# opportunistic TLS available on *incoming* mail.
# opportunistic TLS available on *incoming* mail.
...
...
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