Sonntag, 12 Okt 2008

A friend of mine Dennis Herrmann wrote a small howto
how you can use send-pr(1) with msmtp support,
Unfortunately in German, so I translate it here:

Who looked at the source of send-pr(1) will notice
that the most important functions are packed into
variables. Even the functionality for the mail agent :)

Of course we assume a working ~/.msmtprc. The rest is
easy, you just add

export GNATS_ADDR=FreeBSD-gnats-submit@freebsd.org
export MAIL_AGENT="${MAIL_AGENT:-/usr/local/bin/msmtp -f ${USER}/.msmtprc ${GNATS_ADDR}}"

to your ~/.zshrc or ~/.bashrc depending on your shell.
You also have to regard that not every shell is using
export to assign something to a variable. The first
variable is neccessary so the MAIL_AGENT knows where
to send the mail. Allowing this way would result in an
error by send-pr(1) and you have to rewrite everything
again. Would the variable be local in send-pr(1) we
wouldn’t have that problem!

The parameter -f of smtp in the second variable is
neccessary to ensure that your settings are really
used. But please remember that you also need your
~/.msmtprc if you want to send a pr as root!

Have fun :)


2 Responses to “”

  1. Utiliser send-pr(1) avec msmtp at FreeBSD-fr: Les nouvelles du géant en français Says:

    [...] : Martin Wilke weblog (en) « PC-BSD 7 vu par [...]

  2. FreeBSD News | F!XMBR Says:

    [...] gebührt der Dank. Zudem möchte ich hier noch einen kleinen aber nützlichen Tipp unterbringen: send-pr(1) with msmtp support, diesen hat dankenswerterweise Miwi [...]

Leave a Reply

»
«