Hi,

I've been using opensmtpd for a few weeks for my personal e-mails, and
it's been working well. At work we usually install postfix +
postfixadmin + dovecot for our clients, but I've decided to try and
replace postfix with opensmtpd. I am also trying to replace postfixadmin
with vimbadmin, but that shouldn't really be relevant to my problem.

With my current setup, I get a 550 invalid recipient when I try to send
an e-mail to an existing account on the server, and I can't figure out a
way to debug the MySQL backend. Here are the configurations :

cat /etc/smtpd-mysql.conf

host        localhost
username    user
password    pass
database    vimbadmin

# Alias lookup query
#
# rows   >= 0
# fields == 1 (user varchar)
#
query_alias        SELECT goto AS user FROM alias WHERE address =? AND
active = '1';

# Domain lookup query
#
# rows   == 1
# fields == 1 (domain varchar)
#
query_domain        SELECT domain FROM domain WHERE domain =? AND
backupmx = '0' AND active = '1';

# User lookup query
#
# rows   == 1
# fields == 3 (uid int, gid int, directory varchar)
#
query_userinfo        SELECT uid, gid, homedir FROM mailbox WHERE
username =? AND active = '1';

# Credentials lookup query
#
# rows   == 1
# fields == 2 (username varchar, password varchar)
#
query_credentials    SELECT username, password FROM mailbox WHERE
username =? AND active = '1';



cat /etc/smtpd.conf

listen on localhost

table vusers mysql:/etc/smtpd-mysql.conf
table vdomains mysql:/etc/smtpd-mysql.conf
table aliases mysql:/etc/smtpd-mysql.conf

accept from any for domain <vdomains> virtual <vusers> deliver to mda
"/usr/lib/dovecot/dovecot-lda -f %{sender} -d %{dest}"
accept from local for any relay


I have changed the SQL queries according to the database, but even when
I enable the global MySQL logs, I don't get the queries logged (Only the
prepare queries when I start smtpd). So I have no idea what queries
opensmtpd is actually sending (or what results it gets), and when I run
it in debug mode I don't get much informations :

smtp-in: session 193a8b1376aabfb1: connection from host localhost
[IPv6:::1] established
debug: aliases_virtual_get: '[email protected]' resolved to 1 nodes
debug: aliases_virtual_get: '[email protected]' resolved to 1 nodes
debug: aliases_virtual_get: '[email protected]' resolved to 1 nodes
debug: aliases_virtual_get: '[email protected]' resolved to 1 nodes
debug: aliases_virtual_get: '[email protected]' resolved to 1 nodes
debug: aliases_virtual_get: '[email protected]' resolved to 1 nodes
debug: aliases_virtual_get: '[email protected]' resolved to 1 nodes
debug: aliases_virtual_get: '[email protected]' resolved to 1 nodes
debug: aliases_virtual_get: '[email protected]' resolved to 1 nodes
debug: aliases_virtual_get: '[email protected]' resolved to 1 nodes
smtp-in: session 193a8b1376aabfb1: received invalid command: "RCPT TO:
<[email protected]>"

I'm guessing the result aren't formatted like opensmtpd is expecting
them (since it's more targeted at dovecot and postfix), but I can't
figure out what is wrong.
Thanks !

Regards,
Kevin Lemonnier

-- 
You received this mail because you are subscribed to [email protected]
To unsubscribe, send a mail to: [email protected]

Reply via email to