[Rspamd-Users] dkim signing of non-local domains.

Danjel Jungersen danjel at jungersen.dk
Fri Dec 6 10:41:29 UTC 2024


On 05-12-2024 17:20, Andrew Lewis via Users wrote:
> Hi Danjel,
>
> If you'd enable debug logging for dkim_signing module the logs will
> indicate why messages are selected for signing.
>
> ~~~
> # local.d/logging.inc
> debug_modules = ["dkim_signing"];
> ~~~

Tried that, I got this:
*****
1283:2024-12-06 10:16:19 #326585(normal) <7123ad>; task; 
rspamd_worker_body_handler: accepted connection from 127.0.0.1 port 
43798, task ptr: 00007FF93B6B58A0
1284:2024-12-06 10:16:19 #326585(normal) <7123ad>; task; 
rspamd_message_parse: loaded message; id: 
<f54ab98ff0f7149edba86315a2938e2e at albertslundcykler.dk>; queue-id: 
<03CF610E025C>; size: 688729; checksum: <9843ec44cec76763fd848ae42ce7a296>
1285:2024-12-06 10:16:19 #326585(normal) <7123ad>; task; 
rspamd_mime_part_detect_language: detected part language: da
1286:2024-12-06 10:16:19 #326585(normal) <7123ad>; lua; 
greylist.lua:217: skip greylisting for local networks and/or authorized 
users
1287:2024-12-06 10:16:19 #326585(normal) <7123ad>; task; 
dkim_symbol_callback: skip DKIM checks for local networks and authorized 
users
1288:2024-12-06 10:16:19 #326585(normal) <7123ad>; lua; spf.lua:186: 
skip SPF checks for local networks and authorized users
1289:2024-12-06 10:16:19 #326585(normal) <7123ad>; lua; dmarc.lua:349: 
skip DMARC checks as either SPF or DKIM were not checked
1290:2024-12-06 10:16:19 #326585(normal) <7123ad>; dkim_signing; 
lua_dkim_tools.lua:189: mail is from local address
1291:2024-12-06 10:16:19 #326585(normal) <7123ad>; dkim_signing; 
lua_dkim_tools.lua:405: use domain(header) for signature: 
albertslundcykler.dk
1292:2024-12-06 10:16:19 #326585(normal) <7123ad>; dkim_signing; 
lua_dkim_tools.lua:425: final DKIM domain: albertslundcykler.dk
1293:2024-12-06 10:16:19 #326585(normal) <7123ad>; dkim_signing; 
lua_dkim_tools.lua:512: no selector in map for albertslundcykler.dk
1294:2024-12-06 10:16:19 #326585(normal) <7123ad>; dkim_signing; 
lua_dkim_tools.lua:46: add key 
"/var/lib/rspamd/dkim/$domain.$selector.key" using default path
1295:2024-12-06 10:16:19 #326585(normal) <7123ad>; dkim_signing; 
lua_dkim_tools.lua:51: set selector to "dkim" using default selector
1296:2024-12-06 10:16:19 #326585(normal) <7123ad>; dkim_signing; 
lua_dkim_tools.lua:51: set domain to "albertslundcykler.dk" using 
dkim_domain
1297:2024-12-06 10:16:19 #326585(normal) <7123ad>; dkim_signing; 
dkim_signing.lua:129: using key 
"/var/lib/rspamd/dkim/albertslundcykler.dk.dkim.key", use selector 
"dkim" for domain "albertslundcykler.dk"
1298:2024-12-06 10:16:19 #326585(normal) <7123ad>; task; 
dkim_module_load_key_format: cannot load dkim key 
/var/lib/rspamd/dkim/albertslundcykler.dk.dkim.key: cannot stat key 
file: '/var/lib/rspamd/dkim/albertslundcykler.dk.dkim.key' No such file 
or directory
1299:2024-12-06 10:16:19 #326585(normal) <7123ad>; lua; 
once_received.lua:102: Skipping once_received for authenticated user or 
local network
1300:2024-12-06 10:16:19 #326585(normal) <7123ad>; lua; 
greylist.lua:331: Score too low - skip greylisting
1301:2024-12-06 10:16:19 #326585(normal) <7123ad>; lua; neural.lua:442: 
skip ham sample to keep spam/ham balance; probability 
0.42105263157894735; 11 spam and 18 ham vectors stored
1302:2024-12-06 10:16:19 #326585(normal) <7123ad>; task; 
rspamd_task_write_log: id: 
<f54ab98ff0f7149edba86315a2938e2e at albertslundcykler.dk>, qid: 
<03CF610E025C>, ip: 127.0.0.1, from: <info at albertslundcykler.dk>, 
(default: F (no action): [-0.00/15.00] 
[MIME_GOOD(-0.10){multipart/mixed;text/plain;},RCVD_NO_TLS_LAST(0.10){},BAYES_HAM(-0.00){40.96%;},ARC_NA(0.00){},FORWARDED(0.00){mail at jungersen.dk;},FROM_EQ_ENVFROM(0.00){},FROM_NO_DN(0.00){},HAS_ATTACHMENT(0.00){},MID_RHS_MATCH_FROM(0.00){},MIME_TRACE(0.00){0:+;1:+;2:~;},PREVIOUSLY_DELIVERED(0.00){mail at jungersen.dk;},RCPT_COUNT_ONE(0.00){1;},RCVD_COUNT_SEVEN(0.00){7;},RCVD_VIA_SMTP_AUTH(0.00){},TO_DN_NONE(0.00){}]), 
len: 688729, time: 217.981ms, dns req: 2, digest: 
<9843ec44cec76763fd848ae42ce7a296>, rcpts: <jens-aage at jungersen.dk>, 
mime_rcpts: <mail at jungersen.dk>
1303:2024-12-06 10:16:19 #326585(normal) <7123ad>; task; 
rspamd_protocol_http_reply: regexp statistics: 0 pcre regexps scanned, 2 
regexps matched, 172 regexps total, 61 regexps cached, 0B scanned using 
pcre, 2.93KiB scanned total
*****

It indicates an ip 127.0.0.1, but why?
  - I may have found the answer, see further down...

Received headers from the mail:
*****

Received: from mail.jungersen.dk
	by mail.jungersen.dk with LMTP
	id iB6hEuPAUmeQBwUAtVbJkw
	(envelope-from<info at albertslundcykler.dk>)
	for<jens-aage at jungersen.dk>; Fri, 06 Dec 2024 10:16:19 +0100
Received: by mail.jungersen.dk (Postfix, from userid 5000)
	id 03CF610E025C; Fri,  6 Dec 2024 10:16:18 +0100 (CET)
X-Sieve: Pigeonhole Sieve 0.5.19 (4eae2f79)
X-Sieve-Redirected-From:mail at jungersen.dk
Delivered-To:mail at jungersen.dk
Received: from mail.jungersen.dk
	by mail.jungersen.dk with LMTP
	id JCQwMOLAUmeQBwUAtVbJkw
	(envelope-from<info at albertslundcykler.dk>)
	for<mail at jungersen.dk>; Fri, 06 Dec 2024 10:16:18 +0100
Received: from outscan1.mf.curanet.dk (outscan1.mf.curanet.dk [185.21.42.20])
	by mail.jungersen.dk (Postfix) with ESMTPS id 726B810E01C5
	for<mail at jungersen.dk>; Fri,  6 Dec 2024 10:16:15 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
	by outscan1.mf.curanet.dk (Postfix) with ESMTP id A34AF18038BA
	for<mail at jungersen.dk>; Fri,  6 Dec 2024 10:16:14 +0100 (CET)
Received: from outscan1.mf.curanet.dk ([127.0.0.1])
  by localhost (outscan1.mf.curanet.dk [127.0.0.1]) (amavis, port 10024)
  with ESMTP id vAE4C2qiDXV7 for<mail at jungersen.dk>;
  Fri,  6 Dec 2024 10:16:13 +0100 (CET)
Received: from roundcube.onlinemail.io (webmail.mf.curanet.dk [172.17.149.36])
	by outscan1.mf.curanet.dk (Postfix) with ESMTPSA id A15B51803890
	for<mail at jungersen.dk>; Fri,  6 Dec 2024 10:16:13 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=albertslundcykler.dk; s=onlinemail; t=1733476573;
	bh=yPTrsfwVePUjDLfhfFN+IerYOTwn13EmqVjq2lxlB4Q=;
	h=Date:From:To:Subject:From;
	b=P+3OBP1Hq6XUWFwGLl+Eaf3f41yfxHPNeWolYBPQz20ZG1PgZOa809C42xL9GLpvU
	 e+t6LUmB+JeZ4evb5vWxGPY6GEPLDaljRl/7FeyrOsMcySGEoceVhOWcawPz5EAkTe
	 kmdq/PIs7FKYSAgbUY7TqdnRYdhmFMJ/KTLPaexW1wYsuPbF1Hy15qbDeu1UMuzPkR
	 0zjy9XwLG91qsUFZsuMjTLvu6hXIFr0JTiw6siUnrxIlbKQx2wVllFAHlXXHbxnrgs
	 Ucl7Ekjru9m/oee8c1lY/wgu2E7j1nR7W4hrR/TLEeUiikF+/cMAxJP/9CEpmO1e3y
	 Qj69k6EoiamIQ==
Received: from 188-179-92-2-static.dk.customer.tdc.net ([188.179.92.2])
  by roundcube.onlinemail.io
  with HTTP (HTTP/1.1 POST); Fri, 06 Dec 2024 10:16:13 +0100
*****
As I see it, the 127.0.0.1 is some local chatter at the sending end.
But I just now noticed the "X-Sieve-Redirected-From:mail at jungersen.dk" part.

Can it be because of my sieve script that forward the e-mail frommail at jungersen.dk tojens-aage at jungersen.dk ??

If yes, how do I avoid these errors?

:-)
Danjel


More information about the Users mailing list