aboutsummaryrefslogtreecommitdiff
path: root/blog
diff options
context:
space:
mode:
authoralex <alex@pdp7.net>2026-02-22 13:05:41 +0100
committeralex <alex@pdp7.net>2026-02-22 13:06:33 +0100
commitf37abef7167e88969350414b42ebf07c1df7f9b1 (patch)
tree931fad4abdea2513254b9f3f984545fa7d8b7058 /blog
parenta8cf2dbfa425057f5b0f625b0f515c1f5cb89f72 (diff)
Move misc linux stuff to blog website
Diffstat (limited to 'blog')
-rw-r--r--blog/content/notes/index.gmi2
-rw-r--r--blog/content/notes/tech/misc_linux_stuff.gmi72
2 files changed, 74 insertions, 0 deletions
diff --git a/blog/content/notes/index.gmi b/blog/content/notes/index.gmi
index fc971e87..a2e2749f 100644
--- a/blog/content/notes/index.gmi
+++ b/blog/content/notes/index.gmi
@@ -10,6 +10,8 @@ Notes about some books I like:
## Tech
+=> tech/misc_linux_stuff Misc Linux stuff
+
### Gadgets
=> tech/gadgets/about-headphones About headphones
diff --git a/blog/content/notes/tech/misc_linux_stuff.gmi b/blog/content/notes/tech/misc_linux_stuff.gmi
new file mode 100644
index 00000000..334b603e
--- /dev/null
+++ b/blog/content/notes/tech/misc_linux_stuff.gmi
@@ -0,0 +1,72 @@
+# Misc Linux stuff
+
+## Reverse sshfs
+
+=> https://blog.dhampir.no/content/reverse-sshfs-mounts-fs-push
+
+You need the SFTP server program on your local machine (on Debian, the openssh-server package) and sshfs on the remote machine.
+
+## Find non-Debian packages
+
+```
+aptitude search '~S ~i !~ODebian'
+```
+
+## Memory usage queries
+
+### systemd
+
+```
+systemd-cgtop -m
+```
+
+Drill down with:
+
+```
+systemd-cgtop -m user.slice/user-1000.slice
+```
+
+### smem
+
+```
+sudo smem -P beam.smp -kta
+```
+
+## Quick rerouting of browser traffic through another host
+
+"ssh -D 1234 host" creates a Socks proxy on localhost:1234 that sends traffic through host.
+
+By enabling "allow extension to control proxy settings" in the multi account containers Firefox add-on, you can make containers use specific proxies.
+
+## Email forwarding via IMAP
+
+When you have multiple email addresses, you have multiple options to use them.
+
+Traditionally, people used redirection/forwarding to make email arriving at from@example.com go to to@example.net instead.
+
+If mail from example.com and example.net is handled by different servers, typically you can configure the example.com mail server to resend any message arriving to the from address to to@example.net.
+
+However, nowadays with spam filtering, the example.net mail server can reject these emails as spam, sometimes silently.
+
+For safer redirects, you can:
+
+* Use the same mail server for both accounts. However, this sometimes cannot be done or has extra cost and complexity.
+
+* Configure the destination email server to fetch email from the origin mail server. For example, Gmail can do this, but the fetching period can be as long as 15 minutes. This can be inconvenient when receiving confirmation emails, etc. Additionally, operators of the destination email server now have your credentials.
+
+A third option is to run this fetching process yourself.
+
+=> https://github.com/lefcha/imapfilter IMAPFilter supports connecting to an IMAP account, waiting until messages to arrive, and moving them to another IMAP account.
+
+Benefits:
+
+* IMAPFilter can use IMAP idle to request the IMAP server to notify when messages arriving, so forwarding happens without a polling delay.
+* Because IMAP is used on both sides, no spam filtering happens.
+* IMAPFilter is packaged for many distributions.
+
+Drawbacks:
+
+* Requires additional infrastructure.
+* If IMAPFilter stops working, email stops being forwarded without warning.
+
+=> https://ñix.es/cgit/alex/alexpdp7.git/tree/scripts/p7s/mail/__init__.py?h=master Refer to this Python module for scripts that configure IMAPFilter as a systemd service, with credentials from Bitwarden.