Skip to content

Instantly share code, notes, and snippets.

Create mailcow db backups

First you need to modify the table mailcow. Mailcow-dockerized adds three and moves two existing columns in the table mailbox. The columns tls_enforce_in and tls_enforce_out get moved two rows up (behind domain). The columns key, multiple_bookings and wants_tagged_subject need to be added after tls_enforce_out.

It should look like this:

MariaDB [mailcow]> desc mailbox;
+----------------------+--------------+------+-----+-------------------+-----------------------------+
| Field                | Type         | Null | Key | Default           | Extra                       |
@broedli
broedli / dehydrated.md
Last active December 20, 2021 14:10
tut on dehydrated

Installing dehydrated for Let's Encrypt certificates

This tutorial will show you how to install the Let's Encrypt ACME client dehydrated.

Installing dehydrated

To install dehydrated we simply clone it's repository:

git clone https://github.com/lukas2511/dehydrated.git /opt/dehydrated
@broedli
broedli / aa.md
Last active March 26, 2016 21:05

This describes my process of setting up a standard debian minimal installation to my needs and preferences.

apt-get update && apt-get upgrade

-[x] Secure SSH

Please refer to my snippets - SSH. Note: Don't forget to restart sshd and to test your setup before you disconnect your current SSH session:

systemctl restart ssh.service
@broedli
broedli / README.md
Last active January 3, 2017 03:16
Taking ZSH configuration files to SSH host

To automate a seemles terminal experience over an SSH session I do this:

~/.ssh/config:
--------------
Host *
   PermitLocalCommand yes 
   LocalCommand tar c -C${HOME} .config/zsh .zshrc .vim .vimrc .tmux.conf \
               | ssh -o PermitLocalCommand=no %n "tar mx -C${HOME} ; chsh -s /bin/zsh"
@broedli
broedli / publickey-git-error.markdown
Created March 11, 2016 14:34 — forked from adamjohnson/publickey-git-error.markdown
Fix "Permission denied (publickey)" error when pushing with Git

"Help, I keep getting a 'Permission Denied (publickey)' error when I push!"

This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:

  1. Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any *nix based command prompt (but not the default Windows Command Prompt!)
  2. Type cd ~/.ssh. This will take you to the root directory for Git (Likely C:\Users\[YOUR-USER-NAME]\.ssh\ on Windows)
  3. Within the .ssh folder, there should be these two files: id_rsa and id_rsa.pub. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Type ls to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be named id_rsa and id_rsa.pub in order for Git, GitHub, and BitBucket to recognize them by default.
  4. To create the SSH keys, type ssh-keygen -t rsa -C "[email protected]". Th
@broedli
broedli / mango.vim
Last active March 9, 2016 04:35
Modified themes for VIM
" /usr/share/vim/vimfiles/colors/mango.vim
" Vim color file -- Mango
" Maintainer: Josh Perez <[email protected]>
" Version: 1.5.1
" mango.vim {{{
set t_Co=256
let g:colors_name = "mango"
let bgcolor = &background
highlight clear SignColumn
@broedli
broedli / 00-wiki-sshd.md
Last active January 27, 2024 03:57
SSHD configuration

This is my standard SSH setup based on stribika.github.io.

1. Secure moduli

awk '$5 > 2000' /etc/ssh/moduli > "$HOME/moduli"
# Make sure there is something left
wc -l "$HOME/moduli"
mv /etc/ssh/moduli /etc/ssh/moduli.bak
mv "$HOME/moduli" /etc/ssh/moduli
@broedli
broedli / own-agnosta-dark.zsh
Last active March 9, 2016 04:30
Modified agnosta theme for ZSH
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
#