Re: Message temporary file.
On Sat, Oct 28, 2000 at 10:08:23 +0930, Brian Salter-Duke wrote: > I do not know > about getting rid of the 'yes' response, but there could be a way. There is no way but the source. That is mutt_query_pipe_attachment() in recvattach.c. It might be a candidate for a quadoption... -- Byrial http://home.worldonline.dk/~byrial/
Re: Message temporary file.
On Sat, Oct 28, 2000 at 03:59:13AM +0300, Mikko Hänninen wrote: > Brian Salter-Duke <[EMAIL PROTECTED]> wrote on Sat, 28 Oct 2000: > > I always get confused about what the > > menu are called. > > A final usage tip -- I got confused too, until someone pointed out to me > that the menu's name appears at the top of the help screen when you > press '?'. It is at the bottom in my case. I think it is configurable. I had never noticed it - going blind as well as demented in my old age. It is a useful tip. Thanks, Mikko. > Good to hear things finally work. :-) Just clearing up a small bug now. Brian. > > Best regards, > Mikko > -- > // Mikko Hänninen, aka. Wizzu // [EMAIL PROTECTED] // http://www.iki.fi/wiz/ > // The Corrs list maintainer // net.freak // DALnet IRC operator / > // Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs / > I don't want the whole world, I just want your half. -- Associate Professor Brian Salter-Duke (Brian Duke) [EMAIL PROTECTED] Chemistry, School of BECS, SITE, NT University, Darwin, NT 0909, Australia. Phone 08-89466702. Fax 08-89466847. http://www.smps.ntu.edu.au/ Get PGP2 Key:- http://www.smps.ntu.edu.au/chemistry/duke.key.html
Re: Message temporary file.
On Sat, Oct 28, 2000 at 10:08:23AM +0930, Brian Salter-Duke wrote: > OK, I'll just clean up this lot and then I let people on the list know > how to use type I remailers with mutt. Looking forward to it. :) It would certainly be good if we could get Mixmaster to work, too. Remailers are essential tools for people who need to communicate but cannot afford to risk revealing their meatspace identity. Regards, -rex
Re: Message temporary file.
Brian Salter-Duke <[EMAIL PROTECTED]> wrote on Sat, 28 Oct 2000: > I always get confused about what the > menu are called. A final usage tip -- I got confused too, until someone pointed out to me that the menu's name appears at the top of the help screen when you press '?'. Good to hear things finally work. :-) Best regards, Mikko -- // Mikko Hänninen, aka. Wizzu // [EMAIL PROTECTED] // http://www.iki.fi/wiz/ // The Corrs list maintainer // net.freak // DALnet IRC operator / // Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs / I don't want the whole world, I just want your half.
Re: Message temporary file.
On Sat, Oct 28, 2000 at 03:28:56AM +0300, Mikko Hänninen wrote: > Brian Salter-Duke <[EMAIL PROTECTED]> wrote on Sat, 28 Oct 2000: > > It prompts for my filter script and then needs a > > "yes" reply as it warns it is overwriting the mutt-hostname-number file > > in /tmp. > > You can probably get rid of that "yes" reply -- I'm not sure of this, > but I would expect that to be handled by some option or another. > (After all, everything else in Mutt seems to be! ) I have no idea > of what option that might be, though. :-) > > > So far so good. I then tried to write a macro:- > > > > macro attach \Cp "try1yes" > > > This does not work. > > Try using "macro compose \Cp". :-) The "attach" menu is where you view > the attachements (message structure) of received emails. The "compose" > menu is where you create new emails. > > Don't feel bad, that's an easy mistake to make. :-) As always, you are bang on right. I always get confused about what the menu are called. Since it is the menu where you hit 'a' to attach a file, I thought that was the attach menu. Now it works. I do not know about getting rid of the 'yes' response, but there could be a way. Since it goes in the macro it does'nt matter. OK, I'll just clean up this lot and then I let people on the list know how to use type I remailers with mutt. Cheers, Brian. > And oh, if I'm wrong and that doesn't solve your problem, please let us > know. I'm 95% sure that's the problem, though. :-) The macro looks > like it should work. > > > Regards, > Mikko > -- > // Mikko Hänninen, aka. Wizzu // [EMAIL PROTECTED] // http://www.iki.fi/wiz/ > // The Corrs list maintainer // net.freak // DALnet IRC operator / > // Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs / > Bumper sticker: Cover me. I'm changing lanes. -- Associate Professor Brian Salter-Duke (Brian Duke) [EMAIL PROTECTED] Chemistry, School of BECS, SITE, NT University, Darwin, NT 0909, Australia. Phone 08-89466702. Fax 08-89466847. http://www.smps.ntu.edu.au/ Get PGP2 Key:- http://www.smps.ntu.edu.au/chemistry/duke.key.html
Re: Message temporary file.
Brian Salter-Duke <[EMAIL PROTECTED]> wrote on Sat, 28 Oct 2000: > It prompts for my filter script and then needs a > "yes" reply as it warns it is overwriting the mutt-hostname-number file > in /tmp. You can probably get rid of that "yes" reply -- I'm not sure of this, but I would expect that to be handled by some option or another. (After all, everything else in Mutt seems to be! ) I have no idea of what option that might be, though. :-) > So far so good. I then tried to write a macro:- > > macro attach \Cp "try1yes" > This does not work. Try using "macro compose \Cp". :-) The "attach" menu is where you view the attachements (message structure) of received emails. The "compose" menu is where you create new emails. Don't feel bad, that's an easy mistake to make. :-) And oh, if I'm wrong and that doesn't solve your problem, please let us know. I'm 95% sure that's the problem, though. :-) The macro looks like it should work. Regards, Mikko -- // Mikko Hänninen, aka. Wizzu // [EMAIL PROTECTED] // http://www.iki.fi/wiz/ // The Corrs list maintainer // net.freak // DALnet IRC operator / // Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs / Bumper sticker: Cover me. I'm changing lanes.
Re: Message temporary file.
On Fri, Oct 27, 2000 at 10:13:55AM +0200, Michael Tatge wrote: > Brian Salter-Duke muttered: > > On Fri, Oct 27, 2000 at 01:47:06AM +0300, Mikko Hänninen wrote: > > > Brian Salter-Duke <[EMAIL PROTECTED]> wrote on Thu, 26 Oct 2000: > > > > In the attach menu after saving the message, I > > > > want to modify the message considerably by piping it to a script. The > > > > modifications are such that they can not be done in situ. > > > > > > What's wrong with using the filter-entry function from the compose menu > > > (bound to F by default, apparently)? > > > > > It is not the attachment I want to filter and F is filter-entry for the > > attachment. I want to alter the message itself. > > The message body _is_ an attachment. > [My explanation of what I'm doing snipped] > If you alter the headers with hooks, all you need to change is the > messege body. This could be done with . Thanks, Michael and Mikko, for your explanation. Using bound to F works. It prompts for my filter script and then needs a "yes" reply as it warns it is overwriting the mutt-hostname-number file in /tmp. So far so good. I then tried to write a macro:- macro attach \Cp "try1yes" try1 is the name, for now, of my filter script. This does not work. When I try, it says the key is not bound and if I use '?' to see what is bound it indeed is not bound. I have the following in my muttrc, many taken from Roland's keybinding. Mostly these do not show in '?' in the attach menu either. Only \e;, Q and v show and I suspect these are defaults. i is still bound to ispell, which I guess is the default. macro attach \Cb ":set pipe_decode\n|urlview\n:unset pipe_decode\n" \ "Call urlview to extract URLs out of a message" bindattach g group-reply bindattach i exit macro attach \el "|less\n" "View plain message using less" # view plain message bindattach Q exit macro attach \eu "|uudeview -\n" "uudecode attachment" # uudecode attachment bindattach v view-attach Is this a bug that you can not add macros and bindings to the attach menu? Or as usual am I making a fool of myself? Cheers, Brian. -- Associate Professor Brian Salter-Duke (Brian Duke) [EMAIL PROTECTED] Chemistry, School of BECS, SITE, NT University, Darwin, NT 0909, Australia. Phone 08-89466702. Fax 08-89466847. http://www.smps.ntu.edu.au/ Get PGP2 Key:- http://www.smps.ntu.edu.au/chemistry/duke.key.html
Re: Message temporary file.
Mikko Hänninen muttered: > PS. No need to send emails to me privately, I'm on the list (as the MFT > header in this email should indicate...). I'm sorry Mikko. I replied to Brian's message, and _are_ listed in the MFT-Header of that message. Sorry for any inconvenience. I just didn't pay attention to that. Michael -- As far as we know, our computer has never had an undetected error. -- Weisert PGP-Key: http://www.stud.ims.uni-stuttgart.de/~tatgeml/public.key
Re: Message temporary file.
Brian Salter-Duke <[EMAIL PROTECTED]> wrote on Fri, 27 Oct 2000: > It is not the attachment I want to filter and F is filter-entry for the > attachment. I want to alter the message itself. Like Brian Tatge already said, the message body *is* an attachement, from the MIME point of view (and how the compose menu shows it). Usually people think in terms of "message body text" and "message attachements", but in fact these are just different parts of the same multi-part message. The mail reader decides how they are shown to the user. A part of the message may also be indicated to be "inline" for showing as part of the "body text", or it can be "attachment" for the usual meaning of attachments. Anyway, using filter-entry on the message body text should do what you want. If you also need to have the headers for whatever tasks the filter script does, then it does get a bit more tricky. I see two possible solutions: 1. Change your $editor to work on a temporary file, set $edit_headers, and invoke the "edit-headers" function. Then change your $editor value back to normal, maybe $edit_headers too. 2. Edit the message as usual, but change your $sendmail to actually point to a script that first runs your filter and then sends the message to the real sendmail/MTA. The advantage of this that the script will see all the headers, not just those you can see with edit-headers. The disadvantage is that message sent and saved Fcc copy will not be the same, unless you do something like add a Bcc to yourself. Also, you won't be able to see the changes before sending. Hope this helps, Mikko PS. No need to send emails to me privately, I'm on the list (as the MFT header in this email should indicate...). -- // Mikko Hänninen, aka. Wizzu // [EMAIL PROTECTED] // http://www.iki.fi/wiz/ // The Corrs list maintainer // net.freak // DALnet IRC operator / // Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs / You don't have to know anything to have an opinion.
Re: Message temporary file..
On Fri, Oct 27, 2000 at 06:34:36AM +0930 or so it is rumoured hereabouts, Brian Salter-Duke thought: > On Thu, Oct 26, 2000 at 11:21:59AM +0930, Brian Salter-Duke wrote: > > mv /tmp/new-file /tmp/mutt* > > This works. I can now just hit "y" to send the mail. However of course > it would fail if there was more than one message from mutt in the /tmp > directory. Is there a better way to refer to this file or pass its name > in the pipe from the compose menu? > You could do something like cat > /tmp/mytemp for i in `ls /tmp/mutt*`; do diff /tmp/mytemp /tmp/$i > /dev/null test = $? if [ $test == "0" ]; then filename=$i # Oh, that looks like the filename I need fi done mv /tmp/mytemp /tmp/$filename This depends on a reading of diff to see what it returns if it gets 2 identical files to compare. -- Conor Daly <[EMAIL PROTECTED]> domestic Sysadmin :-)
Re: Message temporary file.
Brian Salter-Duke muttered: > On Fri, Oct 27, 2000 at 01:47:06AM +0300, Mikko Hänninen wrote: > > Brian Salter-Duke <[EMAIL PROTECTED]> wrote on Thu, 26 Oct 2000: > > > In the attach menu after saving the message, I > > > want to modify the message considerably by piping it to a script. The > > > modifications are such that they can not be done in situ. > > > > What's wrong with using the filter-entry function from the compose menu > > (bound to F by default, apparently)? > > > It is not the attachment I want to filter and F is filter-entry for the > attachment. I want to alter the message itself. The message body _is_ an attachment. > Let me explain what I am trying to do. I am trying to automate > sending messages anonymously to type I remailers. Here the headers > point the mail to the remailer. The message contains other headers > such as:- > > :: > To: [EMAIL PROTECTED] > > I can handle this OK with hooks etc. However many remailers want the > message to be encrypted and armored. We want a message looking like:- > > :: > Encrypted: PGP > > PGP encrypted/armored block If you alter the headers with hooks, all you need to change is the messege body. This could be done with . HTH, Michael -- At the source of every error which is blamed on the computer you will find at least two human errors, including the error of blaming it on the computer. PGP-Key: http://www.stud.ims.uni-stuttgart.de/~tatgeml/public.key
Re: Message temporary file.
On Fri, Oct 27, 2000 at 01:47:06AM +0300, Mikko Hänninen wrote: > Brian Salter-Duke <[EMAIL PROTECTED]> wrote on Thu, 26 Oct 2000: > > I am not sure whether I am doing something the right way, but I have > > come up against a wall. In the attach menu after saving the message, I > > want to modify the message considerably by piping it to a script. The > > modifications are such that they can not be done in situ. I have to > > create another temporary file. The question is this - how do I replace > > the original temporary file in the tmp directory by the new one so I can > > then send the new file rather than the original? > > What's wrong with using the filter-entry function from the compose menu > (bound to F by default, apparently)? > > I'm not sure I understand what you mean with "in situ", but if you can > explain why "filter-entry" isn't enough for you, well maybe we can go > from there. :-) As far as I know, there is no actual way to get the > temporary filename of the attachement. > It is not the attachment I want to filter and F is filter-entry for the attachment. I want to alter the message itself. In fact I do not have and think I can not have an attachment for this application. Let me explain what I am trying to do. Perhaps I should have made this clear earlier. I am trying to automate sending messages anonymously to type I remailers. Here the headers point the mail to the remailer. The message contains other headers such as:- :: To: [EMAIL PROTECTED] I can handle this OK with hooks etc. You can send this to the remailer in clear and all is well. However many remailers want the message to be encrypted and armored. We want a message looking like:- :: Encrypted: PGP PGP encrypted/armored block I can pipe the message into a script that creates this. I need to put it back in the message file. By "in situ" I meant I could not do it like an atomatic edit. So, I guess I do need a filter, but does one exist? Cheers, Brian. > Regards, > Mikko > -- > // Mikko Hänninen, aka. Wizzu // [EMAIL PROTECTED] // http://www.iki.fi/wiz/ > // The Corrs list maintainer // net.freak // DALnet IRC operator / > // Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs / > 10.0 times 0.1 is hardly ever 1.0. -- Associate Professor Brian Salter-Duke (Brian Duke) [EMAIL PROTECTED] Chemistry, School of BECS, SITE, NT University, Darwin, NT 0909, Australia. Phone 08-89466702. Fax 08-89466847. http://www.smps.ntu.edu.au/ Get PGP2 Key:- http://www.smps.ntu.edu.au/chemistry/duke.key.html
Re: Message temporary file.
Brian Salter-Duke <[EMAIL PROTECTED]> wrote on Thu, 26 Oct 2000: > I am not sure whether I am doing something the right way, but I have > come up against a wall. In the attach menu after saving the message, I > want to modify the message considerably by piping it to a script. The > modifications are such that they can not be done in situ. I have to > create another temporary file. The question is this - how do I replace > the original temporary file in the tmp directory by the new one so I can > then send the new file rather than the original? What's wrong with using the filter-entry function from the compose menu (bound to F by default, apparently)? I'm not sure I understand what you mean with "in situ", but if you can explain why "filter-entry" isn't enough for you, well maybe we can go from there. :-) As far as I know, there is no actual way to get the temporary filename of the attachement. Regards, Mikko -- // Mikko Hänninen, aka. Wizzu // [EMAIL PROTECTED] // http://www.iki.fi/wiz/ // The Corrs list maintainer // net.freak // DALnet IRC operator / // Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs / 10.0 times 0.1 is hardly ever 1.0.
Re: Message temporary file.
On Thu, Oct 26, 2000 at 11:21:59AM +0930, Brian Salter-Duke wrote: > I am not sure whether I am doing something the right way, but I have > come up against a wall. In the attach menu after saving the message, I > want to modify the message considerably by piping it to a script. The > modifications are such that they can not be done in situ. I have to > create another temporary file. The question is this - how do I replace > the original temporary file in the tmp directory by the new one so I can > then send the new file rather than the original? Is there a variable > that refers to the original file so I can just do:- > > mv /tmp/new-file $variable > > and overwrite the original message file? I can not find a pointer to > this but I may be missing the obvious of course. I do have a solution, but it is nasty, not general and likley to fail. However it does perhaps explain more clearly what I want to do. The message is saved in a file in /tmp called "mutt-hostname-some_number. I pipe this to my script and form the file /tmp/new-file and then at the end of script add:- mv /tmp/new-file /tmp/mutt* This works. I can now just hit "y" to send the mail. However of course it would fail if there was more than one message from mutt in the /tmp directory. Is there a better way to refer to this file or pass its name in the pipe from the compose menu? Cheers, Brian. -- Associate Professor Brian Salter-Duke (Brian Duke) [EMAIL PROTECTED] Chemistry, School of BECS, SITE, NT University, Darwin, NT 0909, Australia. Phone 08-89466702. Fax 08-89466847. http://www.smps.ntu.edu.au/ Get PGP2 Key:- http://www.smps.ntu.edu.au/chemistry/duke.key.html
Re: Message temporary file.
On Wed, Oct 25, 2000 at 11:17:11PM -0700, Jason Helfman wrote: > I was messing around with backing up mail with my Qmail server, and > there is a utility that comes with it called, maildir2mbox. This utility > requires an environment variable named: > > MAILTMP > > I don't know if this is a system wide variable, or something just with > Qmail. Maybe this is a pointer, maybe not. > > My /etc/profile > > MAILTMP="/home/$USER/.mailtmp" A nice thought, Jason, but I think it does not meet the problem. I have qmail too. I do not use maildir2mbox but its man page says it converts Maildir format to mbox format and uses MAILTMP as a temporary file in so doing. I just need to know what to call the message file in /tmp from a script called by mutt. I could of course pass an argument from the mutt call via a pipe to the scripti, but I do not know what to call it. Thanks, Jason. Cheers, Brian. > On Thu, Oct 26, 2000 at 11:21:59AM +0930, Brian Salter-Duke muttered: > | I am not sure whether I am doing something the right way, but I have > | come up against a wall. In the attach menu after saving the message, I > | want to modify the message considerably by piping it to a script. The > | modifications are such that they can not be done in situ. I have to > | create another temporary file. The question is this - how do I replace > | the original temporary file in the tmp directory by the new one so I can > | then send the new file rather than the original? Is there a variable > | that refers to the original file so I can just do:- > | > | mv /tmp/new-file $variable > | > | and overwrite the original message file? I can not find a pointer to > | this but I may be missing the obvious of course. > | > | Cheers, Brian. > | -- > | Associate Professor Brian Salter-Duke (Brian Duke) [EMAIL PROTECTED] > | Chemistry, School of BECS, SITE, NT University, Darwin, NT 0909, Australia. > | Phone 08-89466702. Fax 08-89466847. http://www.smps.ntu.edu.au/ > | Get PGP2 Key:- http://www.smps.ntu.edu.au/chemistry/duke.key.html > | > > -- > /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 -- Associate Professor Brian Salter-Duke (Brian Duke) [EMAIL PROTECTED] Chemistry, School of BECS, SITE, NT University, Darwin, NT 0909, Australia. Phone 08-89466702. Fax 08-89466847. http://www.smps.ntu.edu.au/ Get PGP2 Key:- http://www.smps.ntu.edu.au/chemistry/duke.key.html
Re: Message temporary file.
I was messing around with backing up mail with my Qmail server, and there is a utility that comes with it called, maildir2mbox. This utility requires an environment variable named: MAILTMP I don't know if this is a system wide variable, or something just with Qmail. Maybe this is a pointer, maybe not. My /etc/profile MAILTMP="/home/$USER/.mailtmp" On Thu, Oct 26, 2000 at 11:21:59AM +0930, Brian Salter-Duke muttered: | I am not sure whether I am doing something the right way, but I have | come up against a wall. In the attach menu after saving the message, I | want to modify the message considerably by piping it to a script. The | modifications are such that they can not be done in situ. I have to | create another temporary file. The question is this - how do I replace | the original temporary file in the tmp directory by the new one so I can | then send the new file rather than the original? Is there a variable | that refers to the original file so I can just do:- | | mv /tmp/new-file $variable | | and overwrite the original message file? I can not find a pointer to | this but I may be missing the obvious of course. | | Cheers, Brian. | -- | Associate Professor Brian Salter-Duke (Brian Duke) [EMAIL PROTECTED] | Chemistry, School of BECS, SITE, NT University, Darwin, NT 0909, Australia. | Phone 08-89466702. Fax 08-89466847. http://www.smps.ntu.edu.au/ | Get PGP2 Key:- http://www.smps.ntu.edu.au/chemistry/duke.key.html | -- /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