mailcow / mailcow-dockerized

mailcow: dockerized - ๐Ÿฎ + ๐Ÿ‹ = ๐Ÿ’•
https://mailcow.email
GNU General Public License v3.0
9.09k stars 1.19k forks source link

Tagged alias mails won't get send to subfolder anymore #2487

Closed skupfer closed 4 years ago

skupfer commented 5 years ago

Let us assume I create a direct alias address for my mailbox main@domain.tld which will be alias@domain.tld. This alias is attached to the my primary mailbox through the mailbox configuration panel.

If I send an email to alias@domain.tld I receive it in my main@domain.tld mailbox. The configuration for this mailbox says "Set handling for tagged mail: In subfolder".

This was working for quite some time and stopped working around half a year ago I think. Now the mails received via alias+tag (i.e. alias+tag@domain.tld) get stored normally in the inbox instead of being moved to the subfolder (which already exist in most cases because it was working before).

On a side note. A year ago I was reporting it wasn't working the other way around (to subject wasn't working and instead they were moved to a subfolder #851

Unfortunately I can't remember which update changed this behavior.

Best Regards Kupfer

andryyy commented 5 years ago

I think we should drop the subject rewrite. The mails should be moved to to a subfldler though. Please set it to subfolder and provide logs of Dovecot if it fails to move.

skupfer commented 5 years ago

It is set to subfolder, that's the point of the issue this time, not like the last one.

Log from the admin log panel

3/30/2019, 3:05:02 PM | info | imap(main@domain.tld)<7927><GrqhClCFZJisFgH4>: Logged out in=4735 out=40363 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
-- | -- | --
3/30/2019, 3:04:55 PM | info | indexer-worker(main@domain.tld)<30421><oKa7L4Z3n1z5HwAAjgZzUw:6PnuEId3n1zVdgAAjgZzUw>: Indexed 1 messages in INBOX (UIDs 212..212)
3/30/2019, 3:04:55 PM | info | lmtp(8185): Disconnect from IPv6-Address Client has quit the connection (state=READY)
3/30/2019, 3:04:55 PM | info | lmtp(main@domain.tld)<8185><oKa7L4Z3n1z5HwAAjgZzUw>: sieve: msgid=<q-UjePadSAi0SQ7ILnG9fg@ismtpd0052p1mdw1.sendgrid.net>: stored mail into mailbox 'INBOX'
3/30/2019, 3:04:54 PM | info | lmtp(8185): Connect from IPv6-Address

or

3/27/2019, 5:42:47 PM | info | imap(main@domain.tld)<1664><ar75HRaF0IWsFgH4>: Logged out in=435 out=8536 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
-- | -- | --
3/27/2019, 5:42:44 PM | info | indexer-worker(main@domain.tld)<1673><DDdVLgOom1yEBgAAjgZzUw:T/laOwOom1yJBgAAjgZzUw>: Indexed 1 messages in INBOX (UIDs 211..211)
3/27/2019, 5:42:43 PM | info | lmtp(1668): Disconnect from IPv6-Address Client has quit the connection (state=READY)
3/27/2019, 5:42:43 PM | info | lmtp(main@domain.tld)<1668><DDdVLgOom1yEBgAAjgZzUw>: sieve: msgid=<01000169c0080a7f-410c0cbf-67b3-4f38-a4be-a98458150c0f-000000@email.amazonses.com>: stored mail into mailbox 'INBOX'
3/27/2019, 5:42:43 PM | info | lmtp(1668): Connect from IPv6-Address
3/27/2019, 5:42:26 PM | info | imap(main@domain.tld)<1352><Zt4G3BWFmuSsFgH4>: Logged out in=3574 out=32275 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
andryyy commented 5 years ago

Is there an X-Moo header in the mail?

Rspamd logs from when this happens?

------ Originalnachricht ------ Von: "skupfer" notifications@github.com An: "mailcow/mailcow-dockerized" mailcow-dockerized@noreply.github.com Cc: "Andrรฉ Peters" andre.peters@debinux.de; "Comment" comment@noreply.github.com Gesendet: 01.04.2019 09:32:21 Betreff: Re: [mailcow/mailcow-dockerized] Tagged alias mails won't get send to subfolder anymore (#2487)

It is set to subfolder, that's the point of the issue this time, not like the last one.

Log from the admin log panel

3/30/2019, 3:05:02 PM info imap(main@domain.tld)<7927>: Logged out in=4735 out=40363 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
3/30/2019, 3:04:55 PM info indexer-worker(main@domain.tld)<30421>: Indexed 1 messages in INBOX (UIDs 212..212)
3/30/2019, 3:04:55 PM info lmtp(8185): Disconnect from IPv6-Address Client has quit the connection (state=READY)
3/30/2019, 3:04:55 PM info lmtp(main@domain.tld)<8185>: sieve: msgid=q-UjePadSAi0SQ7ILnG9fg@ismtpd0052p1mdw1.sendgrid.net: stored mail into mailbox 'INBOX'
3/30/2019, 3:04:54 PM info lmtp(8185): Connect from IPv6-Address

or

3/27/2019, 5:42:47 PM info imap(main@domain.tld)<1664>: Logged out in=435 out=8536 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
3/27/2019, 5:42:44 PM info indexer-worker(main@domain.tld)<1673><DDdVLgOom1yEBgAAjgZzUw:T/laOwOom1yJBgAAjgZzUw>: Indexed 1 messages in INBOX (UIDs 211..211)
3/27/2019, 5:42:43 PM info lmtp(1668): Disconnect from IPv6-Address Client has quit the connection (state=READY)
3/27/2019, 5:42:43 PM info lmtp(main@domain.tld)<1668>: sieve: msgid=01000169c0080a7f-410c0cbf-67b3-4f38-a4be-a98458150c0f-000000@email.amazonses.com: stored mail into mailbox 'INBOX'
3/27/2019, 5:42:43 PM info lmtp(1668): Connect from IPv6-Address
3/27/2019, 5:42:26 PM info imap(main@domain.tld)<1352>: Logged out in=3574 out=32275 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0

โ€” You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mailcow/mailcow-dockerized/issues/2487#issuecomment-478467999, or mute the thread https://github.com/notifications/unsubscribe-auth/AC1dFpSxtdYCbQDCBBxAuKnT4hte7Kiiks5vcbYFgaJpZM4cU_YW.

skupfer commented 5 years ago

I just sent two mails from another mailcow mailbox and the logs/behavior is the same. So there shouldn't be the mentioned header, right?

Mail Local

Return-Path: <anothermailbox@domain.tld>
Delivered-To: main+tag@domain.tld
Received: from mail.domain.tld ([IPaddress7])
    by mail.domain.tld with LMTP
    id c0oYNMu+oVzVRwAAjgZzUw
    (envelope-from <anothermailbox@domain.tld>)
    for <main+tag@domain.tld>; Mon, 01 Apr 2019 09:33:31 +0200
Received: from dcf5f1167e79 (mailcowdockerized_sogo-mailcow_1.mailcowdockerized_mailcow-network [IPaddress248])
    (Authenticated sender: anothermailbox@domain.tld)
    by mail.domain.tld (Postcow) with ESMTPA id 7452C15A970
    for <alias+tag@domain.tld>; Mon,  1 Apr 2019 09:33:31 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anotherdomain.tld;
    s=dkim; t=1554104011; h=from:from:sender:reply-to:subject:subject:date:date:
     message-id:message-id:to:to:cc:mime-version:mime-version:
     content-type:content-type:content-transfer-encoding:in-reply-to:
     references; bh=aT55zTWU2z3UmvjiRnWMB3FNxmkML1bCAtlszUw7MEg=;
    b=HiK2EbOCr9fUMnkhCh1a9FjPndqYVRpcKCfqBhpCP7ZbMClZ7Oxo8Y4iNO/LdbisHHfolR
    vR4GiIw+IR7KSrjViJjDOGIWYWlGMjf9HxCDl2ZEW9YwJ8NghMvna40NX4nFO60i5MCuiZ
    JVAyWXgzWbhvcpT4agzfKPuHyTE7XKggBUXZS9FS38LVI71O1v+n78BpWPyRDiGuLo4TsD
    3cXTEnvuR3/PJPeSeTL+N2P5mUF1AMfBGYhb9Z4ub3KR4TqVURD9hQTqmN8UmRe9igDwb8
    QVnfNeUaM70tWHCqbxGjYHv2JBJn1QMNWA7rqAW50IO9SXjNRZ8nTHx6sKmSpQ==
