Re: Lua issues

From: Murray S. Kucherawy <msk_at_blackops.org>
Date: Tue, 6 Oct 2015 00:18:47 -0700 (PDT)

On Tue, 25 Aug 2015, Iosif Fettich wrote:
> a) as presented, opendkim exits with segmentation fault at launchtime when
> /etc/opendkim.conf says
>
> #SetupPolicyScript /etc/opendkim/setup_dont_spoof_localusers.lua
> ScreenPolicyScript /etc/opendkim/setup_dont_spoof_localusers.lua
>
> but starts OK if the conf file says
>
> SetupPolicyScript /etc/opendkim/setup_dont_spoof_localusers.lua
> #ScreenPolicyScript /etc/opendkim/setup_dont_spoof_localusers.lua
>
> Why would that be...?!

For one thing, the odkim.internal_ip() function is not available to any
script other than the setup script. I can't remember why that's so, but
thats how it is in the current version. I can't think of a good reason to
leave it that way though. I'll add it to all of them for the next
release.

I couldn't get this to segfault with a build of 2.10.3 just now, at least
not in test mode (i.e., "opendkim -n -x path-to-config"). When you try
that, do you still get the segmentation fault, or does it have to run and
receive a message for that to happen?

> b) even when starting OK, as SetupPolicyScript, the script will report "LUA
> error... NO DOMAINS defined?" in the logfile, as long as I'm trying to use
>
> domains_to_sign_for = odkim.get_dbhandle(ctx, DB_DOMAINS);

That returns the set of domains defined by the "Domain" line in your
configuration file, if you have one. If you're doing the more modern
KeyTable/SigningTable combination, then this set will always be empty or
not exist.

-MSK
Received on Tue Oct 06 2015 - 07:19:03 PST

This archive was generated by hypermail 2.3.0 : Tue Oct 06 2015 - 07:27:01 PST