Gitlab emails going into the spam folder #32

Closed
opened 2023-10-12 15:31:09 +00:00 by eoghanconlon73 · 11 comments
eoghanconlon73 commented 2023-10-12 15:31:09 +00:00 (Migrated from gitlab.skynet.ie)

Emails from the gitlab instance are going into our spam/junk folder by default.

Emails from the gitlab instance are going into our spam/junk folder by default.
eoghanconlon73 commented 2023-10-12 15:34:52 +00:00 (Migrated from gitlab.skynet.ie)

Unable to replicate it on my account due to manually marking it as not spam on my end

Unable to replicate it on my account due to manually marking it as not spam on my end
eoghanconlon73 commented 2023-10-12 15:35:09 +00:00 (Migrated from gitlab.skynet.ie)

changed the description

changed the description
silver commented 2023-10-13 08:44:30 +00:00 (Migrated from gitlab.skynet.ie)

Core issue is that there are enough "wrong" things to make rspamd believe that it is a spam mail.
Low hanging fruit is to change glados.localdomain to glados.skynet.ie or gitlab.skynet.ie

X-Spamd-Result: default: False [6.39 / 15.00];
	HFILTER_HOSTNAME_UNKNOWN(2.50)[];
	RDNS_NONE(1.00)[];
	URI_COUNT_ODD(1.00)[1];
	HFILTER_HELO_IP_A(1.00)[glados.localdomain];
	MV_CASE(0.50)[];
	HFILTER_HELO_NORES_A_OR_MX(0.30)[glados.localdomain];
	ONCE_RECEIVED(0.10)[];
	MIME_GOOD(-0.10)[multipart/alternative,text/plain];
	DMARC_POLICY_SOFTFAIL(0.10)[skynet.ie : No valid SPF, No valid DKIM,none];
	HAS_LIST_UNSUB(-0.01)[];
	GREYLIST(0.00)[pass,meta];
	TO_DN_NONE(0.00)[];
	RCVD_TLS_LAST(0.00)[];
	FROM_EQ_ENVFROM(0.00)[];
	RCPT_COUNT_ONE(0.00)[1];
	ARC_NA(0.00)[];
	RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[193.1.99.75:from];
	FROM_HAS_DN(0.00)[];
	MIME_TRACE(0.00)[0:+,1:+,2:~];
	TO_MATCH_ENVRCPT_ALL(0.00)[];
	RDNS_DNSFAIL(0.00)[];
	REPLYTO_DOM_NEQ_FROM_DOM(0.00)[];
	R_DKIM_NA(0.00)[];
	DNSWL_BLOCKED(0.00)[193.1.99.75:from];
	PREVIOUSLY_DELIVERED(0.00)[silver@skynet.ie];
	R_SPF_NA(0.00)[no SPF record];
	MID_RHS_MATCH_FROM(0.00)[];
	RCVD_COUNT_ONE(0.00)[1];
	ASN(0.00)[asn:1213, ipnet:193.1.0.0/16, country:IE];
	HAS_REPLYTO(0.00)[noreply@localhost];
	DBL_BLOCKED_OPENRESOLVER(0.00)[localhost:replyto,glados.localdomain:helo,skynet.ie:url]
X-Rspamd-Server: gir
X-Rspamd-Action: add header
X-Rspamd-Queue-Id: 2D57A281CD
X-Spam: Yes
Core issue is that there are enough "wrong" things to make rspamd believe that it is a spam mail. Low hanging fruit is to change ``glados.localdomain`` to ``glados.skynet.ie`` or ``gitlab.skynet.ie`` ``` X-Spamd-Result: default: False [6.39 / 15.00]; HFILTER_HOSTNAME_UNKNOWN(2.50)[]; RDNS_NONE(1.00)[]; URI_COUNT_ODD(1.00)[1]; HFILTER_HELO_IP_A(1.00)[glados.localdomain]; MV_CASE(0.50)[]; HFILTER_HELO_NORES_A_OR_MX(0.30)[glados.localdomain]; ONCE_RECEIVED(0.10)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[skynet.ie : No valid SPF, No valid DKIM,none]; HAS_LIST_UNSUB(-0.01)[]; GREYLIST(0.00)[pass,meta]; TO_DN_NONE(0.00)[]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[193.1.99.75:from]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RDNS_DNSFAIL(0.00)[]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; R_DKIM_NA(0.00)[]; DNSWL_BLOCKED(0.00)[193.1.99.75:from]; PREVIOUSLY_DELIVERED(0.00)[silver@skynet.ie]; R_SPF_NA(0.00)[no SPF record]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:1213, ipnet:193.1.0.0/16, country:IE]; HAS_REPLYTO(0.00)[noreply@localhost]; DBL_BLOCKED_OPENRESOLVER(0.00)[localhost:replyto,glados.localdomain:helo,skynet.ie:url] X-Rspamd-Server: gir X-Rspamd-Action: add header X-Rspamd-Queue-Id: 2D57A281CD X-Spam: Yes ```
silver commented 2023-10-13 08:45:13 +00:00 (Migrated from gitlab.skynet.ie)