Content-Type: multipart/alternative; boundary="----=_=-_OpenGroupware_org_NGMime-25577-1554104011.236756-0------"
To: alias+tag@domain.tld
User-Agent: SOGoMail 4.0.5
MIME-Version: 1.0
Date: Mon, 01 Apr 2019 09:33:31 +0200
Subject: test 2
Message-ID: <63e9-5ca1bf00-1-71730880@139829820>
X-Forward: IP-Address
From: "Anothermailbox" <anothermailbox@domain.tld>
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=anotherdomain.tld;
    s=dkim; t=1554104011; h=from:from:sender:reply-to:subject:subject:date:date:
     message-id:message-id:to:to:cc:mime-version:mime-version:
     content-type:content-type:content-transfer-encoding:in-reply-to:
     references; bh=aT55zTWU2z3UmvjiRnWMB3FNxmkML1bCAtlszUw7MEg=;
    b=uBU7/0NOMJdOyD7W/lYHl1fxzgZwEh2A7c/FVCChyorSmZ84/9vBIzoWdBSqfnP8VaY3Zg
    R5l82xweJebnOBnVU+FxTf6isf97MhOPO9aIrGHcVoWg6RCST3DwZAMeLW9T7u66C76Nr7
    qyD7G6kHv6yIF5nfmjWDnQfwh05QuoGhyTpaH+z+YP+717cpxce0H/StkiC5iuiYzMvq+E
    c7uYWrwC3zK8XLkevp1ekThoAVus9l7VE5tFog3jUl5rSOuzFJZda8kFDhvQ8cUcczeqzb
    nkR/E0rETYKpbDCd/3Purlhpa6z9x84Xd/9TjbKMAn09vZbplZsaBRDylsbZ0g==
ARC-Seal: i=1; s=dkim; d=anotherdomain.tld; t=1554104011; a=rsa-sha256;
    cv=none;
    b=YIw+dZ3eoOkN+jK4TgPrCi/DYwbeNbU2mBPxkCYV4OpZ2S26RyWSGb4zvu8UsRCcEpowx0
    7h7Zurl19Mc+vybYqzy/qaO6PL94BdHQX9+tReWJRwMW20vpg/GqutU9Gr7lYG4wa9kMaz
    temR3tkFdJFw3iOcM02+P3/8wosZQNr7ut29A+dr0YywzJUzDK2lwQybQ5WH99JlVJDrYi
    fTcPKrhPQ0cq8/4tghTZeH7e13LiGEi1WicFnTu6QGKpAKGzJDz44PDcPOZ2rSQrMj/k/8
    hMg78afEgtJd3ozq4ezYDWY8Hpg1GQGARfgW7YLeLuQZT6xbqqEgXhk6b0q0cg==
ARC-Authentication-Results: i=1;
    mail.domain.tld;
    auth=pass smtp.auth=anothermailbox@domain.tld smtp.mailfrom=anothermailbox@domain.tld

------=_=-_OpenGroupware_org_NGMime-25577-1554104011.236756-0------
Content-Type: text/plain; charset=utf-8

------=_=-_OpenGroupware_org_NGMime-25577-1554104011.236756-0------
Content-Type: text/html; charset=utf-8
Content-Length: 13

<html></html>

------=_=-_OpenGroupware_org_NGMime-25577-1554104011.236756-0--------

RSPAMD Local Mail

IP address  ipaddress
Subject test 2
Symbols MAILCOW_AUTH (-20)
MID_RHS_NOT_FQDN (0.5)
MIME_GOOD (-0.1) [multipart/alternative,text/plain]
FROM_EQ_ENVFROM (0)
RCVD_COUNT_ZERO (0) [0]
TO_MATCH_ENVRCPT_ALL (0)
RCPT_COUNT_ONE (0) [1]
TO_DN_NONE (0)
FROM_HAS_DN (0)
ARC_NA (0)
DKIM_SIGNED (0)
MIME_TRACE (0) [0:+,1:+]
RCVD_TLS_ALL (0)
TAGGED_RCPT (0) [tag]
RCPT_MAILCOW_DOMAIN (0) [domain.tld]
ARC_SIGNED (0) [i=1]
DYN_RL_CHECK (0)
Msg size    728 B
Scan time   0.032 / 0.013
ID  63e9-5ca1bf00-1-71730880@139829820

Mail 3/30/2019

Return-Path: <bounces+7446361-3df4-alias+tag=domain.tld@em8192.cobinhood.com>
Delivered-To: main+tag@domain.tld
Received: from mail.domain.tld ([IPv6address])
    by mail.domain.tld with LMTP
    id oKa7L4Z3n1z5HwAAjgZzUw
    (envelope-from <bounces+7446361-3df4-alias+tag=domain.tld@em8192.cobinhood.com>)
    for <main+tag@domain.tld>; Sat, 30 Mar 2019 15:04:54 +0100
