Skip to content

Instantly share code, notes, and snippets.

View fvigotti's full-sized avatar
Working hard

Francesco fvigotti

Working hard
View GitHub Profile
olivierlemoal /
Last active February 17, 2021 19:48
i3 script to toggle between last windows
Moved to
fvigotti / docker.service
Created September 13, 2018 07:21
graceful docker/kubernetes shutdown sample
Description=Docker Application Container Engine
Documentation= docker.socket
raymadrona /
Created January 23, 2018 08:17
Backup with Percona XtraBackup
# Install xtrabackup package.
# On production server must be installed in the slave.
wget$(lsb_release -sc)_all.deb
sudo dpkg -i percona-release_0.1-4.$(lsb_release -sc)_all.deb
zmwangx / Postfix: sender-dependent SASL
Last active May 10, 2024 14:18
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):

    # sender-dependent sasl authentication
    smtp_sender_dependent_authentication = yes

sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay