[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tracing of SMTP session?



Worked perfectly!

Thanks,

Best wishes,

David

At Thu, 20 Feb 2014 06:48:26 +0900,
Kazuhiro Ito wrote:
> 
> [1  <text/plain; US-ASCII (7bit)>]
> Sorry, I sent broken message.
> 
> > Now it turns out that whenever I sign a message with an attachment
> > (pdf file ~1.0MB base64 encoding) wanderlust hangs.
>  
> Wanderlust (SEMI-EPG, strictly) does not hangs but takes too much
> time.  Please try the below diff.
> 
> -- 
> Kazuhiro Ito
> [2 mime-edit.diff <application/octet-stream (7bit)>]
> diff --git a/mime-edit.el b/mime-edit.el
> index 3f54dd8..7ab846e 100644
> --- a/mime-edit.el
> +++ b/mime-edit.el
> @@ -2251,8 +2251,7 @@ If no one is selected, default secret key is used.  "
>  	     (encoding (nth 1 ret))
>  	     (pgp-boundary (concat "pgp-sign-" boundary))
>  	     (context (epg-make-context))
> -	     (index 0)
> -	     plain signature micalg)
> +	     index plain signature micalg)
>  	(mime-edit-delete-trailing-whitespace) ; RFC3156
>  	(goto-char beg)
>  	(insert (format "Content-Type: %s\n" ctype))
> @@ -2265,12 +2264,17 @@ If no one is selected, default secret key is used.  "
>  	(epg-context-set-signers
>  	 context
>  	 (mime-edit-pgp-get-signers context))
> -	(setq plain (buffer-substring (point-min) (point-max)))
> -	(while (string-match "\r?\n" plain index)
> -	  (if (eq (aref plain (match-beginning 0)) ?\r)
> -	      (setq index (match-end 0))
> -	    (setq plain (replace-match "\r\n" t t plain)
> -		  index (1+ (match-end 0)))))
> +	(goto-char (point-min))
> +	(setq index (point))
> +	(while (re-search-forward "\r?\n" nil t)
> +	  (setq plain (cons "\r\n"
> +			    (cons (buffer-substring index (match-beginning 0))
> +				  plain))
> +		index (match-end 0)))
> +	(setq plain
> +	      (apply 'concat (nreverse
> +			      (cons (buffer-substring index (point-max))
> +				    plain))))
>  	(setq signature (epg-sign-string context plain 'detached))
>  	(setq micalg (epg-new-signature-digest-algorithm
>  		      (car (epg-context-result-for context 'sign))))