Received: from o1.sendgrid.cobinhood.com (o1.sendgrid.cobinhood.com [IPaddress])
    (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
    (No client certificate requested)
    by mail.domain.tld (Postcow) with ESMTPS id AF43A15A95A
    for <alias+tag@domain.tld>; Sat, 30 Mar 2019 15:04:40 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=cobinhood.com; 
    h=content-type:from:mime-version:reply-to:subject:to:list-unsubscribe; 
    s=s1; bh=EvWM6uO4Cs0zRp7Dmaf63BEbwxg=; b=gqq6qGu5+TujTOUoNoL7sG5
    w+fZ8Dtlg/BxUUfXGZtwH+/iyMdQQTEfo9B9EVv5gcxJNzm0bTbY9+GOcWYihW6+
    DPQF6yWPl1XUI+DVhdfuIPUmWPUzro4T8N6VBI/wtnZa0yot38EC3yv0GYzllJf8
    pVQhsUFNLoonymlCB7DQ=
Content-Type: multipart/alternative; boundary=0426a7bfaa94e689dc83077bb917a34479c636f754820dabea1a157a10f5
Date: Sat, 30 Mar 2019 14:04:28 +0000 (UTC)
From: "COBINHOOD" <support@cobinhood.com>
Mime-Version: 1.0
Reply-To: support@cobinhood.com
Subject: A subject
To: alias+tag@domain.tld
Message-ID: <q-UjePadSAi0SQ7ILnG9fg@ismtpd0052p1mdw1.sendgrid.net>
List-Unsubscribe: <unsubscribe>
X-SG-EID: R102MRGnf/0CCAp/pYPga2CeTJoXnMNvCamDfwig4IololurHOLXMxAmkBJDBO33AXZu5oqLJcJxp4
 +ZS07AnfF1eg1Ft3ear9CRdQu5unSj+agvaIaMrJK/XKgoH360QEQblrgyGgSGzf5ZSebbCq8z/eKJ
 KGRuVjvSJu1ffXbvC78212yXm+lJk8OzLz+nZgrmkDbhsGkZ13O/TIOxXBNhJddOtBqYk5yUD8AsRT
 I=
X-SG-ID: Z2FxZazunBjVeNuNdzHDqrF8mxuCpi0krmont6YQrP33xPPAYN8z70Z0NYQHfvzDYjeIUa5mlY3ouw
 PvTCrxQpl/kDDFkp3U7HAAAxWIw1D4nefU+Yh1BQH0qekw0tMk3JjquozMFUAf99hrm90u3zkKwqu8
 WHdTCufN2GVstRryidljCfccRuk9NxprvSYu
Authentication-Results: mail.domain.tld;
    dkim=pass header.d=cobinhood.com header.s=s1 header.b=gqq6qGu5;
    dmarc=pass (policy=reject) header.from=cobinhood.com;
    spf=pass (mail.domain.tld: domain of bounces@em8192.cobinhood.com designates IPaddress as permitted sender) smtp.mailfrom=bounces@em8192.cobinhood.com
X-Spamd-Result: default: False [2.10 / 15.00];
     HAS_REPLYTO(0.00)[support@cobinhood.com];
     R_SPF_ALLOW(-0.20)[+ip4:IPaddress];
     MV_CASE(0.50)[];
     TO_DN_NONE(0.00)[];
     REPLYTO_ADDR_EQ_FROM(0.00)[];
     DKIM_TRACE(0.00)[cobinhood.com:+];
     MX_GOOD(-0.01)[mx.sendgrid.net];
     DMARC_POLICY_ALLOW(-0.50)[cobinhood.com,reject];
     SUBJECT_ENDS_EXCLAIM(0.00)[];
     FORGED_SENDER(0.30)[support@cobinhood.com,bounces@em8192.cobinhood.com];
     RCVD_COUNT_ZERO(0.00)[0];
     RCPT_MAILCOW_DOMAIN(0.00)[domain.tld];
     MIME_TRACE(0.00)[0:+,1:+];
     IP_SCORE(0.27)[ip: (0.57), ipnet: 168.245.0.0/18(0.36), asn: 11377(0.60), country: US(-0.19)];
     ASN(0.00)[asn:11377, ipnet:168.245.0.0/18, country:US];
     TAGGED_FROM(0.00)[7446361-3df4-crypto,cobinhood=domain.tld];
     FROM_NEQ_ENVFROM(0.00)[support@cobinhood.com,bounces@em8192.cobinhood.com];
     PHISHING(0.75)[eux.tech->cobinhood.com];
     ARC_NA(0.00)[];
     R_DKIM_ALLOW(-0.20)[cobinhood.com:s=s1];
     PHISH_EMOTION(1.00)[];
     FROM_HAS_DN(0.00)[];
     TO_MATCH_ENVRCPT_ALL(0.00)[];
     TAGGED_RCPT(0.00)[cobinhood];
     MIME_GOOD(-0.10)[multipart/alternative,text/plain];
     HAS_LIST_UNSUB(-0.01)[];
     RCPT_COUNT_ONE(0.00)[1];
     MANY_INVISIBLE_PARTS(0.30)[4];
     RCVD_IN_DNSWL_NONE(0.00)[167.39.245.168.list.dnswl.org : 127.0.15.0];
     RCVD_TLS_ALL(0.00)[]
X-Rspamd-Queue-Id: AF43A15A95A

--0426a7bfaa94e689dc83077bb917a34479c636f754820dabea1a157a10f5
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8
Mime-Version: 1.0

Text

--0426a7bfaa94e689dc83077bb917a34479c636f754820dabea1a157a10f5
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8
Mime-Version: 1.0

<html></html>

--0426a7bfaa94e689dc83077bb917a34479c636f754820dabea1a157a10f5--

RSPAMD 3/30/2019

IP address  IPaddress
Subject Subject
Symbols PHISH_EMOTION (1)
PHISHING (0.752822) [eux.tech->cobinhood.com]
MV_CASE (0.5)
DMARC_POLICY_ALLOW (-0.5) [cobinhood.com,reject]
FORGED_SENDER (0.3) [support@cobinhood.com,bounces@em8192.cobinhood.com]
MANY_INVISIBLE_PARTS (0.3) [4]
IP_SCORE (0.268153) [ip: (0.57), ipnet: ipnet/18(0.36), asn: 11377(0.60), country: US(-0.19)]
R_DKIM_ALLOW (-0.2) [cobinhood.com:s=s1]
R_SPF_ALLOW (-0.2) [+ip4:ipaddress]
MIME_GOOD (-0.1) [multipart/alternative,text/plain]
HAS_LIST_UNSUB (-0.01)
MX_GOOD (-0.01) [mx.sendgrid.net]
ASN (0) [asn:11377, ipnet:ipaddess/18, country:US]
RCVD_IN_DNSWL_NONE (0) [167.39.245.168.list.dnswl.org : 127.0.15.0]
TO_MATCH_ENVRCPT_ALL (0)
RCPT_COUNT_ONE (0) [1]
FROM_HAS_DN (0)
TAGGED_FROM (0) [7446361-3df4-alias,tag=domain.tld]
ARC_NA (0)
RCVD_COUNT_ZERO (0) [0]
TO_DN_NONE (0)
REPLYTO_ADDR_EQ_FROM (0)
SUBJECT_ENDS_EXCLAIM (0)
MIME_TRACE (0) [0:+,1:+]
HAS_REPLYTO (0) [support@cobinhood.com]
RCVD_TLS_ALL (0)
TAGGED_RCPT (0) [cobinhood]
RCPT_MAILCOW_DOMAIN (0) [domain.tld]
DKIM_TRACE (0) [cobinhood.com:+]
FROM_NEQ_ENVFROM (0) [support@cobinhood.com,bounces@em8192.cobinhood.com]
Msg size    65.2 KiB
Scan time   9.364 / 0.055
ID  q-UjePadSAi0SQ7ILnG9fg@ismtpd0052p1mdw1.sendgrid.net
andryyy commented 5 years ago

Rspamd logs, not headers.

Please set logging to info instead of silent in data/conf/rspamd/override.d/logging.inc. Restart Rspamd, send a mail (again) and post the container logs, please. :)

skupfer commented 5 years ago

Here is RSPAMD

rspamd-mailcow_1     | 2019-04-01 10:20:51 #14(fuzzy) <rznbhc>; map; rspamd_map_read_cached: http://nginx:8081/forwardinghosts.php: read map data cached 32 bytes
rspamd-mailcow_1     | 2019-04-01 10:20:51 #14(fuzzy) <rznbhc>; map; rspamd_radix_fin: read radix trie of 1 elements: ents=1 dup=0 tbm=0 lc=1 mem=1k free=0 waste=0
rspamd-mailcow_1     | 2019-04-01 10:20:52 #12(normal) <rznbhc>; map; rspamd_map_read_cached: http://nginx:8081/forwardinghosts.php: read map data cached 32 bytes
rspamd-mailcow_1     | 2019-04-01 10:20:52 #12(normal) <rznbhc>; map; rspamd_radix_fin: read radix trie of 1 elements: ents=1 dup=0 tbm=0 lc=1 mem=1k free=0 waste=0
rspamd-mailcow_1     | 2019-04-01 10:20:52 #13(fuzzy) <rznbhc>; map; rspamd_map_read_cached: http://nginx:8081/forwardinghosts.php: read map data cached 32 bytes
rspamd-mailcow_1     | 2019-04-01 10:20:52 #13(fuzzy) <rznbhc>; map; rspamd_radix_fin: read radix trie of 1 elements: ents=1 dup=0 tbm=0 lc=1 mem=1k free=0 waste=0
rspamd-mailcow_1     | 2019-04-01 10:20:52 #12(normal) <oxhd99>; map; rspamd_map_read_cached: http://nginx:8081/settings.php: read map data cached 1024 bytes
rspamd-mailcow_1     | 2019-04-01 10:20:52 #12(normal) <aatq1u>; lua; settings.lua:659: loaded 3 elements of settings
rspamd-mailcow_1     | 2019-04-01 10:20:52 #13(fuzzy) <oxhd99>; map; rspamd_map_read_cached: http://nginx:8081/settings.php: read map data cached 1024 bytes
rspamd-mailcow_1     | 2019-04-01 10:20:52 #13(fuzzy) <aatq1u>; lua; settings.lua:659: loaded 3 elements of settings
rspamd-mailcow_1     | 2019-04-01 10:20:53 #14(fuzzy) <oxhd99>; map; rspamd_map_read_cached: http://nginx:8081/settings.php: read map data cached 1024 bytes
rspamd-mailcow_1     | 2019-04-01 10:20:53 #14(fuzzy) <aatq1u>; lua; settings.lua:659: loaded 3 elements of settings
rspamd-mailcow_1     | 2019-04-01 10:20:53 #12(normal) rspamd_worker_hyperscan_ready: loading hyperscan expressions after receiving compilation notice: new db
rspamd-mailcow_1     | 2019-04-01 10:20:53 #12(normal) <0175c1>; re_cache; rspamd_re_cache_load_hyperscan: hyperscan database of 180 regexps has been loaded
rspamd-mailcow_1     | 2019-04-01 10:20:53 #10(rspamd_proxy) <rznbhc>; map; rspamd_map_read_cached: http://nginx:8081/forwardinghosts.php: read map data cached 32 bytes
rspamd-mailcow_1     | 2019-04-01 10:20:53 #10(rspamd_proxy) <rznbhc>; map; rspamd_radix_fin: read radix trie of 1 elements: ents=1 dup=0 tbm=0 lc=1 mem=1k free=0 waste=0
rspamd-mailcow_1     | 2019-04-01 10:20:54 #10(rspamd_proxy) <oxhd99>; map; rspamd_map_read_cached: http://nginx:8081/settings.php: read map data cached 1024 bytes
rspamd-mailcow_1     | 2019-04-01 10:20:54 #10(rspamd_proxy) <aatq1u>; lua; settings.lua:659: loaded 3 elements of settings
rspamd-mailcow_1     | 2019-04-01 10:21:22 #11(controller) <8rmo3c>; map; http_map_finish: data is not modified for server maps.rspamd.com, next check at Mon, 01 Apr 2019 12:21:22 GMT
rspamd-mailcow_1     | 2019-04-01 10:21:26 #11(controller) <k8f914>; map; http_map_finish: data is not modified for server maps.rspamd.com, next check at Mon, 01 Apr 2019 12:21:26 GMT
rspamd-mailcow_1     | 2019-04-01 10:21:27 #11(controller) <f61zu5>; map; http_map_finish: data is not modified for server maps.rspamd.com, next check at Mon, 01 Apr 2019 12:21:27 GMT
rspamd-mailcow_1     | 2019-04-01 10:21:29 #11(controller) <hntukx>; map; http_map_finish: data is not modified for server maps.rspamd.com, next check at Mon, 01 Apr 2019 12:21:29 GMT
rspamd-mailcow_1     | 2019-04-01 10:21:29 #11(controller) <fdp86m>; map; http_map_finish: data is not modified for server maps.rspamd.com, next check at Mon, 01 Apr 2019 12:21:29 GMT
rspamd-mailcow_1     | 2019-04-01 10:21:33 #11(controller) <rznbhc>; map; http_map_finish: http://nginx:8081/forwardinghosts.php(ipaddress.13:8081): read map data 32 bytes, next check at Mon, 01 Apr 2019 08:22:03 GMT
rspamd-mailcow_1     | 2019-04-01 10:21:33 #11(controller) <rznbhc>; map; rspamd_map_save_http_cached_file: saved data from http://nginx:8081/forwardinghosts.php in /var/lib/rspamd/e48ac0193da10600fac6a17bb7146ba2421fee67.map, 16 bytes
rspamd-mailcow_1     | 2019-04-01 10:21:33 #11(controller) <rznbhc>; map; rspamd_radix_fin: read radix trie of 1 elements: ents=1 dup=0 tbm=0 lc=1 mem=1k free=0 waste=0
rspamd-mailcow_1     | 2019-04-01 10:21:33 #14(fuzzy) <rznbhc>; map; rspamd_map_read_cached: http://nginx:8081/forwardinghosts.php: read map data cached 32 bytes
rspamd-mailcow_1     | 2019-04-01 10:21:33 #14(fuzzy) <rznbhc>; map; rspamd_radix_fin: read radix trie of 1 elements: ents=1 dup=0 tbm=0 lc=1 mem=1k free=0 waste=0
rspamd-mailcow_1     | 2019-04-01 10:21:34 #12(normal) <rznbhc>; map; rspamd_map_read_cached: http://nginx:8081/forwardinghosts.php: read map data cached 32 bytes
rspamd-mailcow_1     | 2019-04-01 10:21:34 #12(normal) <rznbhc>; map; rspamd_radix_fin: read radix trie of 1 elements: ents=1 dup=0 tbm=0 lc=1 mem=1k free=0 waste=0
rspamd-mailcow_1     | 2019-04-01 10:21:37 #10(rspamd_proxy) <rznbhc>; map; rspamd_map_read_cached: http://nginx:8081/forwardinghosts.php: read map data cached 32 bytes
rspamd-mailcow_1     | 2019-04-01 10:21:37 #10(rspamd_proxy) <rznbhc>; map; rspamd_radix_fin: read radix trie of 1 elements: ents=1 dup=0 tbm=0 lc=1 mem=1k free=0 waste=0
rspamd-mailcow_1     | 2019-04-01 10:21:38 #13(fuzzy) <rznbhc>; map; rspamd_map_read_cached: http://nginx:8081/forwardinghosts.php: read map data cached 32 bytes
rspamd-mailcow_1     | 2019-04-01 10:21:38 #13(fuzzy) <rznbhc>; map; rspamd_radix_fin: read radix trie of 1 elements: ents=1 dup=0 tbm=0 lc=1 mem=1k free=0 waste=0
rspamd-mailcow_1     | 2019-04-01 10:21:38 #11(controller) <9zc4wc>; map; http_map_finish: data is not modified for server maps.rspamd.com, next check at Mon, 01 Apr 2019 12:21:38 GMT
rspamd-mailcow_1     | 2019-04-01 10:21:39 #11(controller) <oxhd99>; map; http_map_finish: http://nginx:8081/settings.php([fd4d:6169:6c63:6f77::10]:8081): read map data 1024 bytes, next check at Mon, 01 Apr 2019 08:22:09 GMT
rspamd-mailcow_1     | 2019-04-01 10:21:39 #11(controller) <oxhd99>; map; rspamd_map_save_http_cached_file: saved data from http://nginx:8081/settings.php in /var/lib/rspamd/f0f1f1ff89a5a9c0c3050fcb9ad2426aeacf1fdf.map, 934 bytes
rspamd-mailcow_1     | 2019-04-01 10:21:39 #11(controller) <aatq1u>; lua; settings.lua:659: loaded 3 elements of settings
rspamd-mailcow_1     | 2019-04-01 10:21:40 #11(controller) <xa6qqy>; map; http_map_finish: data is not modified for server rspamd.com, next check at Mon, 01 Apr 2019 12:21:40 GMT
rspamd-mailcow_1     | 2019-04-01 10:21:40 #13(fuzzy) <oxhd99>; map; rspamd_map_read_cached: http://nginx:8081/settings.php: read map data cached 1024 bytes
rspamd-mailcow_1     | 2019-04-01 10:21:40 #13(fuzzy) <aatq1u>; lua; settings.lua:659: loaded 3 elements of settings
rspamd-mailcow_1     | 2019-04-01 10:21:41 #11(controller) <u9r7uu>; map; http_map_finish: data is not modified for server maps.rspamd.com, next check at Mon, 01 Apr 2019 12:21:41 GMT
rspamd-mailcow_1     | 2019-04-01 10:21:41 #12(normal) <oxhd99>; map; rspamd_map_read_cached: http://nginx:8081/settings.php: read map data cached 1024 bytes
rspamd-mailcow_1     | 2019-04-01 10:21:41 #12(normal) <aatq1u>; lua; settings.lua:659: loaded 3 elements of settings
rspamd-mailcow_1     | 2019-04-01 10:21:41 #11(controller) <omc75i>; map; http_map_finish: data is not modified for server maps.rspamd.com, next check at Mon, 01 Apr 2019 12:21:41 GMT
rspamd-mailcow_1     | 2019-04-01 10:21:42 #14(fuzzy) <oxhd99>; map; rspamd_map_read_cached: http://nginx:8081/settings.php: read map data cached 1024 bytes
rspamd-mailcow_1     | 2019-04-01 10:21:42 #14(fuzzy) <aatq1u>; lua; settings.lua:659: loaded 3 elements of settings
rspamd-mailcow_1     | 2019-04-01 10:21:43 #10(rspamd_proxy) <oxhd99>; map; rspamd_map_read_cached: http://nginx:8081/settings.php: read map data cached 1024 bytes
rspamd-mailcow_1     | 2019-04-01 10:21:43 #10(rspamd_proxy) <aatq1u>; lua; settings.lua:659: loaded 3 elements of settings
rspamd-mailcow_1     | 2019-04-01 10:21:44 #11(controller) <78wxos>; map; http_map_finish: data is not modified for server maps.rspamd.com, next check at Mon, 01 Apr 2019 12:21:44 GMT
rspamd-mailcow_1     | 2019-04-01 10:21:48 #11(controller) <rznbhc>; map; rspamd_map_cache_cb: cached data is now expired (gen mismatch 1 != 2) for http://nginx:8081/forwardinghosts.php
rspamd-mailcow_1     | 2019-04-01 10:21:48 #11(controller) <oxhd99>; map; rspamd_map_cache_cb: cached data is now expired (gen mismatch 1 != 2) for http://nginx:8081/settings.php
rspamd-mailcow_1     | 2019-04-01 10:21:50 #10(rspamd_proxy) <bd2ca3>; proxy; proxy_accept_socket: accepted milter connection from ipaddress.7 port 35878
rspamd-mailcow_1     | 2019-04-01 10:21:50 #10(rspamd_proxy) <bd2ca3>; milter; rspamd_milter_process_command: got connection from ipaddress.248:33030
rspamd-mailcow_1     | 2019-04-01 10:21:50 #12(normal) <cc89d2>; task; accept_socket: accepted connection from ipaddress.11 port 42556, task ptr: 00007F02F28D4B80
rspamd-mailcow_1     | 2019-04-01 10:21:50 #12(normal) <cc89d2>; task; rspamd_mime_part_get_cte: detected missing CTE for part as: 7bit
rspamd-mailcow_1     | 2019-04-01 10:21:50 #12(normal) <cc89d2>; task; rspamd_mime_part_get_cte: detected missing CTE for part as: 7bit
rspamd-mailcow_1     | 2019-04-01 10:21:50 #12(normal) <cc89d2>; task; rspamd_message_parse: loaded message; id: <75a9-5ca1ca00-3-5a01e080@117715617>; queue-id: <834B515A970>; size: 764; checksum: <2e8fe5864bf19ba1a8a33cde38e5c622>
rspamd-mailcow_1     | 2019-04-01 10:21:50 #12(normal) <aatq1u>; lua; lua_redis.lua:454: use default Redis settings for dyn_rl
rspamd-mailcow_1     | 2019-04-01 10:21:50 #12(normal) <aatq1u>; lua; rspamd.local.lua:135: dynamic ratelimit request for user anothermailbox@anotherdomain.tld (same server) returned invalid or empty data ("") or error ("nil") - trying dynamic ratelimit for domain...
rspamd-mailcow_1     | 2019-04-01 10:21:50 #12(normal) <aatq1u>; lua; rspamd.local.lua:139: dynamic ratelimit request for domain diskutiere.net returned invalid or empty data ("") or error ("nil")
rspamd-mailcow_1     | 2019-04-01 10:21:50 #12anothermailbox@anotherdomain.tld(normal) <cc89d2>; lua; settings.lua:358: check for settings
rspamd-mailcow_1     | 2019-04-01 10:21:51 #12(normal) <cc89d2>; task; spf_symbol_callback: skip SPF checks for local networks and authorized users
rspamd-mailcow_1     | 2019-04-01 10:21:51 #12(normal) <cc89d2>; task; dkim_symbol_callback: skip DKIM checks for local networks and authorized users
rspamd-mailcow_1     | 2019-04-01 10:21:51 #12(normal) <cc89d2>; lua; once_received.lua:95: Skipping once_received for authenticated user or local network
rspamd-mailcow_1     | 2019-04-01 10:21:51 #12(normal) <cc89d2>; lua; dmarc.lua:568: skip DMARC checks for local networks and authorized users
rspamd-mailcow_1     | 2019-04-01 10:21:51 #12(normal) <cc89d2>; lua; dkim_signing.lua:126: Using selector prefix 'DKIM_SELECTORS' for domain 'diskutiere.net'
rspamd-mailcow_1     | 2019-04-01 10:21:51 #12(normal) <cc89d2>; lua; ip_score.lua:318: skip IP Score for authorized users
rspamd-mailcow_1     | 2019-04-01 10:21:51 #12(normal) <cc89d2>; lua; antivirus.lua:553: CLAM_VIRUS [clamav]: message or mime_part is clean
rspamd-mailcow_1     | 2019-04-01 10:21:51 #12(normal) <aatq1u>; lua; arc.lua:562: Using selector prefix DKIM_SELECTORS for domain diskutiere.net
rspamd-mailcow_1     | 2019-04-01 10:21:51 #12(normal) <cc89d2>; task; bayes_classify: skip classification as ham class has not enough learns: 0, 5 required
rspamd-mailcow_1     | 2019-04-01 10:21:51 #12(normal) <cc89d2>; lua; greylist.lua:260: Score too low - skip greylisting
rspamd-mailcow_1     | 2019-04-01 10:21:51 #12(normal) lua; rspamd.local.lua:84: found tag: cobinhood
rspamd-mailcow_1     | 2019-04-01 10:21:51 #12(normal) lua; rspamd.local.lua:86: metric action now: no action
rspamd-mailcow_1     | 2019-04-01 10:21:51 #12(normal) <cc89d2>; task; rspamd_task_write_log: id: <75a9-5ca1ca00-3-5a01e080@117715617>, qid: <834B515A970>, ip: ipaddress.248, user: anothermailbox@anotherdomain.tld (same server), from: <anothermailbox@anotherdomain.tld (same server)>, (default: F (no action): [-19.60/15.00] [MAILCOW_AUTH(-20.00){},MID_RHS_NOT_FQDN(0.50){},MIME_GOOD(-0.10){multipart/alternative;text/plain;},ARC_NA(0.00){},ARC_SIGNED(0.00){i=1;},DKIM_SIGNED(0.00){},DYN_RL_CHECK(0.00){},FROM_EQ_ENVFROM(0.00){},FROM_HAS_DN(0.00){},MIME_TRACE(0.00){0:+;1:+;},RCPT_COUNT_ONE(0.00){1;},RCPT_MAILCOW_DOMAIN(0.00){kupfer.cc;},RCVD_COUNT_ZERO(0.00){0;},RCVD_TLS_ALL(0.00){},TAGGED_RCPT(0.00){cobinhood;},TO_DN_NONE(0.00){},TO_MATCH_ENVRCPT_ALL(0.00){}]), len: 764, time: 620.000ms real, 26.357ms virtual, dns req: 0, digest: <2e8fe5864bf19ba1a8a33cde38e5c622>, rcpts: <alias@domain.tld>, mime_rcpts: <alias@domain.tld>
rspamd-mailcow_1     | 2019-04-01 10:21:51 #12(normal) <cc89d2>; task; rspamd_protocol_http_reply: regexp statistics: 0 pcre regexps scanned, 2 regexps matched, 180 regexps total, 93 regexps cached, 0B bytes scanned using pcre, 582B bytes scanned total
rspamd-mailcow_1     | 2019-04-01 10:21:51 #10(rspamd_proxy) <2dd813>; proxy; proxy_milter_finish_handler: finished milter connection
rspamd-mailcow_1     | 2019-04-01 10:22:19 #11(controller) <oxhd99>; map; http_map_finish: http://nginx:8081/settings.php([fd4d:6169:6c63:6f77::10]:8081): read map data 1024 bytes, next check at Mon, 01 Apr 2019 08:22:49 GMT
rspamd-mailcow_1     | 2019-04-01 10:22:19 #11(controller) <oxhd99>; map; rspamd_map_save_http_cached_file: saved data from http://nginx:8081/settings.php in /var/lib/rspamd/f0f1f1ff89a5a9c0c3050fcb9ad2426aeacf1fdf.map, 934 bytes
rspamd-mailcow_1     | 2019-04-01 10:22:19 #11(controller) <aatq1u>; lua; settings.lua:659: loaded 3 elements of settings
rspamd-mailcow_1     | 2019-04-01 10:22:19 #10(rspamd_proxy) <oxhd99>; map; rspamd_map_read_cached: http://nginx:8081/settings.php: read map data cached 1024 bytes
rspamd-mailcow_1     | 2019-04-01 10:22:19 #10(rspamd_proxy) <aatq1u>; lua; settings.lua:659: loaded 3 elements of settings
rspamd-mailcow_1     | 2019-04-01 10:22:20 #12(normal) <oxhd99>; map; rspamd_map_read_cached: http://nginx:8081/settings.php: read map data cached 1024 bytes
rspamd-mailcow_1     | 2019-04-01 10:22:20 #12(normal) <aatq1u>; lua; settings.lua:659: loaded 3 elements of settings
rspamd-mailcow_1     | 2019-04-01 10:22:20 #13(fuzzy) <oxhd99>; map; rspamd_map_read_cached: http://nginx:8081/settings.php: read map data cached 1024 bytes
rspamd-mailcow_1     | 2019-04-01 10:22:20 #13(fuzzy) <aatq1u>; lua; settings.lua:659: loaded 3 elements of settings
rspamd-mailcow_1     | 2019-04-01 10:22:21 #14(fuzzy) <oxhd99>; map; rspamd_map_read_cached: http://nginx:8081/settings.php: read map data cached 1024 bytes
rspamd-mailcow_1     | 2019-04-01 10:22:21 #14(fuzzy) <aatq1u>; lua; settings.lua:659: loaded 3 elements of settings
rspamd-mailcow_1     | 2019-04-01 10:22:24 #11(controller) <rznbhc>; map; http_map_finish: http://nginx:8081/forwardinghosts.php([fd4d:6169:6c63:6f77::10]:8081): read map data 32 bytes, next check at Mon, 01 Apr 2019 08:22:54 GMT
rspamd-mailcow_1     | 2019-04-01 10:22:24 #11(controller) <rznbhc>; map; rspamd_map_save_http_cached_file: saved data from http://nginx:8081/forwardinghosts.php in /var/lib/rspamd/e48ac0193da10600fac6a17bb7146ba2421fee67.map, 16 bytes
rspamd-mailcow_1     | 2019-04-01 10:22:24 #11(controller) <rznbhc>; map; rspamd_radix_fin: read radix trie of 1 elements: ents=1 dup=0 tbm=0 lc=1 mem=1k free=0 waste=0
rspamd-mailcow_1     | 2019-04-01 10:22:25 #12(normal) <rznbhc>; map; rspamd_map_read_cached: http://nginx:8081/forwardinghosts.php: read map data cached 32 bytes
rspamd-mailcow_1     | 2019-04-01 10:22:25 #12(normal) <rznbhc>; map; rspamd_radix_fin: read radix trie of 1 elements: ents=1 dup=0 tbm=0 lc=1 mem=1k free=0 waste=0
rspamd-mailcow_1     | 2019-04-01 10:22:25 #14(fuzzy) <rznbhc>; map; rspamd_map_read_cached: http://nginx:8081/forwardinghosts.php: read map data cached 32 bytes
rspamd-mailcow_1     | 2019-04-01 10:22:25 #14(fuzzy) <rznbhc>; map; rspamd_radix_fin: read radix trie of 1 elements: ents=1 dup=0 tbm=0 lc=1 mem=1k free=0 waste=0
rspamd-mailcow_1     | 2019-04-01 10:22:26 #10(rspamd_proxy) <rznbhc>; map; rspamd_map_read_cached: http://nginx:8081/forwardinghosts.php: read map data cached 32 bytes
rspamd-mailcow_1     | 2019-04-01 10:22:26 #10(rspamd_proxy) <rznbhc>; map; rspamd_radix_fin: read radix trie of 1 elements: ents=1 dup=0 tbm=0 lc=1 mem=1k free=0 waste=0
rspamd-mailcow_1     | 2019-04-01 10:22:27 #13(fuzzy) <rznbhc>; map; rspamd_map_read_cached: http://nginx:8081/forwardinghosts.php: read map data cached 32 bytes
rspamd-mailcow_1     | 2019-04-01 10:22:27 #13(fuzzy) <rznbhc>; map; rspamd_radix_fin: read radix trie of 1 elements: ents=1 dup=0 tbm=0 lc=1 mem=1k free=0 waste=0
rspamd-mailcow_1     | 2019-04-01 10:22:33 #11(controller) <rznbhc>; map; rspamd_map_cache_cb: cached data is now expired (gen mismatch 2 != 3) for http://nginx:8081/forwardinghosts.php
rspamd-mailcow_1     | 2019-04-01 10:22:38 #11(controller) <aatq1u>; lua; bayes_expiry.lua:395: finished expiry step 1: 0 items checked, 0 significant (0 extended), 0 insignificant (0 ttls set), 0 common (0 discriminated), 0 infrequent (0 ttls set), 0 mean, 0 std
rspamd-mailcow_1     | 2019-04-01 10:22:38 #11(controller) <aatq1u>; lua; bayes_expiry.lua:395: finished expiry cycle in 1 steps: 0 items checked, 0 significant (0 extended), 0 insignificant (0 ttls set), 0 common (0 discriminated), 0 infrequent (0 ttls set), 0 mean, 0 std
rspamd-mailcow_1     | 2019-04-01 10:22:39 #11(controller) <oxhd99>; map; rspamd_map_cache_cb: cached data is now expired (gen mismatch 2 != 3) for http://nginx:8081/settings.php
andryyy commented 5 years ago

