Created attachment 651704 [details] emerge --info The latest upgrade for mail-filter/amavisd-new (version 2.12.0-r3) changes the directory "/var/amavis/quarantine" to a file. Prior to 2.12.0-r3, /var/amavis/quarantine was a folder that contained individually banned or SPAM tagged and filtered emails, but with 2.12.0-r3 it is changed from a folder to a just a single file with the same name (/var/amavis/quarantine). According to Patrick Ben Koetter <p@sys4.de> in reply to my support inquiry to the amavis-users@amavis.org mailing list, /var/amavis/quarantine should still be a folder in 2.12.0-r3. Downgrading and reverting to version 2.11.1-r3 restores the old behavior and /var/amavis/quarantine becomes a folder again with filtered SPAM tagged and banned email files in it. Patrick Ben Koetter <p@sys4.de> suggests that perhaps Ralph can shed some light on it in case something got lost/changed in the process of packaging amavisd-new for Gentoo. Thanks
I can't reproduce this. The relevant lines in the ebuild are as follows: L076: AMAVIS_ROOT="/var/lib/amavishome" L152: keepdir "${AMAVIS_ROOT}"/{,db,quarantine,tmp,var} You speak of /var/amavis, but the ebuild acts on /var/lib/amavishome.
As of latest amavisd-new, /var/amavis is moved to /var/lib/amavishome, so /var/amavis/quarantine is unused.
I thought that's what I wrote? 😉 However, it may be worth mentioning that /var/amavis can of course be used, if the user's indiviual /etc/amavisd.conf is set up accordingly.
I unmasked 2.12.0-r3 and re-emerged mail-filter/amavisd-new and let the new /etc/amavisd.conf file completely overwrite my old config. I also issued this command that I didn't perform initially: cp -a /var/amavis/* /var/amavis/.??* /var/lib/amavishome/ && rm /var/amavis I had a fairly customized /etc/amavisd.conf but hadn't defined /var/amavis as $MYHOME in the config file. I did have to change it in the new file to /var/lib/amavishome as this default line is still in the default install config: Default remarked line in a fresh 2.12.0-r3 install: # $MYHOME = '/var/amavis'; # a convenient default for other settings, -H I changed it to this instead: $MYHOME = '/var/lib/amavishome'; # a convenient default for other settings, -H I re-customized my amavisd.conf file to filter certain file extensions and to work with ClamAV. The Eicar signature and GTUBE SPAM emails are caught and filtered with the proper notification. Only issue I have now is when I try to release a banned email with amavisd-release I get this error: Can't connect to UNIX socket /var/amavis/amavisd.sock: No such file or directory at /usr/sbin/amavisd-release line 271. Line 90 of /usr/sbin/amavisd-release still uses /var/amavis instead of /var/lib/amavishome: $socketname = '/var/amavis/amavisd.sock'; Perhaps the default should be changed to /var/lib/amavishome ? I changed it and then amavisd-release worked fine.
The $MYHOME variable is not set in the upstream amavisd.conf[1] either, it only exists as a comment. The ebuild just leaves this as it is; this is not a bug. If you think it a good idea to provide a value on Gentoo hosts, you can file a separate enhancement request. [1] https://gitlab.com/amavis/amavis/-/blob/master/conf/amavisd.conf#L25 Regarding amavisd-release: Looks like you forgot to properly configure it. Details are available in the file's comments. I cannot reproduce the bug you reported, and the additional issues are not bugs in the ebuild, I'm closing this ticket.
I think we should add a note about setting $MYHOME. Before, it just worked because we used /var/amavis as upstream did, so no configuration was needed. Now if you upgrade to 2.12 and migrate to /var/lib/amavishome you won't be able to start amavisd-new. --- amavisd-new-2.12.0-r3.ebuild 2020-07-18 18:09:06.000000000 +0000 +++ amavisd-new-2.12.0-r3.ebuild 2020-07-31 07:56:02.567465567 +0000 @@ -199,5 +199,6 @@ elog elog " cp -a ${d}/* ${d}/.??* ${AMAVIS_ROOT}/ && rm -r ${d}" elog + elog "Please adjust $MYHOME in /etc/amavisd.conf and point it to ${AMAVIS_ROOT}." fi }
(In reply to Tomáš Mózes from comment #6) > I think we should add a note about setting $MYHOME. Before, it just worked > because we used /var/amavis as upstream did, so no configuration was needed. > Now if you upgrade to 2.12 and migrate to /var/lib/amavishome you won't be > able to start amavisd-new. > > --- amavisd-new-2.12.0-r3.ebuild 2020-07-18 18:09:06.000000000 +0000 > +++ amavisd-new-2.12.0-r3.ebuild 2020-07-31 07:56:02.567465567 +0000 > @@ -199,5 +199,6 @@ > elog > elog " cp -a ${d}/* ${d}/.??* ${AMAVIS_ROOT}/ && rm -r ${d}" > elog > + elog "Please adjust $MYHOME in /etc/amavisd.conf and point > it to ${AMAVIS_ROOT}." > fi > } \$MYHOME
(In reply to Tomáš Mózes from comment #6) > I think we should add a note about setting $MYHOME. a) This only affects new installations. Existing setups using /var/amavis will continue to work when upgrading. b) Fresh Amavis setups are not expected to run "out of the box", not even upstream. Adjusting /etc/amavis.conf is always required. c) elog would not be the proper way to do it anyway; this would be a use case for the readme.gentoo-r1 class. I'll consider uncommenting $MYHOME if the need for an ebuild update arises in the future. That looks like the most helpful possible change to me.
(In reply to Ralph Seichter from comment #8) > (In reply to Tomáš Mózes from comment #6) > > > I think we should add a note about setting $MYHOME. > > a) This only affects new installations. Existing setups using /var/amavis > will continue to work when upgrading. I've upgraded from previous version to 2.12 and amavisd-new failed to run for me as I had $MYHOME commented (the default). After setting it to /var/lib/amavishome it runs fine. > > b) Fresh Amavis setups are not expected to run "out of the box", not even > upstream. Adjusting /etc/amavis.conf is always required. I meant that $MYHOME was previously untouched and amavisd-new worked without settings it, of course that the other parts needed to be configured. > > c) elog would not be the proper way to do it anyway; this would be a use > case for the readme.gentoo-r1 class. It's specific to this upgrade, so it'd mostly help just now. > > I'll consider uncommenting $MYHOME if the need for an ebuild update arises > in the future. That looks like the most helpful possible change to me.
It's my understanding that the move from /var/amavis to /var/lib/amavishome was a Gentoo specific change. I'm not sure what the impetus for this change was, but it would be helpful if anything that used to point to /var/amavis, even the remarked lines, would be changed to point to the correct folder to avoid any confusion. Line 90 of amavisd-release is an unremarked line that points to the wrong folder and prevents it from running at all. It would also be helpful to change this to the correct folder so it works after a new install as it used to when /var/amavis was used instead of /var/lib/amavishome.
(In reply to Perdignus from comment #11) > It's my understanding that the move from /var/amavis to /var/lib/amavishome was a Gentoo specific change. I'm not sure what the impetus for this change was [...] That has been discussed at length in the Gentoo mailing lists, and if you are interested, I suggest consulting the archives. Not that it is very interesting from an end-user perspective. > Line 90 of amavisd-release is an unremarked line that points to the wrong folder and prevents it from running at all. Like I wrote, amavisd-release needs to be configured, and the comment header in that very file describes how that is done. If a previous /etc/amavisd.conf exists, it will likely use /var/amavis. This config file is protected, i.e. it will not be automatically overwritten during an update. amavisd-release however, like all binaries, *will* be overwritten. I cannot change the socket definition in amavisd-release without changing the protedted amavisd.conf (which I can't enforce), so in order not to break existing configurations, the ebuild works as it does now. It may not look like much, but considerable thought has been invested in this subject. I don't want to discourage discussion, but I am convinced the ebuild should remain as it is. All it takes is for the user to pay a little attention to his amavisd.conf.
(In reply to Ralph Seichter from comment #12) > > That has been discussed at length in the Gentoo mailing lists, and if you > are interested, I suggest consulting the archives. Not that it is very > interesting from an end-user perspective. > Sorry, I must have missed the previous discussions on this topic and when I didn't get any responses to my initial post in the Gentoo support forums. No worries though, I'm good to go now, definitely not a bug. Thanks for your help and insight on the issue Ralph a Tomáš! :)
ran in this issue today and want to share my experiences with version 2.12.0-r5. 1) on a fresh install i have to set $MYHOME = '/var/lib/amavishome'; in /etc/amavisd.conf or its crashing on startup. 2) when updating and running the suggested command cp -a /var/amavis/* /var/amavis/.??* /var/lib/amavishome/ && rm -r /var/amavis i also have to set $MYHOME = '/var/lib/amavishome'; 3) when updating and running cp -a /var/amavis/* /var/amavis/.??* /var/lib/amavishome/ (without deleting /var/amavis) amavis is running and does not crash. i think upgrading is not ideal and a note that $MYHOME must be set in postinstall notes would prevent some headaches ;)