[darcs-users] ~/.darcs/defaults: send sendmail-command configuration problems

Gwern Branwen gwern0 at gmail.com
Tue Jul 8 22:39:57 UTC 2008


Hi everyone. So I recently decided to move all my Darcs configuration out of my elaborate and unwieldy shell scripts, and into my ~/.darcs/defaults. For the most part, it has gone alright.

However, I've run into trouble with more complex things. For example, with my send function. It looked like this:

function send { local -r http_proxy=""; darcs send -v --summary --from=`gpg-address` --sendmail-command="torify ssmtp -au `gpg-address` -ap `gpg-password` %t %<" "$@" }

(The summary here is that gpg-address and gpg-password are programs which print to stdout the necessary password and address. The rest sets up ssmtp with necessary arguments for sending through gmail.)

Anyway, the problem is that I just cannot figure out how to turn this into a defaults form. I have:

 send cc darcswatch at nomeata.de
 send sendmail-command 'torify ssmtp -au `gpg-address` -ap `gpg-password`' %t %<
 send sign
 send summary

But this doesn't work:

 darcs failed:  failed to send mail to: cvs-ghc at haskell.org
 Perhaps sendmail is not configured.

(Obviously, I don't use sendmail but ssmtp.)

Changing the line to:
 send sendmail-command 'torify ssmtp -au `gpg-address` -ap `gpg-password` %t %<'

results in:

 darcs failed:  failed to send mail, invalid sendmail-command: (line 1, column 57):
 unexpected "'"
 expecting white space or end of input

Trying:
 send sendmail-command torify ssmtp -au `gpg-address` -ap `gpg-password` %t %<

results in:
 ssmtp: Authorization failed (535 5.7.1 http://mail.google.com/support/bin/answer.py?answer=14257 34sm8069819yxl.9)

 darcs failed:  failed to send mail to: cvs-ghc at haskell.org
 Perhaps sendmail is not configured.

Which is closer, but still wrong. (I know that this ssmtp invocation should work, since it is almost the exact same thing as what I use in Mutt.)

So I am kind of confuzzled here.

-----

The full ~/.darcs/defaults I have right this second follows:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > ALL author `gpg-address` >
> ALL verbose >
> ALL ssh-cm >
> get lazy >
> get set-scripts-executable >
> initialize darcs-2 >
> initialize hashed >
> initialize no-pristine-tree >
> optimize compress >
> optimize reorder-patches >
> pull all >
> pull compress >
> send cc darcswatch at nomeata.de >
> send sendmail-command torify ssmtp -au `gpg-address` -ap `gpg-password` %t %< >
> send sign >
> send summary >
> tag checkpoint > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


--
gwern
Trump rip Ortega OAU Beyond ISG tors NOCS Counter Gulf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20080708/2e63ab05/attachment.pgp 


More information about the darcs-users mailing list