You need to paste logs for a time you actually receive a tagged mail...

I cannot reproduce it btw

image

This is for a real mailbox though. I don't think this works with a 1:1 alias and I also think we mentioned that in the other issue.

skupfer commented 5 years ago

These are the logs from the time I received the tagged mail.

I send it from an account on my mail server to another account on my mailserver.

It used to work 1:1 for alias on my main mailbox as I mentioned before. Then after whatever update it stopped working and now everything lands in my inbox. This is really unfortunate because I would have to create a filter for everything so it gets moved this way :-(

andryyy commented 5 years ago

The logic of the tag_moo symbol never changed.

andryyy commented 5 years ago

We could probably add each 1:1 alias to the Redis map. Hm.

skupfer commented 5 years ago

Here is an example of the working state before and after updating at some point. As you mentioned, the X-Moo-Tag went missing AFTER the update. This is for all alias mails. Something must have changed.

COBINHOOD AFTER Update X

Return-Path: <bounce-mc.us16_80136606.266301-ALIAS+TAG=DOMAIN.TLD@mail49.atl31.mcdlv.net>
Delivered-To: MAINBOX+TAG@DOMAIN.TLD
Received: from mail.domain.tld ([172.22.1.7])
    by mail.domain.tld with LMTP id SKS9KHvI0FpfXQAAjgZzUw
    for <MAINBOX+TAG@DOMAIN.TLD>; Fri, 13 Apr 2018 17:10:51 +0200
Authentication-Results: mail.domain.tld; dkim=pass header.d=cobinhood.com; dmarc=pass (policy=reject) header.from=cobinhood.com; spf=pass smtp.mailfrom=bounce-mc.us16_80136606.266301-crypto@mail49.atl31.mcdlv.net
Received: from mail49.atl31.mcdlv.net (mail49.atl31.mcdlv.net [IP4address])
    by mail.domain.tld (Postfix) with ESMTP id 3B55615A8DC
    for <ALIAS+TAG@DOMAIN.TLD>; Fri, 13 Apr 2018 17:10:40 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=k1; d=cobinhood.com;
 h=Subject:From:Reply-To:To:Date:Message-ID:List-ID:List-Unsubscribe:
 Content-Type:MIME-Version; i=support@cobinhood.com;
 bh=81KaeewOA/Mc49C2sWEy3sRV01mMpUOhmZsWuq7G5Zc=;
 b=XAS7/g40y/DR6/55uCkGwrphWT/UF4YTwBGw4h0ezHygN/1ajnwfaOOiT2NYmOK7ptzksvew/DBK
   y3zKZPzayOLEiyeDCIfiVl2D7MZovA+OGqCJBCbdgb8Xbgwa/aYDBRnTWh1ISiynNcS3FxBtazfr
   PVXcO3fR6x9ea49XxEU=
Received: from (127.0.0.1) by mail49.atl31.mcdlv.net id hq34722ddl4q for <ALIAS+TAG@DOMAIN.TLD>; Fri, 13 Apr 2018 15:10:29 +0000 (envelope-from <bounce-mc.us16_80136606.266301-ALIAS+TAG=DOMAIN.TLD@mail49.atl31.mcdlv.net>)
Subject: =?utf-8?Q?=F0=9F=92=81=C2=A0It=27s=20all=20for=20you=E2=80=94airdrop=20missions=2C=20bounties=2C=20more=20COB=20benefits?=
From: =?utf-8?Q?COBINHOOD?= <support@cobinhood.com>
Reply-To: =?utf-8?Q?COBINHOOD?= <support@cobinhood.com>
To: <ALIAS+TAG@DOMAIN.TLD>
Date: Fri, 13 Apr 2018 15:10:29 +0000
Message-ID: <6a440788789ab405bfce88ba1.cd7a3505ab.20180413150927.4793f17d5c.249338b8@mail49.atl31.mcdlv.net>
X-Mailer: MailChimp Mailer - **CID4793f17d5ccd7a3505ab**
X-Campaign: mailchimp6a440788789ab405bfce88ba1.4793f17d5c
X-campaignid: mailchimp6a440788789ab405bfce88ba1.4793f17d5c
X-Report-Abuse: Please report abuse for this campaign here: http://www.mailchimp.com/abuse/abuse.phtml?u=6a440788789ab405bfce88ba1&id=4793f17d5c&e=cd7a3505ab
X-MC-User: 6a440788789ab405bfce88ba1
Feedback-ID: 80136606:80136606.266301:us16:mc
List-ID: 6a440788789ab405bfce88ba1mc list <6a440788789ab405bfce88ba1.115829.list-id.mcsv.net>
X-Accounttype: pd
List-Unsubscribe: 
List-Unsubscribe-Post: List-Unsubscribe=One-Click
x-mcda: FALSE
Content-Type: multipart/alternative; boundary="_----------=_MCPart_242000755"
MIME-Version: 1.0
X-Spamd-Result: default: False [3.44 / 15.00]
     RCPT_COUNT_ONE(0.00)[1]
     DYN_RL_CHECK(0.00)[]
     REPLYTO_EXCESS_QP(1.20)[]
     URIBL_GREY(1.50)[list-manage.com.multi.uribl.com]
     DKIM_TRACE(0.00)[cobinhood.com:+]
     IP_SCORE(0.00)[ipnet: IP4subnet/21(0.98), asn: 14782(0.68), country: US(-0.21)]
     REPLYTO_EQ_FROM(0.00)[]
     FROM_HAS_DN(0.00)[]
     R_SPF_ALLOW(-0.20)[+ip4:IP4address]
     TAGGED_FROM(0.00)[cobinhood=DOMAIN.TLD]
     FROM_EXCESS_QP(1.20)[]
     RCPT_MAILCOW_DOMAIN(0.00)[DOMAIN.TLD]
     RCVD_NO_TLS_LAST(0.00)[]
     ARC_NA(0.00)[]
     ASN(0.00)[asn:14782, ipnet:IP4subnet/21, country:US]
     TO_DN_NONE(0.00)[]
     FORGED_SENDER(0.30)[]
     TAGGED_RCPT(0.00)[cobinhood]
     TO_MATCH_ENVRCPT_ALL(0.00)[]
     RCVD_COUNT_TWO(0.00)[2]
     MIME_GOOD(-0.10)[multipart/alternative,text/plain]
     R_DKIM_ALLOW(-0.20)[cobinhood.com]
     FROM_NEQ_ENVFROM(0.00)[support@cobinhood.com,bounce-mc.us16_80136606.266301-crypto@mail49.atl31.mcdlv.net]
     RCVD_IN_DNSWL_NONE(0.00)[49.134.201.205.list.dnswl.org : 127.0.15.0]
     DMARC_POLICY_ALLOW(-0.25)[cobinhood.com,reject]
     HAS_REPLYTO(0.00)[support@cobinhood.com]
     MX_GOOD(-0.01)[mail.mail49.atl31.mcdlv.net]
X-Rspamd-Queue-Id: 3B55615A8DC

COBINHOOD BEFORE Update X

Return-Path: <bounce-mc.us16_80136606.266297-ALIAS+TAG=DOMAIN.TLD@mail100.us4.mcsv.net>
Delivered-To: MAINBOX+TAG@DOMAIN.TLD
Received: from mail.domain.tld ([fd4d:6169:6c63:6f77::1])
    by mail.domain.tld with LMTP id 4METGOCjv1pZTgAAjgZzUw
    for <MAINBOX+TAG@DOMAIN.TLD>; Sat, 31 Mar 2018 15:06:08 +0000
Authentication-Results: mail.domain.tld; dkim=pass header.d=cobinhood.com; dmarc=pass (policy=reject) header.from=cobinhood.com; spf=pass smtp.mailfrom=bounce-mc.us16_80136606.266297-crypto@mail100.us4.mcsv.net
Received: from mail100.us4.mcsv.net (mail100.us4.mcsv.net [205.201.128.100])
    by mail.domain.tld (Postfix) with ESMTP id 136F115A862
    for <ALIAS+TAG@DOMAIN.TLD>; Sat, 31 Mar 2018 15:05:56 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=k1; d=cobinhood.com;
 h=Subject:From:Reply-To:To:Date:Message-ID:List-ID:List-Unsubscribe:
 Content-Type:MIME-Version; i=support@cobinhood.com;
 bh=chEBpjDLEepEeytx7N9IWnkmh5D9pvNmEwVNDrUO5F8=;
 b=vfnU+EQmVv+qO5lI8Wd69lGtOnblUKAd3TWBqZFzwv2oDEQwYhIpjs6H1/cfrZbuuzj04aUbKGpB
   CKExsD+8SLaMUkgjCgwL5vSrVkuppIewVxLKF/d93ypAqApt8cfxcGNhMHmEGCVFpCEuD2VvUyfE
   tp/8gW1XeBoepIArHvk=
Received: from (127.0.0.1) by mail100.us4.mcsv.net id hnuhta2ddl4d for <ALIAS+TAG@DOMAIN.TLD>; Sat, 31 Mar 2018 15:05:51 +0000 (envelope-from <bounce-mc.us16_80136606.266297-ALIAS+TAG=DOMAIN.TLD@mail100.us4.mcsv.net>)
Subject: =?utf-8?Q?=E2=9C=A8=20Revamped=20account=20level=20with=20100=20BTC=20limit=20&=20updates=20on=20tokens=20listed?=
From: =?utf-8?Q?COBINHOOD?= <support@cobinhood.com>
Reply-To: =?utf-8?Q?COBINHOOD?= <support@cobinhood.com>
To: <ALIAS+TAG@DOMAIN.TLD>
Date: Sat, 31 Mar 2018 15:05:51 +0000
Message-ID: <6a440788789ab405bfce88ba1.cd7a3505ab.20180331150449.b8698eb37f.6bcf85e0@mail100.us4.mcsv.net>
X-Mailer: MailChimp Mailer - **CIDb8698eb37fcd7a3505ab**
X-Campaign: mailchimp6a440788789ab405bfce88ba1.b8698eb37f
X-campaignid: mailchimp6a440788789ab405bfce88ba1.b8698eb37f
X-Report-Abuse: Please report abuse for this campaign here: http://www.mailchimp.com/abuse/abuse.phtml?u=6a440788789ab405bfce88ba1&id=b8698eb37f&e=cd7a3505ab
X-MC-User: 6a440788789ab405bfce88ba1
Feedback-ID: 80136606:80136606.266297:us16:mc
List-ID: 6a440788789ab405bfce88ba1mc list <6a440788789ab405bfce88ba1.115829.list-id.mcsv.net>
X-Accounttype: pd
List-Unsubscribe: 
List-Unsubscribe-Post: List-Unsubscribe=One-Click
x-mcda: FALSE
Content-Type: multipart/alternative; boundary="_----------=_MCPart_697361172"
MIME-Version: 1.0
X-Moo-Tag: YES
X-Spamd-Result: default: False [3.44 / 15.00]
 FROM_NEQ_ENVFROM(0.00)[support@cobinhood.com,bounce-mc.us16_80136606.266297-crypto@mail100.us4.mcsv.net]
 FORGED_SENDER(0.30)[]
 R_SPF_ALLOW(-0.20)[+mx]
 MIME_GOOD(-0.10)[multipart/alternative,text/plain]
 HAS_REPLYTO(0.00)[support@cobinhood.com]
 DMARC_POLICY_ALLOW(-0.25)[cobinhood.com,reject]
 RCVD_COUNT_TWO(0.00)[2]
 TAGGED_FROM(0.00)[cobinhood=DOMAIN.TLD]
 IP_SCORE(0.00)[ipnet: IP4subnet/21(0.68), asn: 14782(0.55), country: US(-0.02)]
 RCVD_NO_TLS_LAST(0.00)[]
 URIBL_GREY(1.50)[list-manage.com.multi.uribl.com]
 FROM_EXCESS_QP(1.20)[]
 DYN_RL_CHECK(0.00)[]
 TAGGED_RCPT(0.00)[cobinhood]
 MX_GOOD(-0.01)[mail.mail100.us4.mcsv.net]
 DKIM_TRACE(0.00)[cobinhood.com:+]
 RCPT_COUNT_ONE(0.00)[1]
 R_DKIM_ALLOW(-0.20)[cobinhood.com]
 RCVD_IN_DNSWL_NONE(0.00)[100.128.201.205.list.dnswl.org : 127.0.15.0]
 RCPT_MAILCOW_DOMAIN(0.00)[DOMAIN.TLD]
 REPLYTO_EQ_FROM(0.00)[]
 TO_MATCH_ENVRCPT_ALL(0.00)[]
 ASN(0.00)[asn:14782, ipnet:IP4subnet/21, country:US]
 REPLYTO_EXCESS_QP(1.20)[]
 ARC_NA(0.00)[]
 TO_DN_NONE(0.00)[]
 FROM_HAS_DN(0.00)[]
X-Rspamd-Queue-Id: 136F115A862

Unfortunately I don't think the logs are still there from docker. (its from last year)

EDIT: Mixed up before and after (according to the dates :-))

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