mentioned in commit 487fb3f0bf

mentioned in commit 487fb3f0bf4d74f99ecaddbf7f3fc0fa0c0a2a4e
silver commented 2023-10-13 08:54:53 +00:00 (Migrated from gitlab.skynet.ie)

mentioned in commit 19a7476278

mentioned in commit 19a74762786461a2443ae04327ba137bb5bda601
eoghanconlon73 commented 2023-10-13 09:04:42 +00:00 (Migrated from gitlab.skynet.ie)

JB2W2YLOOMQGGYLOEB2W4ZDFOJZXIYLOMQQGEYLTMUWTGMRAOJUWO2DUH4======

JB2W2YLOOMQGGYLOEB2W4ZDFOJZXIYLOMQQGEYLTMUWTGMRAOJUWO2DUH4======
silver commented 2023-10-13 09:13:25 +00:00 (Migrated from gitlab.skynet.ie)

Above msg had this header

X-Spamd-Result: default: False [5.09 / 15.00];
	HFILTER_HOSTNAME_UNKNOWN(2.50)[];
	RDNS_NONE(1.00)[];
	URI_COUNT_ODD(1.00)[1];
	MV_CASE(0.50)[];
	DMARC_POLICY_SOFTFAIL(0.10)[skynet.ie : No valid SPF, No valid DKIM,none];
	MIME_GOOD(-0.10)[multipart/alternative,text/plain];
	ONCE_RECEIVED(0.10)[];
	HAS_LIST_UNSUB(-0.01)[];
	RCVD_TLS_LAST(0.00)[];
	GREYLIST(0.00)[pass,meta];
	ARC_NA(0.00)[];
	TO_MATCH_ENVRCPT_ALL(0.00)[];
	MIME_TRACE(0.00)[0:+,1:+,2:~];
	RCPT_COUNT_ONE(0.00)[1];
	RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[193.1.99.75:from];
	RDNS_DNSFAIL(0.00)[];
	RCVD_COUNT_ONE(0.00)[1];
	HAS_REPLYTO(0.00)[noreply@localhost];
	R_SPF_NA(0.00)[no SPF record];
	TO_DN_NONE(0.00)[];
	FROM_EQ_ENVFROM(0.00)[];
	FROM_HAS_DN(0.00)[];
	REPLYTO_DOM_NEQ_FROM_DOM(0.00)[];
	PREVIOUSLY_DELIVERED(0.00)[silver@skynet.ie];
	R_DKIM_NA(0.00)[];
	DNSWL_BLOCKED(0.00)[193.1.99.75:from];
	ASN(0.00)[asn:1213, ipnet:193.1.0.0/16, country:IE];
	MID_RHS_MATCH_FROM(0.00)[];
	DBL_BLOCKED_OPENRESOLVER(0.00)[localhost:replyto,gitlab.skynet.ie:helo,skynet.ie:url]
X-Rspamd-Server: gir
X-Rspamd-Action: no action
X-Rspamd-Queue-Id: 6CC992E122

However using sudo -u git gitlab-rails console and Notify.test_email('silver@skynet.ie', 'Hello World2345', 'This is a new test message').deliver_now gives me

X-Spamd-Result: default: False [0.90 / 15.00];
	MV_CASE(0.50)[];
	MIME_HTML_ONLY(0.20)[];
	ONCE_RECEIVED(0.10)[];
	DMARC_POLICY_SOFTFAIL(0.10)[skynet.ie : No valid SPF, No valid DKIM,none];
	RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[193.1.99.75:from];
	R_SPF_NA(0.00)[no SPF record];
	RCPT_COUNT_ONE(0.00)[1];
	RCVD_COUNT_ONE(0.00)[1];
	ASN(0.00)[asn:1213, ipnet:193.1.0.0/16, country:IE];
	ARC_NA(0.00)[];
	MIME_TRACE(0.00)[0:~];
	R_DKIM_NA(0.00)[];
	DNSWL_BLOCKED(0.00)[193.1.99.75:from];
	TO_MATCH_ENVRCPT_ALL(0.00)[];
	REPLYTO_DOM_NEQ_FROM_DOM(0.00)[];
	FROM_EQ_ENVFROM(0.00)[];
	FROM_HAS_DN(0.00)[];
	HAS_REPLYTO(0.00)[noreply@localhost];
	REPLYTO_DN_EQ_FROM_DN(0.00)[];
	PREVIOUSLY_DELIVERED(0.00)[silver@skynet.ie];
	TO_DN_NONE(0.00)[];
	RCVD_TLS_LAST(0.00)[];
	DBL_BLOCKED_OPENRESOLVER(0.00)[gitlab.skynet.ie:helo,gitlab.skynet.ie:rdns,localhost:replyto]
