Skip to content

Instantly share code, notes, and snippets.

😊
Working hard

Francesco fvigotti

😊
Working hard
Block or report user

Report or block fvigotti

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fvigotti
fvigotti / Postfix: sender-dependent SASL authentication.md
Created Oct 26, 2018 — 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)
View Postfix: sender-dependent SASL authentication.md

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
@fvigotti
fvigotti / fabric.plugin.zsh
Created Sep 13, 2016 — forked from Fandekasp/fabric.plugin.zsh
zsh-completion for Fabric in Oh-my-zsh
View fabric.plugin.zsh
#compdef fab
_targets() {
_describe -t commands "fabric targets" target_list
}
output_levels=(
'status: Status messages, i.e. noting when Fabric is done running, if the user used a keyboard interrupt, or when servers are disconnected from. These messages are almost always relevant and rarely verbose.'
'aborts: Abort messages. Like status messages, these should really only be turned off when using Fabric as a library, and possibly not even then. Note that even if this output group is turned off, aborts will still occur – there just won’t be any output about why Fabric aborted!'
'warnings: Warning messages. These are often turned off when one expects a given operation to fail, such as when using grep to test existence of text in a file. If paired with setting env.warn_only to True, this can result in fully silent warnings when remote programs fail. As with aborts, this setting does not control actual warning behavior, only whether warning messages are printed or hidden.'
You can’t perform that action at this time.