skupfer commented 5 years ago

Too bad it is stale. But it looks like that it isn't working anymore for any tagged mail. They all get sent straight to the inbox instead of folders. Needs a rewrite if it relies on a non-working header/tag? Don't want to create rules :-(

andryyy commented 5 years ago

It works for mailboxes.

Edit: I can reproduce it.

Edit2: I could reproduce, because I had set "Do nothing" as action...

image

Meh. After changing that: I cannot reproduce it. :(

skupfer commented 5 years ago

That's what I am talking about. I mean, I understood. Yes, it works for mailboxes. But it was working for the alias mail to my mailbox before commit X as I tried to tell from my comment https://github.com/mailcow/mailcow-dockerized/issues/2487#issuecomment-478520653 .. But something changed and now it stopped working completely.

Weird thing is you said you didn't change a thing. But why was it working fine and now stopped working.

mlthlschr commented 4 years ago

I also face the same problem. Did a really dirty workaround by commenting out certain lines in data/conf/rspamd/lua/rspamd.local.lua. Now it handles all the tags for every E-Mail received (so also the ones of the account of your Granny).

Edit: which lines?

--[[      local wants_subject_tag = task:get_symbol("RCPT_WANTS_SUBJECT_TAG")
      local wants_subfolder_tag = task:get_symbol("RCPT_WANTS_SUBFOLDER_TAG")

      if wants_subject_tag then 
]]
      rspamd_logger.infox("user wants subject modified for tagged mail")
      local sbj = task:get_header('Subject')
      new_sbj = '=?UTF-8?B?' .. tostring(util.encode_base64('[' .. tag .. '] ' .. sbj)) .. '?='
      task:set_milter_reply({
        remove_headers = {['Subject'] = 1},
        add_headers = {['Subject'] = new_sbj}
      })
--[[      elseif wants_subfolder_tag then
        rspamd_logger.infox("Add X-Moo-Tag header")
        task:set_milter_reply({
          add_headers = {['X-Moo-Tag'] = 'YES'}
        })
      end
]]
andryyy commented 4 years ago

It simply tags all then.

skupfer commented 4 years ago

Thanks, might give it a try. At least it would be working then. As of now it is not working at all. Had to create rules for every alias now due to that. Might not be needed anymore now.

Still it would be great if you could fix / change it officially but the workaround might come in handy. As I said it was working by 100% earlier since I have the folders there and didn't create them / moved the mails manually.

andryyy commented 4 years ago

Did never work for shared aliases.

I need exact steps to reproduce it, I will check it then.

@ntimo can probably write a check for the upcoming integration test then. :)

skupfer commented 4 years ago

It worked. By 100%. I my main account / mailbox and there are several subfolders I have never created for my aliases which were created due to the create subfolder rule (not tag in subject).

I have posted logs above in this ticket from the time it worked, this is all I can provide.

Config -> Mail Setup -> Aliases -> add alias -> alias@mail.com -> destination: mail@mainbox.com

Send an email to alias+tag@mail.com and it arrives in mailbox mail@mainbox.com. It should get sorted into a folder automatically. This was working. I was happy about that because I didn't have to created hundreds of rules.

andryyy commented 4 years ago

Check the code, it is not possible this ever worked. alias+test@domain.tld woud never be auto-expanded to mailbox+test@domain.tld. This step never ever happened. You can check the git history. It did not break, it was never implemented. Ever.

I can try to add it for unshared aliases.

skupfer commented 4 years ago

Due to work and study I neither have the time nor the will to install older versions to prove the opposite. Others I recommended this tool have experienced exactly the same. I have not created the folders for the alias+tag mails. It worked exactly as I described. This is what the issue is all about. Perhaps it was a mistake and was unwittingly fixed. Looks like I have to live with it to close this topic once and for all. Thank you very much for your hard work. All in all I really enjoy this product!

andryyy commented 4 years ago

:/ I will work on it. :) Will only work for non-shared aliases, though.

