send-pr(1) with msmtp support

adox

New Member

Reaction score: 1
Messages: 3

I wrote a small howto, how you can use send-pr(1) with msmtp support ;)
you can found it in german on http://blog.mcx2.org/unix/send-pr_msmtp.html

miwi a friend of mine translate it ;)

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

Code:
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!

WWW:
http://miwi.bsdcrew.de/2008/10/12/send-pr1-with-msmtp-support/
http://blog.mcx2.org/unix/send-pr_msmtp.html
 
Top