On Tue, Jul 08, 2008 at 06:39:57PM -0400, Gwern Branwen wrote:
> 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 %<" "$@" }
[...]
> 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: [EMAIL PROTECTED]
>  Perhaps sendmail is not configured.

The value to --sendmail-command is not executed by the shell. It
is parsed by darcs and executed as a raw command, so the
backquotes will not have any effect. Otherwise your last try
(quoted above) is the correct way to enter the value for
--sendmail-command; only single arguments that contain spaces
need to be quoted in singlequotes, like:

  send sendmail-command touch -d 2008-08-01 'spacy file stamp'


You could try something like:

  send sendmail-command sh -e 'torify ssmtp -au `gpg-address` ... '

but I have not checked if that really works.



-- 
Tommy Pettersson <[EMAIL PROTECTED]>
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to