PhilRW commented 4 years ago

The sieve script is trying to match the +tag using envelope. It works if you check on the address instead. The recipient envelope is being rewritten to remove any +tag, which happens here. This is also why it behaves differently for aliases. I think alias delivery is bypassing dovecot somehow?

andryyy commented 4 years ago

If header :contains "X-Moo-Tag" "YES".

In data/conf/rspamd/lua/rspamd.local.lua the X header is set, when the rcpt is in the redis key RCPT_WANTS_SUBFOLDER_TAG. The problem is, that an alias is not part of this Redis key, only mailbox users are.

Even though alias@develcow.de is a direct alias to andre@develcow.de, the Redis key only returns this:

> HGETALL RCPT_WANTS_SUBFOLDER_TAG
1) "andre@develcow.de"
2) "1"
127.0.0.1:6379>

A message sent to alias+test123@develcow.de returns no X header:

image

So, my todo is: Add alias addresses to this redis key. :)

PhilRW commented 4 years ago

So that will take care of aliases, but should we also modify the sieve script so it checks on addresses, as such?

if header :contains "X-Moo-Tag" "YES" {
  if anyof (address :detail :matches ["To","CC"] "*",
      envelope :detail :matches "To" "*" ) {
    set :lower :upperfirst "tag" "${1}";
    if mailboxexists "INBOX/${1}" {
      fileinto "INBOX/${1}";
    } else {
      fileinto :create "INBOX/${tag}";
    }
  }
}
andryyy commented 4 years ago