X-Rspamd-Server: gir
X-Rspamd-Action: no action
X-Rspamd-Queue-Id: ABAC12E19E

So there is still some room for improvement?

Above msg had this header ``` X-Spamd-Result: default: False [5.09 / 15.00]; HFILTER_HOSTNAME_UNKNOWN(2.50)[]; RDNS_NONE(1.00)[]; URI_COUNT_ODD(1.00)[1]; MV_CASE(0.50)[]; DMARC_POLICY_SOFTFAIL(0.10)[skynet.ie : No valid SPF, No valid DKIM,none]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ONCE_RECEIVED(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; RCVD_TLS_LAST(0.00)[]; GREYLIST(0.00)[pass,meta]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCPT_COUNT_ONE(0.00)[1]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[193.1.99.75:from]; RDNS_DNSFAIL(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; HAS_REPLYTO(0.00)[noreply@localhost]; R_SPF_NA(0.00)[no SPF record]; TO_DN_NONE(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[silver@skynet.ie]; R_DKIM_NA(0.00)[]; DNSWL_BLOCKED(0.00)[193.1.99.75:from]; ASN(0.00)[asn:1213, ipnet:193.1.0.0/16, country:IE]; MID_RHS_MATCH_FROM(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[localhost:replyto,gitlab.skynet.ie:helo,skynet.ie:url] X-Rspamd-Server: gir X-Rspamd-Action: no action X-Rspamd-Queue-Id: 6CC992E122 ``` However using ``sudo -u git gitlab-rails console`` and ``Notify.test_email('silver@skynet.ie', 'Hello World2345', 'This is a new test message').deliver_now`` gives me ``` X-Spamd-Result: default: False [0.90 / 15.00]; MV_CASE(0.50)[]; MIME_HTML_ONLY(0.20)[]; ONCE_RECEIVED(0.10)[]; DMARC_POLICY_SOFTFAIL(0.10)[skynet.ie : No valid SPF, No valid DKIM,none]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[193.1.99.75:from]; R_SPF_NA(0.00)[no SPF record]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:1213, ipnet:193.1.0.0/16, country:IE]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:~]; R_DKIM_NA(0.00)[]; DNSWL_BLOCKED(0.00)[193.1.99.75:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; HAS_REPLYTO(0.00)[noreply@localhost]; REPLYTO_DN_EQ_FROM_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[silver@skynet.ie]; TO_DN_NONE(0.00)[]; RCVD_TLS_LAST(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[gitlab.skynet.ie:helo,gitlab.skynet.ie:rdns,localhost:replyto] X-Rspamd-Server: gir X-Rspamd-Action: no action X-Rspamd-Queue-Id: ABAC12E19E ``` So there is still some room for improvement?
silver commented 2023-10-13 09:19:00 +00:00 (Migrated from gitlab.skynet.ie)

Just sent a "new email address" mail to myself

X-Spamd-Result: default: False [1.60 / 15.00];
	URI_COUNT_ODD(1.00)[1];
	MV_CASE(0.50)[];
	ONCE_RECEIVED(0.10)[];
	DMARC_POLICY_SOFTFAIL(0.10)[skynet.ie : No valid SPF, No valid DKIM,none];
	MIME_GOOD(-0.10)[multipart/alternative,text/plain];
	R_SPF_NA(0.00)[no SPF record];
	RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[193.1.99.75:from];
	ASN(0.00)[asn:1213, ipnet:193.1.0.0/16, country:IE];
	ARC_NA(0.00)[];
	RCPT_COUNT_ONE(0.00)[1];
	MIME_TRACE(0.00)[0:+,1:+,2:~];
	RCVD_COUNT_ONE(0.00)[1];
	TAGGED_RCPT(0.00)[silver];
	R_DKIM_NA(0.00)[];
	DNSWL_BLOCKED(0.00)[193.1.99.75:from];
	FROM_EQ_ENVFROM(0.00)[];
	FROM_HAS_DN(0.00)[];
	HAS_REPLYTO(0.00)[noreply@localhost];
	REPLYTO_DOM_NEQ_FROM_DOM(0.00)[];
	TO_MATCH_ENVRCPT_ALL(0.00)[];
	TO_DN_NONE(0.00)[];
	RCVD_TLS_LAST(0.00)[];
	DBL_BLOCKED_OPENRESOLVER(0.00)[skynet.ie:email,skynet.ie:url,gitlab.skynet.ie:helo,gitlab.skynet.ie:rdns,localhost:replyto]
