Re: [Mimedefang] reread mimedefang after sa-update

2016-09-14 Thread Richard Laager
On 09/14/2016 11:48 PM, Richard Laager wrote:
> On 09/14/2016 11:12 AM, Marcus Schopen wrote:
>> Am Mittwoch, den 14.09.2016, 11:51 -0400 schrieb Dianne Skoll:
>>> On Wed, 14 Sep 2016 17:46:07 +0200
>>> Marcus Schopen  wrote:
>>>
 Sep 14 17:39:55 scansrv mimedefang-multiplexor[24029]: Cannot destroy
 and recreate a Perl interpreter safely on this platform.  Filter rules
 will NOT be reread.
>>>
>>> Huh!  That is very weird.  I don't get anything like that on Debian Jessie.
>>
>> Hmmm, I get this error on Ubuntu 12.04 LTS too, mimedefang 2.71, perl
>> 5.14.2.
>>
>>> If you get that message, then you'll need to do restart instead of reread.
>>
>> Okay, but this might harm a mail which is in process. Any ideas how to
>> fix above error?
> 
> I'm digging into it right now. The problem seems to be that Perl outputs
> -lpthread as a required LDFLAG, but gcc needs -pthread (with no "l"), or
> else it fails linking to the symbol pthread_setspecific.

So configure.in has a check for this pthread flag, but does not use
$PTHREAD_FLAG as part of the $CFLAGS for the SAFE_EMBED_PERL test. Patch
attached, which results in SAFE_EMBED_PERL set and reread working for me
on Ubuntu 16.04.

The patch is for configure.in. You'll need to either regenerate
configure, or apply the same change to configure.

Thanks for catching this. I just upgraded my mail servers a couple days
ago and I hadn't actually tested the reread operation.

-- 
Richard
--- mimedefang-2.78/configure.in	2015-04-23 09:37:03.0 -0500
+++ mimedefang-2.78-new/configure.in	2016-09-14 23:58:36.713587787 -0500
@@ -343,7 +343,7 @@
AC_MSG_CHECKING([if it is safe to destroy and recreate a Perl interpreter])
LIBS="-lperl $LIBS"
LDFLAGS="$EMBPERLLDFLAGS $LDFLAGS"
-   CFLAGS="$EMBPERLCFLAGS $CFLAGS"
+   CFLAGS="$EMBPERLCFLAGS $CFLAGS $PTHREAD_FLAG"
AC_TRY_RUN([
 #include 
 #include 
___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] reread mimedefang after sa-update

2016-09-14 Thread Richard Laager
On 09/14/2016 11:12 AM, Marcus Schopen wrote:
> Am Mittwoch, den 14.09.2016, 11:51 -0400 schrieb Dianne Skoll:
>> On Wed, 14 Sep 2016 17:46:07 +0200
>> Marcus Schopen  wrote:
>>
>>> Sep 14 17:39:55 scansrv mimedefang-multiplexor[24029]: Cannot destroy
>>> and recreate a Perl interpreter safely on this platform.  Filter rules
>>> will NOT be reread.
>>
>> Huh!  That is very weird.  I don't get anything like that on Debian Jessie.
> 
> Hmmm, I get this error on Ubuntu 12.04 LTS too, mimedefang 2.71, perl
> 5.14.2.
> 
>> If you get that message, then you'll need to do restart instead of reread.
> 
> Okay, but this might harm a mail which is in process. Any ideas how to
> fix above error?

I'm digging into it right now. The problem seems to be that Perl outputs
-lpthread as a required LDFLAG, but gcc needs -pthread (with no "l"), or
else it fails linking to the symbol pthread_setspecific.

Since the SAFE_EMBED_PERL configure test then fails to compile,
MIMEDefang thinks it can't do a reread on this platform.

-- 
Richard
___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] reread mimedefang after sa-update

2016-09-14 Thread Dianne Skoll
On Wed, 14 Sep 2016 20:39:19 +0200
Marcus Schopen  wrote:

> Hmmm, what's the performance loss if not using embedded Perl?

There is some, but it's mostly related to startup costs.  Once things
are running, there's not a huge difference.  Unless you're running a busy
machine (lets say more than 500 000 messages/day) you shouldn't have any
problems disabling embedded Perl.

Regards,

Dianne.
___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] reread mimedefang after sa-update

2016-09-14 Thread Marcus Schopen
Am Mittwoch, den 14.09.2016, 13:08 -0400 schrieb Dianne Skoll:
> On Wed, 14 Sep 2016 18:12:39 +0200
> Marcus Schopen  wrote:
> 
> > Okay, but this might harm a mail which is in process. Any ideas how to
> > fix above error?
> 
> No... no idea.  If you don't use embedded Perl (ie, leave the -E flag off
> of the mimedefang-multiplexor command line) then you will be able to
> use md-mx-ctrl reread.

Hmmm, what's the performance loss if not using embedded Perl?

Ciao
Marcus


___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] reread mimedefang after sa-update

2016-09-14 Thread Dianne Skoll
On Wed, 14 Sep 2016 18:12:39 +0200
Marcus Schopen  wrote:

