consistently make 1 the default value for SPAMASSASSIN_SPAM_TO_INBOX#2361
consistently make 1 the default value for SPAMASSASSIN_SPAM_TO_INBOX#2361georglauterbach merged 14 commits intodocker-mailserver:masterfrom
SPAMASSASSIN_SPAM_TO_INBOX#2361Conversation
Yes - something you could not possibly know beforehand. Please also have a look at and change it - VARS[SPAMASSASSIN_SPAM_TO_INBOX]="${SPAMASSASSIN_SPAM_TO_INBOX:=0}"
+ VARS[SPAMASSASSIN_SPAM_TO_INBOX]="${SPAMASSASSIN_SPAM_TO_INBOX:=1}"cc @docker-mailserver/maintainers what do you all think about this? I'm fine with |
|
I see. So the real default value is |
Exactly 😆
Kind-of. That's why I cc'ed the maintainers :) |
|
I am fine, with changing the default. |
SPAMASSASSIN_SPAM_TO_INBOXSPAMASSASSIN_SPAM_TO_INBOX
|
Done. |
|
Some tests failed. They must be adjusted. I haven't look in detail. Setting explicitly |
|
Looks some more code needs to be changed. In case |
|
The error message
is there because a long time ago, it was (for whatever reason, it was before my time) decided that an undefined value should raise a warning. I'm not a fan of this behavior, as we should go for the safest method for the user. However, this would require you @craue to fiddle with the tests. Before we do, I'd like to hear @casperklein's ideas on that. I'd go for removing this test and properly set a default ( |
|
I refactored the warning test, so feel free to ask any questions. If dropping the warning test case, it's just this portion, the other test case still seems relevant: docker-mailserver/test/mail_spam_bounced.bats Lines 49 to 63 in 0c31f71 You'd also remove the function for testing the emitted warning, and it's two lines used in the other test case too: docker-mailserver/test/mail_spam_bounced.bats Lines 69 to 72 in 0c31f71 docker-mailserver/test/mail_spam_bounced.bats Lines 43 to 44 in 0c31f71 The tests for when the ENV is set to I think prior to this PR, the warning was used to test the implicit/default value of the ENV to ensure that worked as expected too. Up to the other maintainers if it's still considered useful to test for a default expectation still, testing against the actual ENV value and expected is probably sufficient. |
|
Ping @casperklein :) (see my latest comment above) |
|
Yes, removing the test makes sense 👍 |
|
Alright. @craus if you follow @polarathene's advice about how to remove the test(s) and also remove the following lines docker-mailserver/target/scripts/startup/setup-stack.sh Lines 1361 to 1364 in 29c2d97 we should be good to go. Sorry this got more engaged that anticipated, but this variable suffers from "legacy decisions" :) If you are ready, please ping me back to I can re-open the PR for review. |
|
We should still warn the user, when mails can be rejected. So I would keep the warning, but with:
|
We could do that, but when explicitly setting the variable to |
|
That's not an easy decision. I also thought about suggesting to just keep this warning but I don't like the idea of flooding the logs with warnings one cannot get rid of (after having set |
|
ack |
|
Alright. @craue I would, if you think this PR is ready, update the branch to be up-to-date with |
|
@docker-mailserver/maintainers After a few more (unsuccessful) attempts, I re-enable the regular expression. I'd like to see this being merged because I have another PR "in the pipeline" I'd like to come up with. If there is nothing else you object to, please approve this. I have added a |
Interesting, I always get 13K. Could you add this lines above the {
echo -n "Debug: "
docker exec mail /bin/sh -c "sed -i '/ENABLE_QUOTAS=0/d' /etc/dms-settings; listmailuser | grep user1@localhost\.localdomain"
echo "Debug: E-Mail subjects -->"
docker exec mail bash -c "find /var/mail/localhost.localdomain/user1/ -type f -exec grep -Hi subject {} \; | nl"
} >&3This is the output from my "13K" test |
|
@casperklein Running on @craue's branch, I get this: Successfully built 8076124f44bd
Successfully tagged mailserver-testing-craue:ci
- first (skipped: This version natively supports setup/teardown_file)
✗ checking accounts: listmailuser (quotas enabled) [1173]
Debug: * [email protected] ( 14K / ~ ) [0%]
Debug: E-Mail subjects -->
1 /var/mail/localhost.localdomain/user1/new/1644837995.M711585P4544.mail.my-domain.com,S=1001,W=1026:Subject: Test Message sieve-spam-folder.txt
2 /var/mail/localhost.localdomain/user1/new/1644837985.M286051P4544.mail.my-domain.com,S=2492,W=2556:Subject: VIRUS (Win.Test.EICAR_HDB-1) in mail FROM [127.0.0.1]:51992
3 /var/mail/localhost.localdomain/user1/new/1644837985.M286051P4544.mail.my-domain.com,S=2492,W=2556:Subject: Test Message amavis-virus.txt
4 /var/mail/localhost.localdomain/user1/new/1644837985.M286051P4544.mail.my-domain.com,S=2492,W=2556:Subject: Test Message amavis-virus.txt
5 /var/mail/localhost.localdomain/user1/new/1644837991.M104234P4544.mail.my-domain.com,S=1065,W=1090:Subject: Test Message existing-regexp-alias-local.txt
6 /var/mail/localhost.localdomain/user1/new/1644837988.M327P4544.mail.my-domain.com,S=804,W=822:Subject: Root Test Message
7 /var/mail/localhost.localdomain/user1/new/1644837991.M559723P4544.mail.my-domain.com,S=1057,W=1082:Subject: Test Message existing-catchall-local.txt
8 /var/mail/localhost.localdomain/user1/new/1644837986.M159923P4544.mail.my-domain.com,S=1060,W=1085:Subject: Test Message existing-alias-external.txt
9 /var/mail/localhost.localdomain/user1/new/1644837990.M353319P4544.mail.my-domain.com,S=1124,W=1150:Subject: Test Message existing-user-and-cc-local-alias.txt
10 /var/mail/localhost.localdomain/user1/new/1644837988.M865065P4544.mail.my-domain.com,S=1050,W=1075:Subject: Test Message existing-user1.txt
11 /var/mail/localhost.localdomain/user1/new/1644837988.M687708P4544.mail.my-domain.com,S=1107,W=1132:Subject: Test Message existing-alias-recipient-delimiter.txt
12 /var/mail/localhost.localdomain/user1/.INBOX.spam/new/1644837995.M727062P4544.mail.my-domain.com,S=1001,W=1026:Subject: Test Message sieve-spam-folder.txt
13 /var/mail/localhost.localdomain/user1/.Junk/new/1644837986.M941550P4544.mail.my-domain.com,S=1261,W=1289:Subject: SPAM: Test Message amavis-spam.txt
(from function `assert_output' in file test/test_helper/bats-assert/src/assert.bash, line 239,
in test file test/tests.bats, line 111)
`assert_output '* [email protected] ( 13K / ~ ) [0%]'' failed
doveadm(# this is a test comment, please don't delete me :'(): Error: User doesn't exist
/usr/local/bin/listmailuser: line 15: 1024 * : syntax error: operand expected (error token is "* ")
/usr/local/bin/listmailuser: line 15: 1024 * : syntax error: operand expected (error token is "* ")
doveadm(# this is also a test comment, :O): Error: User doesn't exist
/usr/local/bin/listmailuser: line 15: 1024 * : syntax error: operand expected (error token is "* ")
/usr/local/bin/listmailuser: line 15: 1024 * : syntax error: operand expected (error token is "* ")
grep: /var/mail/localhost.localdomain/user1/dovecot.index.cache: binary file matches
grep: /var/mail/localhost.localdomain/user1/.INBOX.spam/dovecot.index.cache: binary file matches
grep: /var/mail/localhost.localdomain/user1/.Junk/dovecot.index.cache: binary file matches
-- output differs --
expected : * [email protected] ( 13K / ~ ) [0%]
actual : * [email protected] ( 14K / ~ ) [0%]
--
2 tests, 1 failure, 1 skipped in 72 seconds
make: *** [Makefile:41: tests] Error 1Your debug statements are very good it seems. Maybe we can dig a little further here. EDIT 1: It seems as if #2382 was reverted? But I don't see where... I will re-introduce it and see what happens. |
This is the script I'm working with#! /bin/bash
# shellcheck source=../scripts/helper-functions.sh
. /usr/local/bin/helper-functions.sh
# suppress error output, e.g. when listmailuser runs in a fresh container (DMS not running)
# shellcheck source=/dev/null
. /etc/dms-settings 2>/dev/null
function dovecot_quota_to_hr()
{
if [[ ${1:-} == "-" ]]
then
echo "~"
elif [[ ${1:-} =~ ^[0-9]+$ ]]
then
echo $(( 1024 * ${1} )) | numfmt --to=iec
else
_notify 'err' "Supplied non-number argument '${1:-}' to 'dovecot_quota_to_hr()' in script 'listmailuser'"
fi
}
DATABASE="/tmp/docker-mailserver/postfix-accounts.cf"
ALIASES="/tmp/docker-mailserver/postfix-virtual.cf"
[[ -f ${DATABASE} ]] || errex "Error: No postfix-accounts.cf file"
[[ -s ${DATABASE} ]] || errex "Error: Empty postfix-accounts.cf - no accounts have been added"
while read -r LINE
do
USER=$(echo "${LINE}" | cut -d'|' -f1)
_is_comment "${USER}" && continue
if [[ ${ENABLE_QUOTAS} -eq 1 ]]
then
# ${QUOTA[0]} => current size
# ${QUOTA[1]} => configured size limit
# ${QUOTA[2]} => usage in percent
IFS=' ' read -r -a QUOTA <<< "$(doveadm quota get -u "${USER}" | tail +2 | awk '{ if ($3 == "STORAGE") { print $4" "$5" "$6 } }')"
echo "* ${USER} ( $(dovecot_quota_to_hr "${QUOTA[0]}") / $(dovecot_quota_to_hr "${QUOTA[1]}") ) [${QUOTA[2]}%]"
else
echo "* ${USER}"
fi
if [[ -f ${ALIASES} ]] && grep -q "${USER}" "${ALIASES}"
then
echo -e " [ aliases -> $(grep "${USER}" "${ALIASES}" | awk '{print $1;}' | sed ':a;N;$!ba;s/\n/, /g')]\n"
else
echo
fi
done < "${DATABASE}"
exit 0This is the corresponding test output (still failing)Successfully built b26331da1717
Successfully tagged mailserver-testing-craue:ci
- first (skipped: This version natively supports setup/teardown_file)
✗ checking accounts: listmailuser (quotas enabled) [1057]
Debug: * [email protected] ( 14K / ~ ) [0%]
Debug: E-Mail subjects -->
1 /var/mail/localhost.localdomain/user1/new/1644840287.M489234P4492.mail.my-domain.com,S=1065,W=1090:Subject: Test Message existing-regexp-alias-local.txt
2 /var/mail/localhost.localdomain/user1/new/1644840288.M360077P4492.mail.my-domain.com,S=1001,W=1026:Subject: Test Message sieve-spam-folder.txt
3 /var/mail/localhost.localdomain/user1/new/1644840283.M41040P4452.mail.my-domain.com,S=2492,W=2556:Subject: VIRUS (Win.Test.EICAR_HDB-1) in mail FROM [127.0.0.1]:52332
4 /var/mail/localhost.localdomain/user1/new/1644840283.M41040P4452.mail.my-domain.com,S=2492,W=2556:Subject: Test Message amavis-virus.txt
5 /var/mail/localhost.localdomain/user1/new/1644840283.M41040P4452.mail.my-domain.com,S=2492,W=2556:Subject: Test Message amavis-virus.txt
6 /var/mail/localhost.localdomain/user1/new/1644840283.M859517P4452.mail.my-domain.com,S=1060,W=1085:Subject: Test Message existing-alias-external.txt
7 /var/mail/localhost.localdomain/user1/new/1644840286.M817893P4536.mail.my-domain.com,S=1124,W=1150:Subject: Test Message existing-user-and-cc-local-alias.txt
8 /var/mail/localhost.localdomain/user1/new/1644840287.M764184P4492.mail.my-domain.com,S=1057,W=1082:Subject: Test Message existing-catchall-local.txt
9 /var/mail/localhost.localdomain/user1/new/1644840285.M893991P4492.mail.my-domain.com,S=804,W=822:Subject: Root Test Message
10 /var/mail/localhost.localdomain/user1/new/1644840285.M85293P4452.mail.my-domain.com,S=1050,W=1075:Subject: Test Message existing-user1.txt
11 /var/mail/localhost.localdomain/user1/new/1644840284.M707084P4492.mail.my-domain.com,S=1107,W=1132:Subject: Test Message existing-alias-recipient-delimiter.txt
12 /var/mail/localhost.localdomain/user1/.INBOX.spam/new/1644840288.M375997P4492.mail.my-domain.com,S=1001,W=1026:Subject: Test Message sieve-spam-folder.txt
13 /var/mail/localhost.localdomain/user1/.Junk/new/1644840283.M641631P4452.mail.my-domain.com,S=1261,W=1289:Subject: SPAM: Test Message amavis-spam.txt
(from function `assert_output' in file test/test_helper/bats-assert/src/assert.bash, line 239,
in test file test/tests.bats, line 111)
`assert_output '* [email protected] ( 13K / ~ ) [0%]'' failed
grep: /var/mail/localhost.localdomain/user1/dovecot.index.cache: binary file matches
grep: /var/mail/localhost.localdomain/user1/.INBOX.spam/dovecot.index.cache: binary file matches
grep: /var/mail/localhost.localdomain/user1/.Junk/dovecot.index.cache: binary file matches
-- output differs --
expected : * [email protected] ( 13K / ~ ) [0%]
actual : * [email protected] ( 14K / ~ ) [0%]
--
2 tests, 1 failure, 1 skipped in 58 seconds
make: *** [Makefile:41: tests] Error 1The |
I cannot confirm this. Are you on the correct branch? --> This is what I do: |
|
So you also see 13 mails, but with a total size of 14K. Then there must be a difference in the mails content. Next step could be, to debug output also the mails content, instead of just their subjects. |
|
Yes, I checked out the branch but it was a later state. Pulling resolves this issue. |
|
This will also print the mails content: {
echo -n "Debug: "
docker exec mail /bin/sh -c "sed -i '/ENABLE_QUOTAS=0/d' /etc/dms-settings; listmailuser | grep user1@localhost\.localdomain"
echo "Debug: E-Mail subjects -->"
docker exec mail bash -c "find /var/mail/localhost.localdomain/user1/ -type f -exec grep -Hi subject: {} \; | nl"
echo
docker exec mail bash -c "find /var/mail/localhost.localdomain/user1/ -type f -not -name '*dovecot.index.cache*' -exec grep -li subject: {} \; | xargs -I'{}' bash -c 'echo Debug: E-Mail content: {}; echo; cat {}; echo -------------------------------------------------------------------------------------'"
} >&3I recognized, that one mail is counted 3 times. So there are just 11 mails in total. See my comment in line 14. Output |
My outputDebug: * [email protected] ( 14K / ~ ) [0%]
Debug: E-Mail subjects -->
1 /var/mail/localhost.localdomain/user1/new/1644873101.M43489P4463.mail.my-domain.com,S=804,W=822:Subject: Root Test Message
2 /var/mail/localhost.localdomain/user1/new/1644873103.M10566P4463.mail.my-domain.com,S=1124,W=1150:Subject: Test Message existing-user-and-cc-local-alias.txt
3 /var/mail/localhost.localdomain/user1/new/1644873098.M840497P4463.mail.my-domain.com,S=2492,W=2556:Subject: VIRUS (Win.Test.EICAR_HDB-1) in mail FROM [127.0.0.1]:55442
4 /var/mail/localhost.localdomain/user1/new/1644873098.M840497P4463.mail.my-domain.com,S=2492,W=2556:Subject: Test Message amavis-virus.txt
5 /var/mail/localhost.localdomain/user1/new/1644873098.M840497P4463.mail.my-domain.com,S=2492,W=2556:Subject: Test Message amavis-virus.txt
6 /var/mail/localhost.localdomain/user1/new/1644873100.M788628P4463.mail.my-domain.com,S=1107,W=1132:Subject: Test Message existing-alias-recipient-delimiter.txt
7 /var/mail/localhost.localdomain/user1/new/1644873101.M503017P4463.mail.my-domain.com,S=1050,W=1075:Subject: Test Message existing-user1.txt
8 /var/mail/localhost.localdomain/user1/new/1644873104.M834089P4463.mail.my-domain.com,S=1001,W=1026:Subject: Test Message sieve-spam-folder.txt
9 /var/mail/localhost.localdomain/user1/new/1644873104.M66125P4463.mail.my-domain.com,S=1057,W=1082:Subject: Test Message existing-catchall-local.txt
10 /var/mail/localhost.localdomain/user1/new/1644873099.M780602P4463.mail.my-domain.com,S=1060,W=1085:Subject: Test Message existing-alias-external.txt
11 /var/mail/localhost.localdomain/user1/new/1644873103.M819960P4520.mail.my-domain.com,S=1065,W=1090:Subject: Test Message existing-regexp-alias-local.txt
12 /var/mail/localhost.localdomain/user1/.INBOX.spam/new/1644873104.M850713P4463.mail.my-domain.com,S=1001,W=1026:Subject: Test Message sieve-spam-folder.txt
13 /var/mail/localhost.localdomain/user1/.Junk/new/1644873099.M886028P4463.mail.my-domain.com,S=1261,W=1289:Subject: SPAM: Test Message amavis-spam.txt
Debug: E-Mail content: /var/mail/localhost.localdomain/user1/new/1644873101.M43489P4463.mail.my-domain.com,S=804,W=822
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mail.my-domain.com
by mail.my-domain.com with LMTP
id UM6EAo3FCmJvEQAAUIhAew
(envelope-from <[email protected]>)
for <[email protected]>; Mon, 14 Feb 2022 21:11:41 +0000
Received: by mail.my-domain.com (Postfix)
id 08E3C342D26; Mon, 14 Feb 2022 21:11:41 +0000 (UTC)
Delivered-To: [email protected]
Received: by mail.my-domain.com (Postfix, from userid 0)
id F2F8D34311D; Mon, 14 Feb 2022 21:11:40 +0000 (UTC)
Subject: Root Test Message
Message-Id: <[email protected]>
Date: Mon, 14 Feb 2022 21:11:40 +0000 (UTC)
From: root <[email protected]>
This is a test mail.
-------------------------------------------------------------------------------------
Debug: E-Mail content: /var/mail/localhost.localdomain/user1/new/1644873103.M10566P4463.mail.my-domain.com,S=1124,W=1150
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mail.my-domain.com
by mail.my-domain.com with LMTP
id qHKPAI/FCmJvEQAAUIhAew
(envelope-from <[email protected]>)
for <[email protected]>; Mon, 14 Feb 2022 21:11:43 +0000
Received: from localhost (localhost [127.0.0.1])
by mail.my-domain.com (Postfix) with ESMTP id F3AA5342CF1
for <[email protected]>; Mon, 14 Feb 2022 21:11:42 +0000 (UTC)
X-Virus-Scanned: Yes
X-Spam-Flag: NO
X-Spam-Score: 1.798
X-Spam-Level: *
X-Spam-Status: No, score=1.798 tagged_above=-5 required=2
tests=[DKIM_ADSP_NXDOMAIN=0.8, HEADER_FROM_DIFFERENT_DOMAINS=1,
NO_RECEIVED=-0.001, NO_RELAYS=-0.001] autolearn=no autolearn_force=no
From: Docker Mail Server <[email protected]>
To: Existing Local User <[email protected]>
Cc: Existing Local Alias <[email protected]>
Date: Sat, 22 May 2010 07:43:25 -0400
Subject: Test Message existing-user-and-cc-local-alias.txt
Message-Id: <[email protected]>
This is a test mail.
-------------------------------------------------------------------------------------
Debug: E-Mail content: /var/mail/localhost.localdomain/user1/new/1644873098.M840497P4463.mail.my-domain.com,S=2492,W=2556
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mail.my-domain.com
by mail.my-domain.com with LMTP
id BtX0MYrFCmJvEQAAUIhAew
(envelope-from <[email protected]>)
for <[email protected]>; Mon, 14 Feb 2022 21:11:38 +0000
Received: from localhost (localhost [127.0.0.1])
by mail.my-domain.com (Postfix) with ESMTP id B780B342D28
for <[email protected]>; Mon, 14 Feb 2022 21:11:38 +0000 (UTC)
Content-Type: multipart/mixed; boundary="----------=_1644873098-1526-0"
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0
From: "Content-filter at mail.my-domain.com" <[email protected]>
Date: Mon, 14 Feb 2022 21:11:38 +0000 (UTC)
Subject: VIRUS (Win.Test.EICAR_HDB-1) in mail FROM [127.0.0.1]:55442
<[email protected]>
To: <[email protected]>
Message-ID: <[email protected]>
This is a multi-part message in MIME format...
------------=_1644873098-1526-0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
A virus was found: Win.Test.EICAR_HDB-1
Scanner detecting a virus: ClamAV-clamd
Content type: Virus
Internal reference code for the message is 01526-01/quebgL_HqFoQ
First upstream SMTP client IP address: [127.0.0.1] localhost
Return-Path: <[email protected]>
From: Docker Mail Server <[email protected]>
Message-ID: <[email protected]>
Subject: Test Message amavis-virus.txt
The message has been quarantined as: q/virus-quebgL_HqFoQ
The message WAS NOT relayed to:
<[email protected]>:
250 2.7.0 Ok, discarded, id=01526-01 - INFECTED: Win.Test.EICAR_HDB-1
Virus scanner output:
/var/mail-state/lib-amavis/tmp/amavis-20220214T211138-01526-pUkvfYSm/parts/p001: Win.Test.EICAR_HDB-1 FOUND
------------=_1644873098-1526-0
Content-Type: text/rfc822-headers; name="header.hdr"
Content-Disposition: inline; filename="header.hdr"
Content-Transfer-Encoding: 7bit
Content-Description: Message header section
Return-Path: <[email protected]>
From: Docker Mail Server <[email protected]>
To: Existing Local User <[email protected]>
Date: Sat, 22 May 2010 07:43:25 -0400
Subject: Test Message amavis-virus.txt
Message-Id: <[email protected]>
------------=_1644873098-1526-0--
-------------------------------------------------------------------------------------
Debug: E-Mail content: /var/mail/localhost.localdomain/user1/new/1644873100.M788628P4463.mail.my-domain.com,S=1107,W=1132
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mail.my-domain.com
by mail.my-domain.com with LMTP
id SB3uLozFCmJvEQAAUIhAew
(envelope-from <[email protected]>)
for <[email protected]>; Mon, 14 Feb 2022 21:11:40 +0000
Received: from localhost (localhost [127.0.0.1])
by mail.my-domain.com (Postfix) with ESMTP id BE7DF343120
for <[email protected]>; Mon, 14 Feb 2022 21:11:40 +0000 (UTC)
X-Virus-Scanned: Yes
X-Spam-Flag: NO
X-Spam-Score: 1.798
X-Spam-Level: *
X-Spam-Status: No, score=1.798 tagged_above=-5 required=2
tests=[DKIM_ADSP_NXDOMAIN=0.8, HEADER_FROM_DIFFERENT_DOMAINS=1,
NO_RECEIVED=-0.001, NO_RELAYS=-0.001] autolearn=no autolearn_force=no
From: Docker Mail Server <[email protected]>
To: Existing Local Alias With Delimiter <[email protected]>
Date: Sat, 22 May 2010 07:43:25 -0400
Subject: Test Message existing-alias-recipient-delimiter.txt
Message-Id: <[email protected]>
This is a test mail.
-------------------------------------------------------------------------------------
Debug: E-Mail content: /var/mail/localhost.localdomain/user1/new/1644873101.M503017P4463.mail.my-domain.com,S=1050,W=1075
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mail.my-domain.com
by mail.my-domain.com with LMTP
id wJfpHY3FCmJvEQAAUIhAew
(envelope-from <[email protected]>)
for <[email protected]>; Mon, 14 Feb 2022 21:11:41 +0000
Received: from localhost (localhost [127.0.0.1])
by mail.my-domain.com (Postfix) with ESMTP id 77F9D342D26
for <[email protected]>; Mon, 14 Feb 2022 21:11:41 +0000 (UTC)
X-Virus-Scanned: Yes
X-Spam-Flag: NO
X-Spam-Score: 1.798
X-Spam-Level: *
X-Spam-Status: No, score=1.798 tagged_above=-5 required=2
tests=[DKIM_ADSP_NXDOMAIN=0.8, HEADER_FROM_DIFFERENT_DOMAINS=1,
NO_RECEIVED=-0.001, NO_RELAYS=-0.001] autolearn=no autolearn_force=no
From: Docker Mail Server <[email protected]>
To: Existing Local User <[email protected]>
Date: Sat, 22 May 2010 07:43:25 -0400
Subject: Test Message existing-user1.txt
Message-Id: <[email protected]>
This is a test mail.
-------------------------------------------------------------------------------------
Debug: E-Mail content: /var/mail/localhost.localdomain/user1/new/1644873104.M834089P4463.mail.my-domain.com,S=1001,W=1026
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mail.my-domain.com
by mail.my-domain.com with LMTP
id eF+mMZDFCmJvEQAAUIhAew
(envelope-from <[email protected]>)
for <[email protected]>; Mon, 14 Feb 2022 21:11:44 +0000
Received: from localhost (localhost [127.0.0.1])
by mail.my-domain.com (Postfix) with ESMTP id C9B70342CE9
for <[email protected]>; Mon, 14 Feb 2022 21:11:44 +0000 (UTC)
X-Virus-Scanned: Yes
X-Spam-Flag: NO
X-Spam-Score: 0.998
X-Spam-Level:
X-Spam-Status: No, score=0.998 tagged_above=-5 required=2
tests=[HEADER_FROM_DIFFERENT_DOMAINS=1, NO_RECEIVED=-0.001,
NO_RELAYS=-0.001] autolearn=no autolearn_force=no
From: Spambot <[email protected]>
To: Existing Local User <[email protected]>
Date: Sat, 22 May 2010 07:43:25 -0400
Subject: Test Message sieve-spam-folder.txt
Message-Id: <[email protected]>
This is a test mail.
-------------------------------------------------------------------------------------
Debug: E-Mail content: /var/mail/localhost.localdomain/user1/new/1644873104.M66125P4463.mail.my-domain.com,S=1057,W=1082
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mail.my-domain.com
by mail.my-domain.com with LMTP
id 6LzeA5DFCmJvEQAAUIhAew
(envelope-from <[email protected]>)
for <[email protected]>; Mon, 14 Feb 2022 21:11:44 +0000
Received: from localhost (localhost [127.0.0.1])
by mail.my-domain.com (Postfix) with ESMTP id 0D242342CE9
for <[email protected]>; Mon, 14 Feb 2022 21:11:44 +0000 (UTC)
X-Virus-Scanned: Yes
X-Spam-Flag: NO
X-Spam-Score: 1.798
X-Spam-Level: *
X-Spam-Status: No, score=1.798 tagged_above=-5 required=2
tests=[DKIM_ADSP_NXDOMAIN=0.8, HEADER_FROM_DIFFERENT_DOMAINS=1,
NO_RECEIVED=-0.001, NO_RELAYS=-0.001] autolearn=no autolearn_force=no
From: Docker Mail Server <[email protected]>
To: Existing Local User <[email protected]>
Date: Sat, 22 May 2010 07:43:25 -0400
Subject: Test Message existing-catchall-local.txt
Message-Id: <[email protected]>
This is a test mail.
-------------------------------------------------------------------------------------
Debug: E-Mail content: /var/mail/localhost.localdomain/user1/new/1644873099.M780602P4463.mail.my-domain.com,S=1060,W=1085
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mail.my-domain.com
by mail.my-domain.com with LMTP
id sL52LovFCmJvEQAAUIhAew
(envelope-from <[email protected]>)
for <[email protected]>; Mon, 14 Feb 2022 21:11:39 +0000
Received: from localhost (localhost [127.0.0.1])
by mail.my-domain.com (Postfix) with ESMTP id BBEB334311C
for <[email protected]>; Mon, 14 Feb 2022 21:11:39 +0000 (UTC)
X-Virus-Scanned: Yes
X-Spam-Flag: NO
X-Spam-Score: 1.798
X-Spam-Level: *
X-Spam-Status: No, score=1.798 tagged_above=-5 required=2
tests=[DKIM_ADSP_NXDOMAIN=0.8, HEADER_FROM_DIFFERENT_DOMAINS=1,
NO_RECEIVED=-0.001, NO_RELAYS=-0.001] autolearn=no autolearn_force=no
From: Docker Mail Server <[email protected]>
To: Existing Local User <[email protected]>
Date: Sat, 22 May 2010 07:43:25 -0400
Subject: Test Message existing-alias-external.txt
Message-Id: <[email protected]>
This is a test mail.
-------------------------------------------------------------------------------------
Debug: E-Mail content: /var/mail/localhost.localdomain/user1/new/1644873103.M819960P4520.mail.my-domain.com,S=1065,W=1090
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mail.my-domain.com
by mail.my-domain.com with LMTP
id gC3CMI/FCmKoEQAAUIhAew
(envelope-from <[email protected]>)
for <[email protected]>; Mon, 14 Feb 2022 21:11:43 +0000
Received: from localhost (localhost [127.0.0.1])
by mail.my-domain.com (Postfix) with ESMTP id C5300342CF1
for <[email protected]>; Mon, 14 Feb 2022 21:11:43 +0000 (UTC)
X-Virus-Scanned: Yes
X-Spam-Flag: NO
X-Spam-Score: 1.798
X-Spam-Level: *
X-Spam-Status: No, score=1.798 tagged_above=-5 required=2
tests=[DKIM_ADSP_NXDOMAIN=0.8, HEADER_FROM_DIFFERENT_DOMAINS=1,
NO_RECEIVED=-0.001, NO_RELAYS=-0.001] autolearn=no autolearn_force=no
From: Docker Mail Server <[email protected]>
To: Existing Local User <[email protected]>
Date: Sat, 22 May 2010 07:43:25 -0400
Subject: Test Message existing-regexp-alias-local.txt
Message-Id: <[email protected]>
This is a test mail.
-------------------------------------------------------------------------------------
Debug: E-Mail content: /var/mail/localhost.localdomain/user1/.INBOX.spam/new/1644873104.M850713P4463.mail.my-domain.com,S=1001,W=1026
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mail.my-domain.com
by mail.my-domain.com with LMTP
id eF+mMZDFCmJvEQAAUIhAew
(envelope-from <[email protected]>)
for <[email protected]>; Mon, 14 Feb 2022 21:11:44 +0000
Received: from localhost (localhost [127.0.0.1])
by mail.my-domain.com (Postfix) with ESMTP id C9B70342CE9
for <[email protected]>; Mon, 14 Feb 2022 21:11:44 +0000 (UTC)
X-Virus-Scanned: Yes
X-Spam-Flag: NO
X-Spam-Score: 0.998
X-Spam-Level:
X-Spam-Status: No, score=0.998 tagged_above=-5 required=2
tests=[HEADER_FROM_DIFFERENT_DOMAINS=1, NO_RECEIVED=-0.001,
NO_RELAYS=-0.001] autolearn=no autolearn_force=no
From: Spambot <[email protected]>
To: Existing Local User <[email protected]>
Date: Sat, 22 May 2010 07:43:25 -0400
Subject: Test Message sieve-spam-folder.txt
Message-Id: <[email protected]>
This is a test mail.
-------------------------------------------------------------------------------------
Debug: E-Mail content: /var/mail/localhost.localdomain/user1/.Junk/new/1644873099.M886028P4463.mail.my-domain.com,S=1261,W=1289
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mail.my-domain.com
by mail.my-domain.com with LMTP
id iHLBNIvFCmJvEQAAUIhAew
(envelope-from <[email protected]>)
for <[email protected]>; Mon, 14 Feb 2022 21:11:39 +0000
Received: from localhost (localhost [127.0.0.1])
by mail.my-domain.com (Postfix) with ESMTP id D564A34311C
for <[email protected]>; Mon, 14 Feb 2022 21:11:39 +0000 (UTC)
X-Quarantine-ID: <n09A3Ls7KeRS>
X-Virus-Scanned: Yes
X-Spam-Flag: YES
X-Spam-Score: 1001.799
X-Spam-Level: ****************************************************************
X-Spam-Status: Yes, score=1001.799 tagged_above=-5 required=2
tests=[DKIM_ADSP_NXDOMAIN=0.8, GTUBE=1000,
HEADER_FROM_DIFFERENT_DOMAINS=1, NO_RECEIVED=-0.001, NO_RELAYS=-0.001,
TVD_SPACE_RATIO=0.001] autolearn=no autolearn_force=no
From: Docker Mail Server <[email protected]>
To: Existing Local User <[email protected]>
Date: Sat, 22 May 2010 07:43:25 -0400
Subject: SPAM: Test Message amavis-spam.txt
Message-Id: <[email protected]>
This is a test mail.
XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X
-------------------------------------------------------------------------------------Had a quick look in KDiff3, but nothing that caught my eye. Using |
|
I just noticed we would actually need to set EDIT: Woah, nevermind! It was 12K to begin with!!! :D It seems as if I found the cause :D |
I can't follow you. Can you explain it again with more details to follow along? |
Damn it, I thought this was already done (but haven't checked it). That's why I was curious, why the test is failing now.
Same here 😄 |
|
Alright, here is the longer explanation: we were looking for the issue in the wrong place. This PR adjusts the default value of Hence, one test failed randomly: But then I noticed that we need to set I'd keep the original behavior ( |
|
Documentation preview for this PR is ready! 🎉 Built with commit: ade42a3 |
|
I adjusted the 4 lines in |
| -e ENABLE_SPAMASSASSIN=1 \ | ||
| -e SPAMASSASSIN_SPAM_TO_INBOX=0 \ | ||
| -e ENABLE_SRS=1 \ | ||
| -e ENABLE_UPDATE_CHECK=0 \ |
There was a problem hiding this comment.
I don't think that is necessary, because there will never be a new version, hence no e-mail notification about an update. But it doesn't hurt, so leave it as it is if you like.
There was a problem hiding this comment.
This was added by @craue, and you're right, probably not necessary. I will note this and remove this with an upcoming PR of mine. Remind me if I forget about it :)
According to
docker-mailserver/mailserver.env
Line 252 in 0c31f71
1. I switched the order of both lines to have the default on top which seems to be the usual order. Let me know if further changes are needed.