X-Rspamd-Server: gir
X-Rspamd-Action: no action
X-Rspamd-Queue-Id: 69B4C2E20B

Seems decent?

Just sent a "new email address" mail to myself ``` X-Spamd-Result: default: False [1.60 / 15.00]; URI_COUNT_ODD(1.00)[1]; MV_CASE(0.50)[]; ONCE_RECEIVED(0.10)[]; DMARC_POLICY_SOFTFAIL(0.10)[skynet.ie : No valid SPF, No valid DKIM,none]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; R_SPF_NA(0.00)[no SPF record]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[193.1.99.75:from]; ASN(0.00)[asn:1213, ipnet:193.1.0.0/16, country:IE]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_ONE(0.00)[1]; TAGGED_RCPT(0.00)[silver]; R_DKIM_NA(0.00)[]; DNSWL_BLOCKED(0.00)[193.1.99.75:from]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; HAS_REPLYTO(0.00)[noreply@localhost]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_TLS_LAST(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[skynet.ie:email,skynet.ie:url,gitlab.skynet.ie:helo,gitlab.skynet.ie:rdns,localhost:replyto] X-Rspamd-Server: gir X-Rspamd-Action: no action X-Rspamd-Queue-Id: 69B4C2E20B ``` Seems decent?
silver commented 2023-10-13 10:21:32 +00:00 (Migrated from gitlab.skynet.ie)

mentioned in commit bea98fc9fc

mentioned in commit bea98fc9fcdf2987d027687282f22d5166c5efe0
silver commented 2023-10-13 10:22:36 +00:00 (Migrated from gitlab.skynet.ie)

and anotehr "new email"

X-Spamd-Result: default: False [3.80 / 15.00];
	HFILTER_HOSTNAME_UNKNOWN(2.50)[];
	RDNS_NONE(1.00)[];
	URI_COUNT_ODD(1.00)[1];
	DMARC_POLICY_ALLOW(-0.50)[gitlab.skynet.ie,none];
	RCVD_IN_DNSWL_HI(-0.50)[193.1.99.75:from];
	MV_CASE(0.50)[];
	R_SPF_ALLOW(-0.20)[+a:gitlab.skynet.ie];
	ONCE_RECEIVED(0.10)[];
	MIME_GOOD(-0.10)[multipart/alternative,text/plain];
	ARC_NA(0.00)[];
	ASN(0.00)[asn:1213, ipnet:193.1.0.0/16, country:IE];
	MIME_TRACE(0.00)[0:+,1:+,2:~];
	RCVD_COUNT_ONE(0.00)[1];
	RCPT_COUNT_ONE(0.00)[1];
	R_DKIM_NA(0.00)[];
	RDNS_DNSFAIL(0.00)[];
	FROM_EQ_ENVFROM(0.00)[];
	FROM_HAS_DN(0.00)[];
	TAGGED_RCPT(0.00)[silver];
	REPLYTO_DOM_NEQ_FROM_DOM(0.00)[];
	TO_MATCH_ENVRCPT_ALL(0.00)[];
	TO_DN_NONE(0.00)[];
	RCVD_TLS_LAST(0.00)[];
	HAS_REPLYTO(0.00)[noreply@localhost]
X-Rspamd-Server: gir
X-Rspamd-Action: no action
X-Rspamd-Queue-Id: C5ADF2E5E0
and anotehr "new email" ``` X-Spamd-Result: default: False [3.80 / 15.00]; HFILTER_HOSTNAME_UNKNOWN(2.50)[]; RDNS_NONE(1.00)[]; URI_COUNT_ODD(1.00)[1]; DMARC_POLICY_ALLOW(-0.50)[gitlab.skynet.ie,none]; RCVD_IN_DNSWL_HI(-0.50)[193.1.99.75:from]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+a:gitlab.skynet.ie]; ONCE_RECEIVED(0.10)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ARC_NA(0.00)[]; ASN(0.00)[asn:1213, ipnet:193.1.0.0/16, country:IE]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_ONE(0.00)[1]; RCPT_COUNT_ONE(0.00)[1]; R_DKIM_NA(0.00)[]; RDNS_DNSFAIL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TAGGED_RCPT(0.00)[silver]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_TLS_LAST(0.00)[]; HAS_REPLYTO(0.00)[noreply@localhost] X-Rspamd-Server: gir X-Rspamd-Action: no action X-Rspamd-Queue-Id: C5ADF2E5E0 ```
silver commented 2023-10-13 10:24:41 +00:00 (Migrated from gitlab.skynet.ie)

Overall I am happy with teh current state, not perfect but good enough

Overall I am happy with teh current state, not perfect but good enough
silver (Migrated from gitlab.skynet.ie) closed this issue 2023-10-13 10:24:42 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Skynet/nixos#32
No description provided.