Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 603582 - mail-filter/amavisd-new-2.11.0 - DKIM signing of originating mail stopped working
Summary: mail-filter/amavisd-new-2.11.0 - DKIM signing of originating mail stopped wor...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 3 votes (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2016-12-23 13:58 UTC by gentoo
Modified: 2018-10-05 18:37 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dkim.patch (file_603582.txt,443 bytes, patch)
2018-10-03 20:23 UTC, Ruediger Hahn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description gentoo 2016-12-23 13:58:06 UTC
Using any of the amavisd-new-2.11.0 packages will actually prevent the DKIM signing of massages based on $policy_bank assignment to local messages.

amavisd config (relevant part) same config worked with 2.10 :

$enable_dkim_verification = 1;  # enable DKIM signatures verification
$enable_dkim_signing = 1;    # load DKIM signing code, keys defined by dkim_key
dkim_key('xxx', 'main', 'xxx');

$inet_socket_port = [10024,10026];  # listen on multiple TCP ports
$interface_policy{'10026'} = 'SUBMISSION';

$policy_bank{'SUBMISSION'} = {
  originating => 1,
  }

The result is :

(23155-01) Passed CLEAN {RelayedOpenRelay}, SUBMISSION [XXX]:25832 [XXX] <aaa@bbb> -> <ccc@ddd>, Queue-ID: 8F23A18020E, Message-ID: <9912709B-2372-40FF-9D0A-0AC7508B01FD@bbb>, mail_id: 732K2Zxn38dJ, Hits: -2.899, size: 7856, queued_as: D53B1181FA3, 200 ms

Instead of:
(24730-01) Passed CLEAN {RelayedOutbound}, SUBMISSION LOCAL [xxx]:34941 [xxx] <aaa@bbbt> -> <ccc@ddd>, Queue-ID: 4281C18020E, Message-ID: <5DB29AC6-A487-48FB-91AB-0BD88C572497@bbb>, mail_id: qXqj3D31-FBN, Hits: -2.899, size: 7856, queued_as: 89204181FA9, dkim_new=main:bbb, 193 ms
Comment 1 Marcel Pennewiß 2017-01-20 10:30:46 UTC
Fix is available here:
https://lists.amavis.org/pipermail/amavis-users/2016-July/004428.html

After patching amavisd 2.11.0-r3 everything works as expected.
Comment 2 Dieter Rothacker 2017-03-15 22:41:38 UTC
I've also experienced this bug.

After the update from 2.10.1-x, amavisd-new stops DKIM signing without any real error output (on production log level), so this is quite hard to detect and to debug.

The mentioned patch below also fixed the issue for me.

(In reply to Marcel Pennewiß from comment #1)
> Fix is available here:
> https://lists.amavis.org/pipermail/amavis-users/2016-July/004428.html
> 
> After patching amavisd 2.11.0-r3 everything works as expected.
Comment 3 Jernej Simončič 2017-06-28 20:28:45 UTC
Can we get this patch in portage? I just spent an hour trying to figure out why I wasn't able to set up DKIM signing with amavisd-new until I found the above patch.
Comment 4 Jason Phillips 2018-03-18 21:07:42 UTC
(In reply to Marcel Pennewiß from comment #1)
> Fix is available here:
> https://lists.amavis.org/pipermail/amavis-users/2016-July/004428.html
> 
> After patching amavisd 2.11.0-r3 everything works as expected.

Agreed.

After patching amavisd 2.11.0-r3 per the link above, DKIM signing of mail tagged as originating via a policy bank works as it was previously.
Comment 5 Ruediger Hahn 2018-04-26 15:14:37 UTC
(In reply to Marcel Pennewiß from comment #1)
> Fix is available here:
> https://lists.amavis.org/pipermail/amavis-users/2016-July/004428.html
> 
> After patching amavisd 2.11.0-r3 everything works as expected.

Same here! I also spent about one hour to find out why Amavis isn't DKIM signing any more.

The above patch fixed my problem with amavisd-new-2.11.0-r3. So if there is anybody responsible, it would be fine if this patch would find its way into the portage tree :)
Comment 6 Ralph Seichter 2018-09-20 12:15:44 UTC
I have also patched amavisd-new locally due to this bug, and I would appreciate having a patch integrated in a Gentoo ebuild, especially given that the last official release of amavisd-new was almost two years ago and I don't remember hearing from Mark Martinec ever since.
Comment 7 Ralf Glauberman 2018-10-03 15:51:51 UTC
Same problem here. Local patch works but finding the bug and patch takes quite some time so please include the patch in the ebuild.
Comment 8 Ruediger Hahn 2018-10-03 20:23:06 UTC
Created attachment 549204 [details, diff]
dkim.patch

All you guys only spent one hour to solve this issue? I must admit that I needed at least two hours - or was it three?
At the end I put the attached patch into the directory

/etc/portage/patches/mail-filter/amavisd-new-2.11.0-r3/

Having this in the portage tree would be very helpful!
Comment 9 Ralph Seichter 2018-10-04 12:40:38 UTC
I created a pull request for an updated ebuild that contains the patch.
Comment 10 Larry the Git Cow gentoo-dev 2018-10-05 04:24:54 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c056ed59671c776f39ce1360a6a1b0fb0f16b900

commit c056ed59671c776f39ce1360a6a1b0fb0f16b900
Author:     Ralph Seichter <github@seichter.de>
AuthorDate: 2018-10-05 04:23:32 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2018-10-05 04:23:32 +0000

    mail-filter/amavisd-new: DKIM signing bugfix
    
    amavisd-new version 2.11.0 introduced a bug which breaks DKIM signing
    for outbound mail. This ebuild adds a patch which fixes the issue.
    
    Closes: https://bugs.gentoo.org/603582
    Signed-off-by: Ralph Seichter <gentoo@seichter.de>
    Closes: https://github.com/gentoo/gentoo/pull/10058
    Package-Manager: Portage-2.3.49, Repoman-2.3.10
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 .../amavisd-new/amavisd-new-2.11.0-r4.ebuild       | 184 +++++++++++++++++++++
 .../amavisd-new/files/amavisd-2.11.0-dkim.patch    |  12 ++
 2 files changed, 196 insertions(+)
Comment 11 Ralph Seichter 2018-10-05 18:37:02 UTC
The new ebuild is now available in the stable branch. To use it, you
need to add "mail-filter/amavisd-new ~amd64" to your package masks.