the patch below (and some minor tweaks in the config through growing
insight) fixes the problem for me:
Index: table_api.c
===================================================================
RCS file: /cvs/src/usr.sbin/smtpd/table_api.c,v
retrieving revision 1.4
diff -u -p -u -r1.4 table_api.c
--- table_api.c 4 Feb 2014 13:55:34 -0000 1.4
+++ table_api.c 5 Jul 2014 06:48:04 -0000
@@ -108,6 +108,7 @@ table_msg_dispatch(void)
char res[4096];
int type, r;
+ bzero(res, sizeof(res));
switch (imsg.hdr.type) {
case PROC_TABLE_OPEN:
table_msg_get(&op, sizeof op);
On 07/04/14 00:45, Martijn van Duren wrote:
Hello misc,
I'm currently trying to expand my setup by using sqlite as a backend so
I can have one place to manage passwords in conjunction with dovecot.
When setting up this system with a normal user it works perfectly, but
when add an extra alias to an e-mail address it gets stuck in an
infinite loop. In this loop it looks like the prior found addresses are
being kept in the lookup list.
My configuration is as follow:
sqlite> .schema
CREATE TABLE user (
email VARCHAR(128) NOT NULL UNIQUE,
name VARCHAR(128) NOT NULL PRIMARY KEY,
password VARCHAR(128) NOT NULL,
home VARCHAR(256) NOT NULL,
uid INTEGER NOT NULL,
gid INTEGER NOT NULL
);
CREATE TABLE alias (
name VARCHAR(128) NOT NULL,
email VARCHAR(128) NOT NULL
);
CREATE INDEX alias_email ON alias(email);
sqlite> SELECT * FROM alias;
[email protected]|[email protected]
martijn|[email protected]
[email protected]|[email protected]
sqlite> SELECT * FROM user;
[email protected]|martijn|$2a$06$*********|/home/martijn|1000|1000
$ cat /etc/mail/smtpd.conf
# $OpenBSD: smtpd.conf,v 1.4 2012/07/16 05:56:16 jmc Exp $
# This is the smtpd server system-wide configuration file.
# See smtpd.conf(5) for more information.
pki domain.tld certificate "/etc/ssl/domain.tld.crt"
pki domain.tld key "/etc/ssl/private/domain.tld.key"
table authdb sqlite:/etc/mail/auth.conf
listen on egress tls pki domain.tld auth-optional <authdb> hostname
"domain.tld"
listen on egress port submission tls-require pki domain.tld auth
<authdb> hostname "domain.tld"
# Email addresses
table aliases db:/etc/mail/aliases.db
# Relay credentials
table secrets file:/etc/mail/secrets
accept for local alias <aliases> deliver to mbox
accept from any for domain "domain.tld" virtual <authdb> deliver to
maildir "%{user.directory}/Maildir/%{rcpt.domain}/%{rcpt.user:strip}"
accept for any relay via tls+auth://[email protected]:587 auth
<secrets>
$ cat /etc/mail/auth.conf
dbpath /etc/mail/auth.db
query_credentials SELECT email, password FROM user WHERE email=?;
query_userinfo SELECT uid, gid, home AS directory FROM user WHERE name=?;
query_alias SELECT name FROM alias WHERE email=?;
I've attached the debug output as captured with smtpd -vd -T all.
Hopefully someone can help me with this problem.
Thanks in advance.
Sincerely,
Martijn van Duren
--
You received this mail because you are subscribed to [email protected]
To unsubscribe, send a mail to: [email protected]