Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sympl
Sympl
Commits
7dc9c294
Commit
7dc9c294
authored
Feb 11, 2021
by
Paul Cammish
Browse files
Configuration fixes for Exim 4.94
parent
4bdd1ae8
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
mail/debian/changelog
View file @
7dc9c294
sympl-mail (11.210211.0) stable; urgency=medium
* Fixes for Exim4 on Bullseye
-- Paul Cammish <sympl@kelduum.net> Thu, 11 Feb 2021 15:18:03 +0000
sympl-mail (11.210209.0) stable; urgency=medium
* Updated version for Debian Bullseye
...
...
mail/exim4/sympl.d/10-acl/50-acl-check-rcpt/80-enable-antispam-check
View file @
7dc9c294
...
...
@@ -3,12 +3,12 @@
# acl_m0 hasn't previously been set to "tag"
warn domains = +vhost_domains
condition = ${if and{ \
{exists{VHOST_DIR/${domain}/VHOST_CONFIG_DIR/antispam}} \
{exists{VHOST_DIR/${domain
_data
}/VHOST_CONFIG_DIR/antispam}} \
{!eq{$acl_m0}{tag}} \
}}
# This variable contains the user ID of the owner of the vhost directory
set acl_m0 = ${extract{uid}{${stat:VHOST_DIR/${domain}}}}
set acl_m0 = ${extract{uid}{${stat:VHOST_DIR/${domain
_data
}}}}
# This variable then contains the username (or nobody if grep fails, or the userid < 1000)
set acl_m1 = ${if <{$acl_m0}{1000}{DEFAULT_SPAMD_USER}\
...
...
@@ -23,7 +23,7 @@
# then the message will be accepted, and tagged, else we reject the
# mail.
set acl_m0 = ${if match{${extract{smode}{${stat:VHOST_DIR/${domain}/VHOST_CONFIG_DIR/antispam}}}}{\Nr..$\N}{\
${if match{${readfile{VHOST_DIR/${domain}/VHOST_CONFIG_DIR/antispam}}}{^tag}{tag}{reject}}\
set acl_m0 = ${if match{${extract{smode}{${stat:VHOST_DIR/${domain
_data
}/VHOST_CONFIG_DIR/antispam}}}}{\Nr..$\N}{\
${if match{${readfile{VHOST_DIR/${domain
_data
}/VHOST_CONFIG_DIR/antispam}}}{^tag}{tag}{reject}}\
}{reject}}
mail/exim4/sympl.d/10-acl/50-acl-check-rcpt/85-enable-antivirus-check
View file @
7dc9c294
# Test to see if a domain needs virus scanning,
warn domains = +vhost_domains
condition = ${if and{\
{exists{VHOST_DIR/${domain}/VHOST_CONFIG_DIR/antivirus}} \
{exists{VHOST_DIR/${domain
_data
}/VHOST_CONFIG_DIR/antivirus}} \
{!eq{$acl_m2}{tag}} \
}}
set acl_m2 = ${if match{${extract{smode}{${stat:VHOST_DIR/${domain}/VHOST_CONFIG_DIR/antivirus}}}}{\Nr..$\N}{\
${if match{${readfile{VHOST_DIR/${domain}/VHOST_CONFIG_DIR/antivirus}}}{^tag}{tag}{reject}}\
set acl_m2 = ${if match{${extract{smode}{${stat:VHOST_DIR/${domain
_data
}/VHOST_CONFIG_DIR/antivirus}}}}{\Nr..$\N}{\
${if match{${readfile{VHOST_DIR/${domain
_data
}/VHOST_CONFIG_DIR/antivirus}}}{^tag}{tag}{reject}}\
}{reject}}
mail/exim4/sympl.d/20-routers/24-vhost-mailbox
View file @
7dc9c294
...
...
@@ -5,11 +5,13 @@ vhost_mailbox:
domains = +vhost_domains
local_part_suffix = +*
local_part_suffix_optional
# Define local_parts, which fills in local_part_data
local_parts = dsearch;VHOST_DIR/$domain_data/VHOST_MAILBOX_DIR
condition = ${if exists{VHOST_DIR/$domain/VHOST_MAILBOX_DIR/$local_part/}}
# Set the home directory for any routers/transports.
router_home_directory = VHOST_DIR/$domain/VHOST_MAILBOX_DIR/$local_part
transport_home_directory = VHOST_DIR/$domain/VHOST_MAILBOX_DIR/$local_part
data = VHOST_DIR/$domain/VHOST_MAILBOX_DIR/$local_part/Maildir/${if eqi{$h_X-Spam-Status:}{spam}{.Spam/}{}}
router_home_directory = VHOST_DIR/$domain
_data
/VHOST_MAILBOX_DIR/$local_part
_data
transport_home_directory = VHOST_DIR/$domain
_data
/VHOST_MAILBOX_DIR/$local_part
_data
data = VHOST_DIR/$domain
_data
/VHOST_MAILBOX_DIR/$local_part
_data
/Maildir/${if eqi{$h_X-Spam-Status:}{spam}{.Spam/}{}}
user = ${extract{uid}{${stat:VHOST_DIR/$domain}}}
group = ${extract{gid}{${stat:VHOST_DIR/$domain}}}
directory_transport = address_directory
...
...
mail/exim4/sympl.d/20-routers/26-vhost-default-forward
View file @
7dc9c294
...
...
@@ -4,16 +4,16 @@ vhost_default_forward:
driver = redirect
domains = +vhost_domains
condition = ${if exists{VHOST_DIR/$domain/VHOST_CONFIG_DIR/default_forward}}
file = VHOST_DIR/$domain/VHOST_CONFIG_DIR/default_forward
file = VHOST_DIR/$domain
_data
/VHOST_CONFIG_DIR/default_forward
# Set permissions
user = ${extract{uid}{${stat:VHOST_DIR/$domain/VHOST_CONFIG_DIR}}}
group = ${extract{gid}{${stat:VHOST_DIR/$domain/VHOST_CONFIG_DIR}}}
# Ignore if world writable
modemask = 002
# Set the router/transport home directory
router_home_directory = ${if exists{VHOST_DIR/$domain/VHOST_MAILBOX_DIR/$local_part}{VHOST_DIR/$domain/VHOST_MAILBOX_DIR/$local_part}{VHOST_DIR/$domain}}
router_home_directory = ${if exists{VHOST_DIR/$domain/VHOST_MAILBOX_DIR/$local_part}{VHOST_DIR/$domain
_data
/VHOST_MAILBOX_DIR/$local_part}{VHOST_DIR/$domain
_data
}}
transport_home_directory = ${if exists{VHOST_DIR/$domain/VHOST_MAILBOX_DIR/$local_part}{VHOST_DIR/$domain/VHOST_MAILBOX_DIR/$local_part}{VHOST_DIR/$domain}}
transport_home_directory = ${if exists{VHOST_DIR/$domain/VHOST_MAILBOX_DIR/$local_part}{VHOST_DIR/$domain
_data
/VHOST_MAILBOX_DIR/$local_part}{VHOST_DIR/$domain
_data
}}
directory_transport = address_directory
file_transport = address_file
pipe_transport = address_pipe
...
...
@@ -34,4 +34,3 @@ vhost_default_forward_check:
driver = accept
condition = ${if exists{VHOST_DIR/$domain/VHOST_CONFIG_DIR/default_forward}}
verify_only
mail/sympl/test.d/tc_exim4_live.rb
View file @
7dc9c294
...
...
@@ -172,26 +172,35 @@ Testing 1.2.3..
Sympl Test
EOF
smtp
.
start
do
assert_nothing_raised
(
"AUTH PLAIN failed for a user with crypt'd password"
)
do
smtp
.
auth_login
(
@mailbox_crypt
.
username
,
@mailbox_crypt_password
)
end
assert_nothing_raised
do
3
.
times
do
smtp
.
send_message
msg
,
@mailbox_crypt
.
username
,
@mailbox
.
username
end
end
# send 3 messages
smtp
.
send_message
msg
,
@mailbox_crypt
.
username
,
@mailbox
.
username
smtp
.
send_message
msg
,
@mailbox_crypt
.
username
,
@mailbox
.
username
smtp
.
send_message
msg
,
@mailbox_crypt
.
username
,
@mailbox
.
username
# enable rate limit
Symbiosis
::
Utils
.
set_param
(
"mailbox-ratelimit"
,
"1000000"
,
@domain
.
config_dir
)
Symbiosis
::
Utils
.
set_param
(
"mailbox-ratelimit"
,
"2"
,
@domain
.
config_dir
)
# send one more message which should be fine
smtp
.
send_message
msg
,
@mailbox_crypt
.
username
,
@mailbox
.
username
# drop the limit to 1 message
Symbiosis
::
Utils
.
set_param
(
"mailbox-ratelimit"
,
"1"
,
@domain
.
config_dir
)
# send more messages which should now fail
assert_raise
(
Net
::
SMTPFatalError
)
do
3
.
times
do
smtp
.
send_message
msg
,
@mailbox_crypt
.
username
,
@mailbox
.
username
end
smtp
.
send_message
msg
,
@mailbox_crypt
.
username
,
@mailbox
.
username
smtp
.
send_message
msg
,
@mailbox_crypt
.
username
,
@mailbox
.
username
end
# send another message which should be fine
Symbiosis
::
Utils
.
set_param
(
"mailbox-ratelimit"
,
"100"
,
@domain
.
config_dir
)
smtp
.
send_message
msg
,
@mailbox_crypt
.
username
,
@mailbox
.
username
end
ensure
10
.
times
do
...
...
Paul Cammish
@kelduum
mentioned in issue
#307 (closed)
·
Feb 12, 2021
mentioned in issue
#307 (closed)
mentioned in issue #307
Toggle commit list
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