Re: shell script macro

2016-01-20 Thread Jon LaBadie
On Wed, Jan 20, 2016 at 12:46:46PM -0600, Derek Martin wrote:
> On Tue, Jan 19, 2016 at 11:28:19PM -0500, Jon LaBadie wrote:
> > I'm trying to write an index macro invoking a shell script.
> > Simple enough, but I would like to pass the current sender's
> > address to the script.  Not the full address, just the
> > "user@host" part.
> 
> I'm pretty ignorant about Mutt's macro features, having never had any
> specific occasion to need those facilities.  However, what I will say
> is, if you can figure out how to pass the address to your script, you
> can easily convert it to user@host in the script.  I suspect it'll be
> easier to do that than to get mutt to do exactly that.
> 
> Hope that helps.

Thanks, as a fall back, that is what I will do.  I can write the macro
as piping to "formail -x From:" and feed that to my script via stdin.
Then edit that in my script to get the user@host address portion.

BTW I will use the macro to build up a list of email addresses of
advertisers who I will accept email from, but wish to filter into
a separate "ads" mailbox.

I was hoping to not need formail, instead passing something like the
"%f" ?variable?parameter?flag? or whatever it is called.  That would
be the full "From" string including the sender's "real" name.

What I was looking for was how to use the %f (if possible in a macro)
and if an alternative was available where mutt already removed the
sender's real name.

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: shell script macro

2016-01-20 Thread Derek Martin
On Tue, Jan 19, 2016 at 11:28:19PM -0500, Jon LaBadie wrote:
> I'm trying to write an index macro invoking a shell script.
> Simple enough, but I would like to pass the current sender's
> address to the script.  Not the full address, just the
> "user@host" part.

I'm pretty ignorant about Mutt's macro features, having never had any
specific occasion to need those facilities.  However, what I will say
is, if you can figure out how to pass the address to your script, you
can easily convert it to user@host in the script.  I suspect it'll be
easier to do that than to get mutt to do exactly that.

Hope that helps.

-- 
Derek D. Martinhttp://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.



pgpxmDLDvRDlR.pgp
Description: PGP signature


shell script macro

2016-01-19 Thread Jon LaBadie
I'm trying to write an index macro invoking a shell script.
Simple enough, but I would like to pass the current sender's
address to the script.  Not the full address, just the
"user@host" part.

suggestions?

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)