Skip to content

Instantly share code, notes, and snippets.

View palerdot's full-sized avatar
💭
.

Arun Kumar palerdot

💭
.
View GitHub Profile
@palerdot
palerdot / redis-delete-old-keys.py
Created February 27, 2021 10:54 — forked from zioproto/redis-delete-old-keys.py
Delete Redis Stale Keys
#!/usr/bin/env python
import redis
r = redis.StrictRedis(host='localhost', port=6379, db=0)
# To debug code on a single key you can use this instead of the for loops:
# key = r.randomkey()
# Delete all keys not accessed since 'idletime'
for key in r.scan_iter("*"):
idle = r.object("idletime", key)
@palerdot
palerdot / LetsEncrypt+certbot+UFW+postfix+dovecot.md
Created September 18, 2022 03:31 — forked from mrothNET/LetsEncrypt+certbot+UFW+postfix+dovecot.md
Let's Encrypt / Dovecot / Postfix / UFW firewall / Certbot

Let's Encrypt / Dovecot / Postfix / UFW firewall / Certbot

This tutorial describes how to install TLS to a mail server consisting of Postfix and/or Dovecot by using Let's Encrypt certificates with automatic renewing and firewall management.

The system used for this tutorial was:

$ lsb_release -idrc
Distributor ID: Ubuntu