Skip to content

Instantly share code, notes, and snippets.

View smedir's full-sized avatar

Sundeep Mediratta smedir

  • 00:08 (UTC -04:00)
View GitHub Profile
@smedir
smedir / 10-snapshot.hook
Created November 9, 2023 22:41 — forked from Frederick888/10-snapshot.hook
Simple pacman hook to take ZFS snapshots
[Trigger]
Operation=Install
Operation=Upgrade
Operation=Remove
Type=Package
Target=*
[Action]
When=PreTransaction
Exec=/usr/local/bin/pacman-snapshots.sh
@smedir
smedir / Postfix: sender-dependent SASL authentication.md
Created May 19, 2023 00:36 — forked from zmwangx/Postfix: sender-dependent SASL authentication.md
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