amavisd-release use wrong socketname

Bug #1792293 reported by Oliver
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
amavisd-new (Debian)
Fix Released
Unknown
amavisd-new (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Christian Ehrhardt 
Cosmic
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

 * Debian changed the default path of the amavisd socket and also updated
   some tools defaults (see debian/patches/95_amavisd_helpers_fixes) but
   forgot others like amavisd-release.

 * Fix the expected default path to make the config as installed by
   default work

[Test Case]

 * install amavisd-new
 * run the command (--help is enough, no need to think about arguments too
    much)
   $ amavisd-release --help
     Can't connect to UNIX socket /var/amavis/amavisd.sock: No such file
     or directory at /usr/sbin/amavisd-release line 271.

 * With the fix the socket (at /var/lib/amavis/amavisd.sock) is
   found correctly

[Regression Potential]

 * Formerly the tool was not working, so there isn't a lot to regress with
   the change. It sets a default config that was wrong to one that matches
   the default path - it only affects the release command.
   Only if people manually modified the code the update (as with any
   modification to non conffile) throw away their changes - not a
   regression to stop this IMHO.

[Other Info]

 * n/a

---

In amavisd-release $socketname is set to '/var/amavis/amavisd.sock';
by default.

please fix it to the correct /var/lib/amavis/amavisd.sock

after fixing to /var/lib/amavis/amavisd.sock amavsid-release works again.

we did upgrade from 16.04 LTS ->18.04 LTS before we run into the bug.

Related branches

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Confirmed, code defaults to
  /var/amavis/amavisd.sock
And the socket actually is
  /var/lib/amavis/amavisd.sock

$ amavisd-release --help
Can't connect to UNIX socket /var/amavis/amavisd.sock: No such file or directory at /usr/sbin/amavisd-release line 271.

But should that not be covered by the conffile:
  /etc/amavis/conf.d/25-amavis_helpers:$unix_socketname = "/var/lib/amavis/amavisd.sock";

It even says
  ## Functionality required for amavis helpers like
  ## amavis-release.

The main service reads that config, and I wonder if it might pass it along to the amavisd-release.
One that is more "pearl'y" than me might see that, but no matter how that is supposed to work it won't hurt to fix the default path.

Changed in amavisd-new (Ubuntu):
status: New → Confirmed
tags: added: server-next
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

IMHO debian/patches/95_amavisd_helpers_fixes should fix that but missed amavisd-release.
I added a report to Debian so they can pick it up as well in some time.
For our fix I avoided double patching the same .patch file and added a clean new one.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Changed in amavisd-new (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

This also affects Bionic and I added a bug task for it, but lets complete Cosmic before starting/considering the SRU.

Changed in amavisd-new (Ubuntu Bionic):
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package amavisd-new - 1:2.11.0-1ubuntu2

---------------
amavisd-new (1:2.11.0-1ubuntu2) cosmic; urgency=medium

  * d/p/100_more_amavisd_helpers_fixes: Fix Debian/Ubuntu pathing in
    amavisd-release (LP: #1792293)
  * d/p/105_amavisd_fix_originating_dkim_signing.patch: Fix DKIM signing
    in 2.11.0 (LP: #1770532)

 -- Christian Ehrhardt <email address hidden> Mon, 24 Sep 2018 14:05:01 +0200

Changed in amavisd-new (Ubuntu Cosmic):
status: Triaged → Fix Released
description: updated
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Added SRU template here in the bug
Opened MP for the fix to Bionic => https://code.launchpad.net/~paelzer/ubuntu/+source/amavisd-new/+git/amavisd-new/+merge/356402

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

FYI - This is now in the SRU unapproved queue for Bionic

Changed in amavisd-new (Ubuntu Bionic):
assignee: nobody →  Christian Ehrhardt  (paelzer)
status: Triaged → In Progress
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Oliver, or anyone else affected,

Accepted amavisd-new into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/amavisd-new/1:2.11.0-1ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in amavisd-new (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Before:
root@b:~# amavisd-release --help
Can't connect to UNIX socket /var/amavis/amavisd.sock: No such file or directory at /usr/sbin/amavisd-release line 271.

Update:
After this operation, 1024 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 amavisd-new all 1:2.11.0-1ubuntu1.1 [631 kB]
Fetched 631 kB in 0s (2073 kB/s)
(Reading database ... 29749 files and directories currently installed.)
Preparing to unpack .../amavisd-new_1%3a2.11.0-1ubuntu1.1_all.deb ...
Unpacking amavisd-new (1:2.11.0-1ubuntu1.1) over (1:2.11.0-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-20) ...
Setting up amavisd-new (1:2.11.0-1ubuntu1.1) ...
Creating/updating amavis user account...
Processing triggers for systemd (237-3ubuntu10.3) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...

amavisd-release --help
450 4.5.0 Failure: Invalid mail_id '--help' at (eval 106) line 281, <GEN28> line 4

Well that is fine, I haven't set it up at all yet.
Setting verified

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Changed in amavisd-new (Debian):
status: Unknown → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for amavisd-new has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package amavisd-new - 1:2.11.0-1ubuntu1.1

---------------
amavisd-new (1:2.11.0-1ubuntu1.1) bionic; urgency=medium

  * d/p/100_more_amavisd_helpers_fixes: Fix Debian/Ubuntu pathing in
    amavisd-release (LP: #1792293)
  * d/p/105_amavisd_fix_originating_dkim_signing.patch: Fix DKIM signing
    in 2.11.0 (LP: #1770532)

 -- Christian Ehrhardt <email address hidden> Wed, 10 Oct 2018 13:36:43 +0200

Changed in amavisd-new (Ubuntu Bionic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.