Skip to content

Instantly share code, notes, and snippets.

View mjf's full-sized avatar

Matouš Jan Fialka mjf

View GitHub Profile
@mjf
mjf / 💀.conf
Last active January 10, 2023 15:09
💀
#! /usr/sbin/nft -f
# 💀 aka "absolute" firewall for Linux
flush ruleset
table netdev netdev_rules {
chain netdev_filter_ingress_device_lo {
type filter hook ingress device lo priority 0
policy drop
@mjf
mjf / Add_Custom_Local_Parameters_for_Zimbra_Postfix_Configuration.md
Last active November 28, 2022 10:24
Add Custom Local Parameters for Zimbra Postfix Configuration

Add Custom Local Parameters for Zimbra Postfix Configuration

We will add two custom local parameters:

  • sender_bcc_maps
  • recipient_bcc_maps

so that we could define our own per-user Bcc: forwarding for all users in a domain (also see this Gist to know more generally about how to configure it for Postfix).

@mjf
mjf / Enable_BCC_Forwarding_For_All_Domain_Users.md
Created November 28, 2022 07:47
Enable BCC Forwarding For All Domain Users

Enable BCC Forwarding For All Domain Users

# /etc/postfix/main.cf
sender_bcc_maps    = pcre:/etc/postfix/domain_users_bcc_maps
recipient_bcc_maps = pcre:/etc/postfix/domain_users_bcc_maps
# /etc/postfix/domain_users_bcc_maps
@mjf
mjf / online-interface-rename-systemd-networkd-udevd.md
Last active November 28, 2022 10:09
Online rename interface with Systemd Networkd and Udevd

Online rename interface with Systemd Networkd

  1. create .link file in for the interface to rename it to a name of choice:

    [Match]
    OriginalName=*
    MACAddress=<mac-address>
    

[Link]

@mjf
mjf / zimbra-9.0.0.bugfixes.md
Last active April 14, 2023 10:27
Fix Zimbra 9.0.0 GA 4325 for RHEL8 x86_64 20220629074359 NETWORK edition, Patch 9.0.0_P28-32 issues

Zimbra 9.0.0 GA 4325 Patch 28-32 Bugfixes

cat /etc/os-release
NAME="Rocky Linux"
VERSION="8.7 (Green Obsidian)"
@mjf
mjf / postgres_emergency_vacuum_full_if_not_enough_space_is_left.md
Last active September 16, 2022 09:29
[Postgres] Reclaiming space from bloated table without enough space left

Reclaiming space from bloated table without enough space left

The vacuum full needs two-times the table size to perform on it because it first makes full physical copy of the table. If you are running out of space and in need of reclaiming the space occupated by dead tuples from a bloated database table but you can not because of lacking free space in the table's namespace here is how you can work around that (assuming you some additional disk space resources can be added to the server). It is also the least disruptive method of doing it (in comparison to the obvious dump and restore et cetera).

@mjf
mjf / postgres_ml_discussions.md
Last active September 15, 2022 11:12
Postgres ML discussions
@mjf
mjf / rust_blogs.md
Created September 7, 2022 08:51
Rust Language Related Blogs
@mjf
mjf / WTF [Zimbra].md
Created August 30, 2022 06:49
WTF [Zimbra]

3x run?! One rights after another?!

zimbra@zimbra:~$ zmprov modifyConfig zimbraMtaMaxMessageSize 1073741824
/opt/zimbra/bin/zmjava: line 59: /bin/java: No such file or directory
zimbra@zimbra:~$ zmprov modifyConfig zimbraMtaMaxMessageSize 1073741824
Killed
zimbra@zimbra:~$ zmprov modifyConfig zimbraMtaMaxMessageSize 1073741824