Hm, would that fire, if any recipient in the To or CC field has a tag?

PhilRW commented 4 years ago

Hmm, yes it would. So envelope it is.

albakham commented 4 years ago

Very interested in this feature. Having the ability to move mail, coming from tagged alias, automatically into subfolders would be much appreciated!

andryyy commented 4 years ago

I will work on this soon. :) Sorry.

itkfm commented 4 years ago

Still broken here, unfortunately. (I mean, this doesn't surprise me since this issue is still open.)

andryyy commented 4 years ago

Never worked, as described above.

PRs or sponsoring are welcome.

itkfm commented 4 years ago

sorry, just skipped through this (somewhat long) thread

skupfer commented 4 years ago

@andryyy I went back to the following commit: https://github.com/mailcow/mailcow-dockerized/commit/50fe21c646e4f0f8453b3b42f18064fbfd53d131

EDIT: This has been done on a virgin server!

I setup a mailbox: test@domain.de First mail: test@domain.de -> Inbox Second mail: test+alias@domain.de -> Inbox -> Alias

Working as expected. A folder got created for the alias

I setup an alias alias@domain.de, goto to test@domain.de First mail: alias@domain.de -> Inbox Second mail: alias+test@domain.de -> Inbox -> Test

A folder test got created for the alias mail with an test-tag

It looks like I wasn't imagining it.

Which logs do you need?

EDIT: Attached all logs. Hope I removed all relevant information Archive.zip

EDIT: For completionists sake, it probably changed after https://github.com/mailcow/mailcow-dockerized/commit/d58b89528f0cf57bf0b2fbfcac51b7d0e71bb17c

All tests done due to https://github.com/mailcow/mailcow-dockerized/issues/2487#issuecomment-574827508 and code changed

andryyy commented 4 years ago

2017? ๐Ÿ˜„

The tag handling was probably different in the sieve script (and changed for a reason).

I don't need logs, I need someone to pay the time to implement it properly. I don't have any free time left.

I checked it and it is the explicit option "wants_subfolder_tag" which is now required, but was "when nothing else matched" before. The default WAS to put mail to subfolders, the default IS to do nothing. And we want that new default. So my previous words are still valid: we would need to add the alias addresses to the array of "wants_subfolder_tag".

skupfer commented 4 years ago

Pretty far back I know but you asked for it. Just wanted to make sure I was right when saying it WAS working before and therefore not lying. Decided to go pretty far back but I guess it changed later in 2018 to somewhere when I created this issue.

No need to hurry or something, maybe it gets implemented sooner or later. Who knows.

pahy commented 4 years ago

Is there anything to support you guys with to make this work?

andryyy commented 4 years ago

https://github.com/mailcow/mailcow-dockerized/commit/0c30d32fdb94e858318fe2bfbf81c2540741b221

andryyy commented 4 years ago

Finally fixed.

itkfm commented 4 years ago

Neat, thanks.

skupfer commented 4 years ago

@andryyy Thought it would work. But still receive tagged mails not filtered into their respective subfolders (4 / 4 mails failed to get moved, last one yesterday). Which info do you need? Updated 17.10.20.

andryyy commented 4 years ago

Can you update again? Larger messages (over 1 MB) failed to be correctly parsed.

skupfer commented 4 years ago

Can you update again? Larger messages (over 1 MB) failed to be correctly parsed.

Updated right after your message (23-10-20). More or less. Today (26-10-20) I received another unfiltered message. Do you want logs?

andryyy commented 4 years ago

Works fine here, sorry. Try to reset all changed code.

andryyy commented 4 years ago

Actually...

I'm an idiot and you were correct.

set_recipient has too many flaws (besides that I messed one if/else statement up which broke the tag handler for you), so I removed it and replaced the function for tag handling.

It works now. :) Can you please update once more?

m0ddixx commented 4 years ago

Is it possible that this broke tagging for unaliased inboxes? I've updated and since then all tagged emails get send straight to the main inbox

andryyy commented 4 years ago

I will check it now, but it's quite possible.

andryyy commented 4 years ago

Try ...

git fetch
git checkout origin/master data/conf/rspamd/lua/rspamd.local.lua data/conf/rspamd/dynmaps/aliasexp.php
docker-compose restart rspamd-mailcow

Does it work? :)

m0ddixx commented 4 years ago

Unfortunately, the mails with tags still won't land in a subfolder.

andryyy commented 4 years ago

Try a full update then, please. I tried every possible combination now. It always worked. :)