Skip to content

Instantly share code, notes, and snippets.

View fvigotti's full-sized avatar
😊
Working hard

Francesco fvigotti

😊
Working hard
View GitHub Profile
@zmwangx
zmwangx / Postfix: sender-dependent SASL authentication.md
Last active April 15, 2024 06:34
Postfix: sender-dependent SASL authentication — relay to multiple SMTP hosts, or relay to the same host but authenticate as different users (e.g., two Gmail accounts)

This is a sequel to "Postfix: relay to authenticated SMTP".

I would like to send mail from two different Gmail accounts using Postfix. Here is the relevant section in the Postfix documentation: Configuring Sender-Dependent SASL authentication.

As a concrete example, here's how to set up two Gmail accounts (only relevant sections of the config files are listed below):

/etc/postfix/main.cf:
    # sender-dependent sasl authentication
    smtp_sender_dependent_authentication = yes

sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay

@olivierlemoal
olivierlemoal / event_listener.py
Last active February 17, 2021 19:48
i3 script to toggle between last windows
Moved to https://github.com/olivierlemoal/i3-swap-focus
@fvigotti
fvigotti / docker.service
Created September 13, 2018 07:21
graceful docker/kubernetes shutdown sample
[Unit]
Description=Docker Application Container Engine
Documentation=http://docs.docker.com
After=network.target docker.socket
Wants=docker.socket
[Service]
Type=notify
Environment=GOTRACEBACK=crash
@raymadrona
raymadrona / 01_install_xtrabackup.sh
Created January 23, 2018 08:17
Backup with Percona XtraBackup
#!/bin/bash
# Install xtrabackup package.
# https://www.percona.com/doc/percona-xtrabackup/LATEST/installation/apt_repo.html
# On production server must be installed in the slave.
wget https://repo.percona.com/apt/percona-release_0.1-4.$(lsb_release -sc)_all.deb
sudo dpkg -i percona-release_0.1-4.$(lsb_release -sc)_all.deb