> Okay, but this might harm a mail which is in process. Any ideas how to
> fix above error?

No... no idea.  If you don't use embedded Perl (ie, leave the -E flag off
of the mimedefang-multiplexor command line) then you will be able to
use md-mx-ctrl reread.

Regards,

Dianne.
___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] reread mimedefang after sa-update

2016-09-14 Thread Marcus Schopen
Am Mittwoch, den 14.09.2016, 11:51 -0400 schrieb Dianne Skoll:
> On Wed, 14 Sep 2016 17:46:07 +0200
> Marcus Schopen  wrote:
> 
> > Sep 14 17:39:55 scansrv mimedefang-multiplexor[24029]: Cannot destroy
> > and recreate a Perl interpreter safely on this platform.  Filter rules
> > will NOT be reread.
> 
> Huh!  That is very weird.  I don't get anything like that on Debian Jessie.

Hmmm, I get this error on Ubuntu 12.04 LTS too, mimedefang 2.71, perl
5.14.2.

> If you get that message, then you'll need to do restart instead of reread.

Okay, but this might harm a mail which is in process. Any ideas how to
fix above error?

Ciao
Marcus


___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] reread mimedefang after sa-update

2016-09-14 Thread Dianne Skoll
On Wed, 14 Sep 2016 17:46:07 +0200
Marcus Schopen  wrote:

> Sep 14 17:39:55 scansrv mimedefang-multiplexor[24029]: Cannot destroy
> and recreate a Perl interpreter safely on this platform.  Filter rules
> will NOT be reread.

Huh!  That is very weird.  I don't get anything like that on Debian Jessie.

If you get that message, then you'll need to do restart instead of reread.

Regards,

Dianne.
___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] reread mimedefang after sa-update

2016-09-14 Thread Marcus Schopen
Am Mittwoch, den 14.09.2016, 09:35 -0400 schrieb Dianne Skoll:
> On Wed, 14 Sep 2016 07:54:50 +0200
> Marcus Schopen  wrote:
> 
> > do I need to reread or reload mimedefang after sa-update e.g. 
> > /etc/cron.daily/spamassassin to get the changes in spamassassin rules
> > recognized by mimedefang?
> 
> Yep.  "md-mx-ctrl reread" is a pretty non-invasive operation, so it's
> quite safe.

Dianne! Thanks.

Then one should add something like "/etc/init.d/mimedefang reread
> /dev/null" to /etc/cron.daily/spamassassin in the section where when
updates are found, right?

/etc/cron.daily/spamassassin:
[...]
# got updates!
su - debian-spamd -c "spamassassin --lint" || die_with_lint
do_compile
reload
# Mimedefang neu laden
/etc/init.d/mimedefang reread > /dev/null
;;
[...]


Btw I get an error on reread, Is this to worried about?

-
Sep 14 17:39:55 scansrv mimedefang-multiplexor[24029]: Cannot destroy
and recreate a Perl interpreter safely on this platform.  Filter rules
will NOT be reread.
Sep 14 17:39:55 scansrv mimedefang-multiplexor[24029]: Re-initialized
embedded Perl interpreter
Sep 14 17:39:55 scansrv mimedefang-multiplexor[24029]: Killing idle
slave 1 (pid 26628): Forcing reread of filter rules
Sep 14 17:39:55 scansrv mimedefang-multiplexor[24029]: Killing idle
slave 0 (pid 26627): Forcing reread of filter rules
Sep 14 17:39:55 scansrv mimedefang-multiplexor[24029]: Reap: slave 0
(pid 26627) exited normally with status 0
Sep 14 17:39:55 scansrv mimedefang-multiplexor[24029]: Slave 0 resource
usage: req=0, scans=0, user=0.004, sys=0.004, nswap=0, majflt=0,
minflt=199, maxrss=36992, bi=0, bo=0
Sep 14 17:39:55 scansrv mimedefang-multiplexor[24029]: Reap: slave 1
(pid 26628) exited normally with status 0
Sep 14 17:39:55 scansrv mimedefang-multiplexor[24029]: Slave 1 resource
usage: req=0, scans=0, user=0.007, sys=0.001, nswap=0, majflt=0,
minflt=199, maxrss=36992, bi=0, bo=0
Sep 14 17:39:58 scansrv mimedefang-multiplexor[24029]: Starting slave 1
(pid 26690) (1 running): Bringing slaves up to minSlaves (2)
Sep 14 17:40:01 scansrv mimedefang-multiplexor[24029]: Starting slave 0
(pid 26715) (2 running): Bringing slaves up to minSlaves (2)
-

System is Ubuntu 14.04 LTS, mimedefang 2.73

Ciao
Marcus


___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] reread mimedefang after sa-update

2016-09-14 Thread Dianne Skoll
On Wed, 14 Sep 2016 07:54:50 +0200
Marcus Schopen  wrote:

> do I need to reread or reload mimedefang after sa-update e.g. 
> /etc/cron.daily/spamassassin to get the changes in spamassassin rules
> recognized by mimedefang?

Yep.  "md-mx-ctrl reread" is a pretty non-invasive operation, so it's
quite safe.

Regards,

Dianne.
___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang