Re: file corruption after transmission over email

2022-06-01 Thread Kevin J. McCarthy

On Sun, May 29, 2022 at 01:15:51PM -0300, Marcelo Laia wrote:

tee >(lbdb-fetchaddr -a)|/usr/bin/msmtp -a gmail $@


Perhaps lbdb-fetchaddr is closing input before the end of the message, 
and tee is exiting on a SIGPIPE?


Mutt 2.2 had a fix to properly reset signals (specifically SIGPIPE) on 
exec().  Child processes previously inherited Mutt's ignore setting, but 
this caused other incorrect behavior.


Maybe adding '--output-error=exit-nopipe' to the tee command will help?

Alternatively maybe capture stdin to a temp file and the perform the 
lbdb-fetchaddr msmtp separately?


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: file corruption after transmission over email

2022-06-01 Thread Kurt Hackenberg

On 2022/06/01 12:17, Marcelo Laia wrote:


tee >(lbdb-fetchaddr -a)|/usr/bin/msmtp -a gmail $@

...

1. http://www.jukie.net/bart/blog/lbdb-and-mutt


Ah, bash's "process substitution". I forgot about that.


Re: file corruption after transmission over email

2022-06-01 Thread Patrick Shanahan
* Marcelo Laia  [06-01-22 12:17]:
> On 29/05/22 at 12:49, Kurt Hackenberg wrote:
> > On 2022/05/29 12:15, Marcelo Laia wrote:
> > 
> > > If I send a message using
> > > 
> > > tee >(lbdb-fetchaddr -a)|/usr/bin/msmtp -a gmail $@
> > > 
> > > the attached file with embedded image got corrupted
> > 
> > What is that line intended to do?
> 
> Hi Kurt!
> 
> I'm so sorry for don't had been do a complete explanation about that.
> Sorry!
> 
> Here [1] is a configuration that could bee explanation how to use LBDB
> with mutt and msmtp.
> 
> In this mean time, I migrate to abook and all work nice, now.
> 
> I use abook in this way:
> 
> set query_command = "abook --mutt-query '%s'"
> set display_filter = "pee 'abook --add-email-quiet' 'cat -'" # all
> opened messages have senders address added to abook database.
> 
> I uninstalled lbdb from my machine.

why uninstall lbdb?  you can query it directly, ie:
  lbdbq Marcelo\ Laia

lbdbq: 1 matches
marcelol...@gmail.com   Marcelo Laia


then only add addresses to abook that you really need.


  
-- 
(paka)Patrick Shanahan   Plainfield, Indiana, USA  @ptilopteri
http://en.opensuse.orgopenSUSE Community Memberfacebook/ptilopteri
Photos: http://wahoo.no-ip.org/piwigo   paka @ IRCnet oftc


Re: file corruption after transmission over email

2022-06-01 Thread Marcelo Laia
On 29/05/22 at 12:49, Kurt Hackenberg wrote:
> On 2022/05/29 12:15, Marcelo Laia wrote:
> 
> > If I send a message using
> > 
> > tee >(lbdb-fetchaddr -a)|/usr/bin/msmtp -a gmail $@
> > 
> > the attached file with embedded image got corrupted
> 
> What is that line intended to do?

Hi Kurt!

I'm so sorry for don't had been do a complete explanation about that.
Sorry!

Here [1] is a configuration that could bee explanation how to use LBDB
with mutt and msmtp.

In this mean time, I migrate to abook and all work nice, now.

I use abook in this way:

set query_command = "abook --mutt-query '%s'"
set display_filter = "pee 'abook --add-email-quiet' 'cat -'" # all
opened messages have senders address added to abook database.

I uninstalled lbdb from my machine.

Thanks!

1. http://www.jukie.net/bart/blog/lbdb-and-mutt

-- 
Marcelo