you almost managed to give enough information to troubleshoot... ... except for logs displaying the problem :-)
`smtpd -dv` will provide useful information On Mon, Jan 22, 2018 at 11:40:48PM -0800, Jordan Geoghegan wrote: > Hi all, > > I was hoping someone could point me in the right direction here. I cannot > for the life of me get smptd to start. It always fails when running # rcctl > restart smtpd, or when stopping and starting separately. > > I've been looking to move to OpenSMTP for my mail needs, so I can get my > family and I's mail out of the cloud (yuck). The end goal is to set up a > basic IMAP mail server enabling my family to easily connect from their > various devices. I've been attempting to follow this guide on the OpenSMTP > website: https://www.opensmtpd.org/faq/example1.html > > I have of course RTFM, and I have also tried guides such as this, to no > avail: > > https://frozen-geek.net/openbsd-email-server-1/ > > http://technoquarter.blogspot.ca/ > <https://frozen-geek.net/openbsd-email-server-1/> > > > I feel as if I'm missing something obvious here. > > My config/steps taken are listed below. I have tried this on both i386 bare > metal and on amd64 VM using vmm. Please let me know if a dmesg would be > helpful. The logs show nothing as to why its failing. Any help would be much > appreciated. > > Cheers, > > Jordan Geoghegan > > *My smtpd.conf is as follows (scrubbed of personal info):* > > # pki setup > pki mail.mydomain.ca certificate "/etc/ssl/mail.mydomain.ca.crt" > pki mail.mydomain.ca key "/etc/ssl/private/mail.mydomain.ca.key" > > # tables setup > table aliases file:/etc/mail/aliases > table domains file:/etc/mail/domains > table passwd passwd:/etc/mail/passwd > table virtuals file:/etc/mail/virtuals > > # listen ports setup > listen on lo0 > listen on egress port 25 tls pki mail.mydomain.ca > listen on egress port 587 tls-require pki mail.mydomain.ca auth <passwd> > > > # allow local messages > accept from local for local alias <aliases> deliver to lmtp > "/var/dovecot/lmtp" rcpt-to > # allow virtual domains > accept from any for domain <domains> virtual <virtuals> deliver to lmtp > "/var/dovecot/lmtp" rcpt-to > # allow outgoing mails > accept from local for any relay > > *SSL keys and self signed certs were generated as per man smtpd.conf(5):* > > # openssl genrsa -out /etc/ssl/private/mail.mydomain.ca key 4096 > # openssl req -new -x509 -key > /etc/ssl/private/mail.mydomain.ca.key \ > -out /etc/ssl/mail.mydomain.ca.crt -days 365 > # chmod 600 /etc/ssl/mail.mydomain.ca.crt > # chmod 600 /etc/ssl/private/mail.mydomain.ca.key > > > *I then fill out my /etc/mail/aliases* > > vmail: /dev/null > root: jordan > jordan: jor...@mydomain.ca > > > *and fill /etc/mail/domains with my domain info* > > mydomain.ca > mydomain.com > myotherdomain.ca > myotherdomain.com > > (there's no change if just one or multiple domains listed) > > *And the /etc/mail/passwd info is generated using $ smtpctl encrypt ****(am > I supposed to be using my actual system login password here? I did just to > be sure)*** > jor...@mydomain.ca:$2b$...encrypted...password...:::::: > > *My /etc/mail/virtuals looks like: * > ab...@mydomain.ca jor...@mydomain.ca > postmas...@mydomain.ca jor...@mydomain.ca > webmas...@mydomain.ca jor...@mydomain.ca > jor...@mydomain.ca vmail > > > *Dovecot starts without complaint with this config:* > > > passdb { > args = scheme=blf-crypt /etc/mail/passwd > driver = passwd-file > } > > userdb { > args = uid=vmail gid=vmail home=/var/vmail/%d/%n > driver = static > } > service imap-login { > inet_listener imap { > address = * > port = 143 > } > inet_listener imaps { > address = * > port = 993 > } > } > ~ > > -- Gilles Chehade https://www.poolp.org @poolpOrg