Hello.

I'm attempting to use OpenSMTPD for MTA/submission backed on to DBMail for storage/client access. The intent is for everything to use SQLite.

Unfortunately, when I try initiating an SMTP session, I get 450 - temporarily unavailable from OpenSMTPD on MAIL TO.

Can anyone offer tips on how to debug this? I'm running OpenSMTPD 5.4.2p1 with -dv. I see that it errors and closes the session, but I don't see an explanation.

I'm trying to do all my authentication, domain table storage, etc. in DBMail. Here's what I have, mostly cobbled together from blog posts, gists and trial-and-error. Feel free to point me to documentation on this if I've missed it:

sqlite.conf

dbpath /var/lib/dbmail/dbmail.db
# query_alias select alias from alias where user=?;
query_domain select distinct substr(alias, instr(alias, '@')+1) as domain from dbmail_aliases where domain = ?; # query_userinfo select uid,gid,home from users where username = ? and active="Y";
query_credentials select userid, passwd from dbmail_users where userid = ?;

smtpd.conf

table domains sqlite:/usr/local/etc/sqlite.conf
# table sqlaliases sqlite:/usr/local/etc/sqlite.conf
table users sqlite:/usr/local/etc/sqlite.conf

pki thewordnerd.info certificate "/etc/ssl/certs/mail.crt"
pki thewordnerd.info key "/etc/ssl/private/mail.key"

listen on "0.0.0.0" secure pki thewordnerd.info auth-optional

accept from any for domain <domains> userbase <users> deliver to lmtp "lmtp:24"
accept for any relay

query_credentials returns a username and password. query_domain returns the domain itself. I left userinfo unset because I'm trying to bypass system accounts and storage altogether and store directly to the DB, but maybe I do need to return something? Similar with alias; DBMail lets you create a user account with a password then associate multiple email addresses to that account, so I'm not sure I need the aliases but I might be wrong.

Basically I want OpenSMTPD to pass all incoming mail to the LMTP server running at lmtp:24. If it wants to check for user validity that's fine, but I'm deferring that to DBMail's LMTP server which will do all of those things anyway.

Am I doing anything obviously wrong? Is there any way to make OpenSMTPD output its SQL queries so I can see what it's running, what it gets back, and why I might be getting this 450?

Thanks.

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

Reply via email to