version=pmwiki-2.2.130 ordered=1 urlencoded=1 agent=w3m/0.5.3+git20210102 author=jrmu charset=UTF-8 csum= ctime=1597745143 host=38.87.162.8 name=Openbsd.Dovecot rev=6 targets= text=(:redirect Dovecot.Install:)%0aHere is how I set up dovecot.%0a%0a[@%0a$ doas pkg_add dovecot%0a@]%0a%0aIn /etc/dovecot/dovecot.conf, add these lines at the very bottom:%0a%0a[@%0aservice lmtp {%0a user = vmail%0a}%0a%0a#auth_verbose=yes%0a#auth_debug=yes%0a#auth_debug_passwords=yes%0a#mail_debug=yes%0a#auth_verbose_passwords=sha1%0averbose_ssl=yes%0a@]%0a%0aYou can turn on debugging, verbose ssl, and so forth as you need to help troubleshoot.%0a%0aIn /etc/dovecot/conf.d/10-auth.conf, I make these changes:%0a%0a[@%0a#!include auth-system.conf.ext%0apassdb {%0a args = scheme=blf-crypt /etc/mail/passwd%0a driver = passwd-file%0a}%0a%0auserdb {%0a args = uid=vmail gid=vmail home=/var/vmail/%25d/%25n%0a driver = static%0a}%0a@]%0a%0aComment out auth-system.conf.ext and add the new passdb/userdb conf settings.%0a%0aIn /etc/dovecot/conf.d/10-mail.conf:%0a%0a[@%0amail_location = maildir:/var/vmail/%25d/%25n/Maildir%0a@]%0a%0aIn /etc/dovecot/conf.d/10-ssl.conf, I make these changes:%0a%0a[@%0assl = required %0a...%0assl_cert = %3c/etc/ssl/ircnow.org.fullchain.pem%0assl_key = %3c/etc/ssl/private/ircnow.org.key%0assl_dh_parameters_length = 2048%0a@]%0a%0aAs hinted in the instructions in the dovecot README in /usr/local/share/doc/pkg-readmes/dovecot, you want to add to /etc/login.conf:%0a[@%0adovecot:\%0a :openfiles-cur=4096:\%0a :openfiles-max=8192:\%0a :tc=daemon:%0a@]%0a%0a'''WARNING''': You must use tabs and not spaces. If you use spaces in /etc/login.conf, the settings will '''not''' work.%0a%0a'''NOTE''': Allowing more open files than suggested in the README can help if you have many IP addresses.%0a%0aThen rebuild login.conf.db:%0a%0a[@%0a# [ -f /etc/login.conf.db ] && cap_mkdb /etc/login.conf%0a@]%0a%0a!! Troubleshooting%0a%0a[@%0a$ openssl s_client -starttls imap -connect username.coconut.ircnow.org:143%0a@]%0a time=1626101930 author:1626101930=jrmu diff:1626101930:1612143748:=1d0%0a%3c (:redirect Dovecot.Install:)%0a80c79%0a%3c @]%0a---%0a> @]%0a\ No newline at end of file%0a host:1626101930=38.87.162.8 author:1612143748=jrmu diff:1612143748:1608039656:=73,78d72%0a%3c @]%0a%3c %0a%3c !! Troubleshooting%0a%3c %0a%3c [@%0a%3c $ openssl s_client -starttls imap -connect username.coconut.ircnow.org:143%0a host:1612143748=125.224.24.163 author:1608039656=jrmu diff:1608039656:1604217906:=57c57%0a%3c As hinted in the instructions in the dovecot README in /usr/local/share/doc/pkg-readmes/dovecot, you want to add to /etc/login.conf:%0a---%0a> Follow the instructions in the dovecot README in /usr/local/share/doc/pkg-readmes/dovecot by adding this to /etc/login.conf:%0a60,61c60,61%0a%3c :openfiles-cur=4096:\%0a%3c :openfiles-max=8192:\%0a---%0a> :openfiles-cur=1024:\%0a> :openfiles-max=2048:\%0a66,67d65%0a%3c %0a%3c '''NOTE''': Allowing more open files than suggested in the README can help if you have many IP addresses.%0a host:1608039656=198.251.81.119 author:1604217906=jrmu diff:1604217906:1598605851:=64,65d63%0a%3c %0a%3c '''WARNING''': You must use tabs and not spaces. If you use spaces in /etc/login.conf, the settings will '''not''' work.%0a host:1604217906=198.251.81.119 author:1598605851=jrmu diff:1598605851:1597745143:=55,68d54%0a%3c @]%0a%3c %0a%3c Follow the instructions in the dovecot README in /usr/local/share/doc/pkg-readmes/dovecot by adding this to /etc/login.conf:%0a%3c [@%0a%3c dovecot:\%0a%3c :openfiles-cur=1024:\%0a%3c :openfiles-max=2048:\%0a%3c :tc=daemon:%0a%3c @]%0a%3c %0a%3c Then rebuild login.conf.db:%0a%3c %0a%3c [@%0a%3c # [ -f /etc/login.conf.db ] && cap_mkdb /etc/login.conf%0a host:1598605851=38.81.163.143 author:1597745143=jrmu diff:1597745143:1597745143:=1,55d0%0a%3c Here is how I set up dovecot.%0a%3c %0a%3c [@%0a%3c $ doas pkg_add dovecot%0a%3c @]%0a%3c %0a%3c In /etc/dovecot/dovecot.conf, add these lines at the very bottom:%0a%3c %0a%3c [@%0a%3c service lmtp {%0a%3c user = vmail%0a%3c }%0a%3c %0a%3c #auth_verbose=yes%0a%3c #auth_debug=yes%0a%3c #auth_debug_passwords=yes%0a%3c #mail_debug=yes%0a%3c #auth_verbose_passwords=sha1%0a%3c verbose_ssl=yes%0a%3c @]%0a%3c %0a%3c You can turn on debugging, verbose ssl, and so forth as you need to help troubleshoot.%0a%3c %0a%3c In /etc/dovecot/conf.d/10-auth.conf, I make these changes:%0a%3c %0a%3c [@%0a%3c #!include auth-system.conf.ext%0a%3c passdb {%0a%3c args = scheme=blf-crypt /etc/mail/passwd%0a%3c driver = passwd-file%0a%3c }%0a%3c %0a%3c userdb {%0a%3c args = uid=vmail gid=vmail home=/var/vmail/%25d/%25n%0a%3c driver = static%0a%3c }%0a%3c @]%0a%3c %0a%3c Comment out auth-system.conf.ext and add the new passdb/userdb conf settings.%0a%3c %0a%3c In /etc/dovecot/conf.d/10-mail.conf:%0a%3c %0a%3c [@%0a%3c mail_location = maildir:/var/vmail/%25d/%25n/Maildir%0a%3c @]%0a%3c %0a%3c In /etc/dovecot/conf.d/10-ssl.conf, I make these changes:%0a%3c %0a%3c [@%0a%3c ssl = required %0a%3c ...%0a%3c ssl_cert = %3c/etc/ssl/ircnow.org.fullchain.pem%0a%3c ssl_key = %3c/etc/ssl/private/ircnow.org.key%0a%3c ssl_dh_parameters_length = 2048%0a%3c @]%0a\ No newline at end of file%0a host:1597745143=38.81.163.143