Skip to content

Instantly share code, notes, and snippets.

View martycagas's full-sized avatar

Martin Cagas martycagas

  • Czech Republic
  • 17:37 (UTC +02:00)
View GitHub Profile
@martycagas
martycagas / README.md
Last active November 12, 2023 19:00
A set of Bash scripts to help with migrating user emails from any IMAP server to a Dovecot server

Better dovecot mail download over IMAP

I have certainly violated this xkcd at this point...

A wrapper script around the Dovecot's doveadm backup utility, that interactively downloads emails from another IMAP server.

Useful when the other server does not support master users. If it does, there's a much easier way - it's not needed to download mailboxes per-user and have them enter the password manually. But some really old IMAP servers have no idea of master users and that's why this script exists.

Dependencies

@martycagas
martycagas / dovecot.md
Last active May 3, 2022 16:24
Mail server testing

Testing Dovecot server deployment

  1. dovecot -n prints out all non-default (manually configured) values from across the Dovecot configuration.
  2. systemctl enable --now dovecot to enable and start the Dovecot service. This might give errors, debug as needed.
  3. Use doveadm reload to update the changes in configuration. If it doesn't help, try systemctl restart dovecot.
  4. doveadm user performs a lookup across Dovecot's user databases.
  5. doveadm auth tests authentication for a user.
  6. Start up Thunderbird, try to log into the service as one of the users.
  7. Try sending an email preferably to another company mail address.
  8. Try receiving an email from another company mail address.
@martycagas
martycagas / setup.md
Last active February 23, 2021 01:09
"Embedded" Raspberry Pi Setup

"Embedded" Raspberry Pi Setup Steps

Steps to configure a new Raspbian Lite image to work with my Pi-based embedded projects. This is a documentation of the entire process so that my goldfish brain could remember and reproduce it again in the future. All of these steps (are) will be automated in the setup.sh script soon:tm:.

Both Python 2 and 3 are included as part of Raspbian by default.

1. Change password

passwd
@martycagas
martycagas / hd01.raw.code
Created May 7, 2020 15:59
Huffman tree encoding dictionary
Symbol [0]: 0
Symbol [1]: 110011110
Symbol [2]: 110010101
Symbol [3]: 101010010
Symbol [4]: 1100000011
Symbol [5]: 101001001
Symbol [6]: 110010001
Symbol [7]: 101011110
Symbol [8]: 100001100
Symbol [9]: 1000010101
@martycagas
martycagas / octree.c
Last active December 17, 2019 12:55
Recursive algorithm implementing the processing of a 3-dimensional space using the octree decomposition with OpenMP thread parallelization pragmas.
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
* In jurisdictions that recognize copyright laws, the author or authors
* of this software dedicate any and all copyright interest in the
@martycagas
martycagas / .vimrc
Last active November 12, 2023 18:55
Personal .vimrc file for access via git or curl anywhere, based on the https://vim.wikia.com/wiki/Example_vimrc
" Personal .vimrc file, so far still heavily based one the
" URL: https://vim.wikia.com/wiki/Example_vimrc
" Set 'nocompatible' to ward off unexpected things that your distro might
" have made, as well as sanely reset options when re-sourcing .vimrc
set nocompatible
" Attempt to determine the type of a file based on its name and possibly its
" contents. Use this to allow intelligent auto-indenting for each filetype,
" and for plugins that are filetype specific.
@martycagas
martycagas / card-skimming-2019-05-09.txt
Created May 9, 2019 15:14
ABP-compatible static filter for card-skimming domains loading JavaScript code as reported by Netlab 360
||adirectholdings.com^
||adm.sieger-trophaen.de^
||adventureequipment.com.au^
||alkoholeswiata.com^
||alphathermalsystems.com^
||ameta-anson.com^
||ametagroup.com^
||ametawest.com^
||appliancespareparts.com.au^
||armenianbread.com^