rainloop and OpenBSD

📆
🏷
, ,

Update: I have corrected chown www /var/www/data to be chown www /var/www/rainloop/data in getting rainloop ready to rock

  • installing php and php-curl (and unzip)

      pkg_add -i php php-curl unzip
    
  • getting rainloop ready to rock

      mkdir /var/www/rainloop
      unzip ~/rainloop-community-latest.zip -d /var/www/rainloop
      cd /var/www/rainloop
      find . -type d -exec chmod 755 {} \;
      find . -type f -exec chmod 644 {} \;
      chown www /var/www/rainloop/data
    
  • configure php

      ln -s /etc/php-7.0.sample/curl.ini /etc/php-7.0/
    
  • enable php-fpm

      rcctl enable php70_fpm
      rcctl start php70_fpm
    
  • setup httpd

      location "/rainloop/data/*" {
              block
      }
    
      location "/rainloop/*.php*" {
              root { "/rainloop/", strip 1 }
              fastcgi socket "/run/php-fpm.sock"
      }
    
      location "/rainloop/*" {
              root { "/rainloop/", strip 1 }
              directory index "index.php"
      }
    
  • reload httpd and go to https://your.tld/rainloop

      rcctl restart httpd
    

grav CMS on OpenBSD w/ chrooted fpm and nginx

📆
🏷
, ,

Just in case somebody else is getting the cannot resolve getgrav.com error: just copy /etc/resolv.conf into the chroot:

	mkdir /var/www/etc
	cp /etc/resolv.conf /var/www/etc/

And I already feared that I need to create /dev/random and shit like that. Damn it that took too long to find out.

DKIM and OpenBSD

📆
🏷
, , , ,
  • Setting up DKIM key

      touch /etc/ssl/dkim-selector1.xn--ew8hgl.ws.key
      chmod 0640 /etc/ssl/dkim-selector1.xn--ew8hgl.ws.key
      chgrp _dkimproxy /etc/ssl/dkim-selector1.xn--ew8hgl.ws.key
      openssl genrsa -out /etc/ssl/dkim-selector1.xn--ew8hgl.ws.key 2048
      openssl rsa -in /etc/ssl/private/dkim-selector1.xn--ew8hgl.ws.key -pubout -out /etc/ssl/dkim-selector1.xn--ew8hgl.ws.pem
    
  • Setup DNS RR

      selector1._domainkey IN TXT "k=rsa; t=s; p=MHwwDQYJK ... OprwIDAQAB"
    
  • Install dkimproxy

      pkg_add dkimproxy
    
  • configure /etc/dkimproxy_out

  • enable and start dkimproxy_out

      rcctl enable dkimproxy_out
      rcctl start dkimproxy_out
    
  • configure and restart OpenSMTPD

      listen on lo0 port 10028 tag DKIM
      accept tagged DKIM for any relay
      accept from local for any relay via smtp://127.0.0.1:10027
      rcctl restart smtpd