Re: shell script macro
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
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
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)
Re: script, macro
On Wed, Aug 16, 2000 at 10:49:31PM -0700, Jason Helfman wrote: If i were to make a perl script to ask me some questions, and store the information.. Would I be able to pass this to vi and send from mutt? If you mean while Vi is open, yes. :r!command will read in the output from command. :2,10!command will pipe lines 2-10 inclusive to command, and replace them with the output. Mike -- Michael P. Soulier, 1Z22, SKY Tel: 613-765-4699 (ESN: 39-54699) Optical Networks, Nortel Networks, SDE Pegasus "...the word HACK is used as a verb to indicate a massive amount of nerd-like effort." -Harley Hahn, A Student's Guide to UNIX Nortel Linux User's Group Ottawa: (internal) http://nlug.ca.nortel.com:8080
Re: script, macro
no not while vi is open...I mean I am in mutt. I run a macro, asks me some questions, and passes it right to vi well i guess even further is, what are ppl doing when they say they have soemthing that is being passed through a scriptcould it be the other way, the script asking them even further on this issue..., i guess I could just make a script and have it echo to /var/qmail/bin/qmail-inject ??? On Thu, Aug 17, 2000 at 09:17:03AM -0400, Michael Soulier muttered: | On Wed, Aug 16, 2000 at 10:49:31PM -0700, Jason Helfman wrote: | If i were to make a perl script to ask me some questions, and store the | information.. Would I be able to pass this to vi and send from mutt? | | If you mean while Vi is open, yes. | | :r!command | | will read in the output from command. | | :2,10!command | | will pipe lines 2-10 inclusive to command, and replace them with the | output. | | Mike | | -- | Michael P. Soulier, 1Z22, SKY Tel: 613-765-4699 (ESN: 39-54699) | Optical Networks, Nortel Networks, SDE Pegasus | "...the word HACK is used as a verb to indicate a massive amount | of nerd-like effort." -Harley Hahn, A Student's Guide to UNIX | Nortel Linux User's Group Ottawa: (internal) http://nlug.ca.nortel.com:8080 -- /Jason G Helfman "At any given moment, you may find the ticket to the circus that has always been in your possession." Fingerprint: 6A32 3774 E390 33B5 8C96 2AA1 2BF4 BD71 35A1 C149 GnuPG http://www.gnupg.org Get Private! 1024D/35A1C149
Re: script, macro
On 2000.08.17, in [EMAIL PROTECTED], "Jason Helfman" [EMAIL PROTECTED] wrote: no not while vi is open...I mean I am in mutt. I run a macro, asks me some questions, and passes it right to vi Is this for new mail? You can write a macro that sets $editor to a script which runs the questionnaire, then runs your real editor, then sends and changes $editor back to something normal. well i guess even further is, what are ppl doing when they say they have soemthing that is being passed through a scriptcould it be the other way, the script asking them Don't know what you mean. even further on this issue..., i guess I could just make a script and have it echo to /var/qmail/bin/qmail-inject ??? I don't know how qmail-inject works, but ( echo From: me@mine echo To: you@yours echo Subject: this echo Date: now echo echo bye. ) | /usr/lib/sendmail -oem -fme@mine you@yours is quite a common way of scripting mail deliveries. Still not clear what you're looking for, but maybe that helps. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
script, macro
If i were to make a perl script to ask me some questions, and store the information.. Would I be able to pass this to vi and send from mutt? -- /Jason G Helfman "At any given moment, you may find the ticket to the circus that has always been in your possession." Fingerprint: 6A32 3774 E390 33B5 8C96 2AA1 2BF4 BD71 35A1 C149 GnuPG http://www.gnupg.org Get Private! 1024D/35A1C149