Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect to memcached #218

Open
mattparlane opened this issue Jun 17, 2024 · 3 comments
Open

Can't connect to memcached #218

mattparlane opened this issue Jun 17, 2024 · 3 comments

Comments

@mattparlane
Copy link

Hi all... Not sure if this is a bug, but I'm stumped.

I'm trying to connect opendkim with memcached, but I'm getting the following error:

root@ad66fb76c1d5:~# /usr/sbin/opendkim -x /etc/opendkim.conf -u opendkim -P /var/run/opendkim.pid
opendkim: opendkim-db.c:6433: dkimf_db_walk: Assertion `0' failed.
Aborted (core dumped)

Here are the relevant lines from my opendkim.conf:

KeyTable memcache:localhost/key
SigningTable memcache:localhost/sign

and here is my command line:

/usr/sbin/opendkim -x /etc/opendkim.conf -u opendkim -P /var/run/opendkim.pid

memcached is indeed running and accessible:

root@ad66fb76c1d5:~# telnet localhost 11211
Trying ::1...
Connected to localhost.
Escape character is '^]'.
stats
STAT pid 7
STAT uptime 4018
...

I'm using the Ubuntu distribution of opendkim, and it is compiled with memcache support.

Any ideas? Thanks!

@futatuki
Copy link

The function dkimf_db_walk() don't have the code for db->db_type == DKIMF_DB_TYPE_MEMCACHE.

Function dkimf_db_walk() is used for SigningTable in opendkim.c (opendkim(8)), for KeyTable in opendkim-genzone.c (opendkim-genzone(8)) and opendkim-testkey.c (opendkim-testkey(8)), for ReputationLimits and ReputationLimitModifiers in reputation.c (opendkim(8)), and for ATPS db in opedkim-atpszone.c (opendkim-atpszone(8); obsolete).

So we can't use memecache DB for SigningTable, ReputationLimits and ReputationLimitModifiers datasets, and if we use memcache DB for KeyTable, we cant use opendkim-genzone(8) and opendkim-testkey(8).

@futatuki
Copy link

With the patch in PR #219, opendkim(8) might avoid assertion failure caused by unhandled DB type in dkimf_db_walk(). opendkim(8) would not crash on the verification of SigningTable even if it is memecache, although it is not mean directly that we can use memecached for SigningTable.

@futatuki
Copy link

futatuki commented Oct 3, 2024

Although I've not tested, it is expected that you can use memcached table as Signing Table by using the patch in PR #228 and with suitable config setting or with suitable command option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants