Re: Bookmarks?
* On 08 Jun 2009, Cameron Simpson wrote: Personally I wish I could go to a message by Message-ID. Then stuff could be build on top of that as open mailbox, go to message-id. Different from this? ;) search~i 20090609040352.ga18...@cskk.homeip.netenter I use this pattern in a patch that lets me bind a macro to the current message, so that I can return to it later or alternate between two points in my mailbox. (In case that's interesting, it's here: http://home.uchicago.edu/~dgc/sw/mutt/patch-1.5.1.dgc.markmsg.2 .) This or even more complex things (such as you suggest) might be possible with a macro that copies the message to a file, runs a script on it, and evaluates the output. -- -D.d...@uchicago.eduNSITUniversity of Chicago
Re: Get Mutt and ISPs
Le Sunday, 31 May 2009 à 18:45:09 +0200, Dave Feustel a écrit : I've tried to get mutt to send email to my ISP's mail server, but so far I have not succeeded (I send mail using msmtp). What variables in .msmtprc do I need to set to be able to send email using mutt only? Thanks. Hello, This seems to work fine : account default host yourIspServer from yourMailAdress -- David
Re: use current folder name as argument to abitrary command
* Cameron Simpson c...@zip.com.au [2009-05-31 01:41 -0500]: On 30May2009 22:20, David J. Weller-Fahy dave-lists-mutt-us...@weller-fahy.com wrote: | #v+ | folder-hook . 'push :\\\`~/.mutt/listbox-to-email.pl\ $my_folder\\\`enter' | #v- | | I do not understand why the macro is required to force mutt to parse | that -quoted string, and now I'm wondering if there are any other | constructs which would allow the same level of parsing without defining | a macro... hrm. Methinks I need to read more of the source, manual, and | wiki to understand, but that may have to wait until I get more | round-tuits. There are no macros in that command line. Hmm, there are macros in mine; I guess removing them is what you're after. Yep, I probably should have been clear: It struck me as a waste to generate a macro just so the string can be interpreted as a mutt-level -string. I was just trying different things to remove the requirement for a macro. It just occurred to me, though, that you might want the macro so you can re-use the command later? Not sure, but either way I figured it out. If you get your perl script to log command line arguments to a file, what does it show? Is it even run? The Perl script didn't run, instead I would get the following. #v+ `~/.mutt/listbox-to-email.pl: unknown command #v- I had also tried the following command: #v+ folder-hook . 'push :\`~/.mutt/listbox-to-email.pl\ $my_folder\`\\\enter\\\' #v- Which resulted in the following being left on the mutt command line. #v+ :`~/.mutt/listbox-to-email.pl =lists.mutt-users`\enter\ #v- That should have given me the clue-bat you gave me below, as it indicates the enter (had it worked) would have executed `~/.mutt/listbox-to-email.pl =lists.mutt-users`, which is what I wanted to happen. A... hindsight. ;) What if you change: \\\` into plain \` at the start and end? As you suggested, I changed the \\\` to \`, and voilà! It works without the macro! I can only plead tired-eye-rushing syndrome, as that's the only way I should have missed trying all the possibilities instead of skipping the one that worked. For the record the following folder-hooks work to execute a script and pass the current folder name as the script's first command line parameter. #v+ folder-hook +lists* 'set my_oldrecord=$record; set record=^; set my_folder=$record; set record=$my_oldrecord' folder-hook . 'push :\`~/.mutt/listbox-to-email.pl\ $my_folder\`\enter\' #v- Also, I'll attach my little Perl script, as someone might find it handy. | That is odd, but workable. That does seem a little odd, since mutt's ok with blank lines in the muttrc. Yep... another code-dive for another time. Good timing on the solution, anyway, as my next semester starts tomorrow. ;) -- dave [ please don't CC me ]
Re: use current folder name as argument to abitrary command
* David J. Weller-Fahy dave-lists-mutt-us...@weller-fahy.com [2009-05-31 21:30 -0500]: folder-hook +lists* 'set my_oldrecord=$record; set record=^; set my_folder=$record; set record=$my_oldrecord' ^^^ That should have been '.', but you get the idea. And the script is attached... it's apparently been that type of thread. ;) -- dave [ please don't CC me ] listbox-to-email.pl Description: Perl program
Re: use current folder name as argument to abitrary command
* Cameron Simpson c...@zip.com.au [2009-05-26 18:20 -0500]: On 25May2009 22:30, David J. Weller-Fahy dave-lists-mutt-us...@weller-fahy.com wrote: [ ... snips ... ] | Brought a tear to my eye! I just spent ~30 minutes trying to trim | away the macro, but I have not been able to yet. I'm sure my | understanding of mutt's quoting levels is insufficient as of yet. You probably can't reduce it, given the order in which things need to happen. Yep, I was coming to that conclusion. [ ... snips ... ] |because we need to construct a mutt-level -quoted string, and |also it has to happen in the folder hook because we don't have |the folder name before then. It has to happen inside the folder-hooks because it needs to be re-applied if you switch folders. Also, (if you didn't want to update on a folder change) I think I established by experiment that the main muttrc is sourced before opening your first folder, so you can't ask for the folder name then. I should have been more specific. I understand why the folder-hook has to be used, but don't quite get why the mutt-level -quoted string can't come from something like the following (doesn't work). #v+ folder-hook . 'push :\\\`~/.mutt/listbox-to-email.pl\ $my_folder\\\`enter' #v- I do not understand why the macro is required to force mutt to parse that -quoted string, and now I'm wondering if there are any other constructs which would allow the same level of parsing without defining a macro... hrm. Methinks I need to read more of the source, manual, and wiki to understand, but that may have to wait until I get more round-tuits. BTW, something I may raise in another thread: the output of cs-mutt-per-folder (or whatever command you put in backticks there) _must_ be a single line of text. Mutt reads just the first line and closes the pipe, producing a Broken Pipe signal in the script and discarding following lines. So the script should produce: mutt-cmd; mutt-cmd; ... That is odd, but workable. Also I found something to watch out for when using this method: Make sure your script *always* produces a command recognizable to mutt when run, otherwise the lack of a command will cause an error. For example, when run in my =lists folder my particular script does not emit anything. As a result, I receive a ': unknown command' message on the status bar. No harm, but it can be prevented. I used a set wait_key\n just to test, and it prevented the message. Regardless, this works for me and I'll be using it from now on. Thanks again! -- dave [ please don't CC me ]
Re: use current folder name as argument to abitrary command
Before I get into inline response - this works for me: Thanks Cameron! * Cameron Simpson c...@zip.com.au [2009-05-12 03:27 -0500]: On 04May2009 22:25, David J. Weller-Fahy dave-lists-mutt-us...@weller-fahy.com wrote: [ ... snip-o-lot throughout ... ] | So, really the only problem I need to solve to make everything work | without having to patch mutt is expanding a my_* variable (perhaps any | variable?) within backticks. I have finally found some more time to look at this, and spent a few hours this morning. You are going to love this charming incantation: folder-hook . 'set my_oldrecord=$record; set record=^; set my_folder=$record; set record=$my_oldrecord' folder-hook . 'macro index Z :push\ \:\\\`cs-mutt-per-folder\ $my_folder\\\`\\\enterenter; push Z' Wow. Simple and intuitive, eh? (There are just two folder-hook lines there, if your mailer folds the lines.) Brought a tear to my eye! I just spent ~30 minutes trying to trim away the macro, but I have not been able to yet. I'm sure my understanding of mutt's quoting levels is insufficient as of yet. [...] The method by which this was arrived at is as follows: - we need $my_folder expanded in the command - mutt vars are not expanded inside backticks (because that would mangle shell variable use in the shell command) Given. - thus we need to construct the shell command a little like this: \`cs-mutt-per-folder $my_folder\` i.e. literal backticks, so we're not inside backticks when $my_folder is encountered. I didn't think of that, good idea! - thus we need a string in our muttrc subject to this expansion, and we need to get something to use it: push :\`cs-mutt-per-folder $my_folder\`enter You can see this should push the text: :`cs-mutt-per-folder =me` if I'm in the folder =me. Ok, that makes sense. - for added fun of course, this has to happen inside the folder-hooks. We can't just push stuff directly because we need to construct a mutt-level -quoted string, and also it has to happen in the folder hook because we don't have the folder name before then. This part I am unclear on - rather, I am unclear on *why*, not *whether*, it works that way. Perhaps (certainly) I don't understand mutt's quoting levels enough, and will have to dive through the wiki and documentation again. - So we define a macro and then push the macro keystroke. That leads directly to the deeply nested quotes shown, which I then spent a LONG time fiddling with until it actually worked:-( Brilliant! I used your solution in this mutt session, and the from has been set properly for every mailbox thus far. Thanks again, Cameron, and I'll mark this solved in the subject for future searchers. ;) Regards, -- dave [ please don't CC me ]
Re: use current folder name as argument to abitrary command
* Cameron Simpson c...@zip.com.au [2009-05-02 23:19 -0500]: On 02May2009 14:55, David J. Weller-Fahy dave-lists-mutt-us...@weller-fahy.com wrote: | I get two results that I did not expect. | 1) I get the any key prompt after the shell command executes. | 2) my_revdir is not filled with the current folder name. Ok, you've got a few issues. Always! ;) Mutt config commands _are_ executed in series, in the order in the config file. The keyboard input stream is not consulted until commmands have stopped. [snips] So your wait_key shuffling runs to completion before anything you pushed is used. So push is not what you want, at least for what you're trying to use it for. That matches exactly what I saw - it's good to get confirmation. I also suggest you utilise the `backtick` syntax. Like the shell, mutt will use shell output. For example: [snips] So you can go: `muttecho.sh ...` in your muttrc. You'll have to escape a little to embed that in a folder hook. This avoids a lot of racy mucking around with temp files. There's the rub, actually - I tried the backticks in an earlier incarnation (they seemed to be a natural solution), but wasn't able to get the variable to expand within the backticks. If you know a way to do that I'll be all ears, but I've been unable to find a way of escaping the variable which allows variable expansion to take place within the backticks. Here is what I tried: #v+ folder-hook . 'set my_oldrecord=$record; set record=^; set my_folder=$record; set record=$my_oldrecord' folder-hook . `~/.mutt/muttecho.sh \$my_folder` #v- I then tried escaping the '\' before $my_folder (all the way up to six '\' characters) with no luck. I tried surrounding the variable with double-quotes () with no luck. I just had an idea, though, which could solve the problem, although it wouldn't be useful to everyone (it would be dependent on their use of wait_key). Instead of unsetting wait_key as part of the specific solution, unset wait_key whenever I'm in my mailing list hierarchy, and set it to yes whenever I'm not. That will avoid the restoring saved state problem, and allow the shell to return without pausing for user input. The commands I tried follow. #v+ folder-hook +lists* set my_oldrecord=\$record; set record=^; set my_folder=\$record; set record=\$my_oldrecord folder-hook +lists* push shell-escape\~/.mutt/listbox-to-email.pl \$my_folder\enter folder-hook +lists* push enter-command\source ~/.mutt/listbox-to-email.rc\enter #v- These commands did not work as I wanted, but they did work somewhat. They worked for the first mailing list folder I entered, and then consistently set from to the last mailing list folder entered prior to the current folder. For example, if the mailing list folders I entered (in order) were ml1, ml2, ml3, ml4, ml5; then the from address would be set to ml1-email in ml1, ml1-email in ml2, ml2-email in ml3, ml3-email in ml4, and ml4-email in ml5. Very strange, but indicates the listbox-to-email.rc file is being loaded before being updated. Some notes about why those particular commands (so I can be corrected): 1) I tried both the source and backtick method of the third folder-hook with no success. 2) I tried using 'push enter-command' because I thought it would keep the command being executed and reading the resulting file in sequence (as I understand the order of execution). I'm trying to solve a similar problem to yours, so I'm somewhat interested in this discussion. [snip clever use of folder-hook w/macro] The macro is done as a folder hook because it must run _after_ the folder-hook that sets $my_folder, and it must set the macro to a string that has the value of $my_folder in it. You'll notice that the macro does _not_ mention $my_folder: [snip help text] Indeed, I've used similar things in the past. I'd never looked into exactly what sequence mutt processes the rc files, though, which is why this particular problem had me confused for a bit. Thanks for clearing it up (at least the confusion part). So, really the only problem I need to solve to make everything work without having to patch mutt is expanding a my_* variable (perhaps any variable?) within backticks. As I have time I'm code-diving through the sections of init.c dealing with backticks to gain a better understanding of what happens, and hopefully I'll figure out what I need to do to get variable expansion within backticks (or find out it is not possible). Of course, regexp substitution within muttrc would be wonderful, but isn't showing up any time soon. ;) So, suggestions anyone? Regards, -- dave [ please don't CC me ]
Re: use current folder name as argument to abitrary command
* Noah Sheppard nhshepp...@taylor.edu [2009-05-02 01:56 -0500]: On Fri, May 01, 2009 at 11:28:39PM -0500, David J. Weller-Fahy wrote: Right now everything works except from never gets set. I thought this might be because of the timing (source happening before the link is created), so I added a 0.5 second sleep after list-from generation. Adding the sleep did not fix the problem from never gets set because the source command runs before the shell finishes creating the link, but I'm not sure. Hmm, I implemented a similar thing, and it worked correctly (thanks for suggesting the whole using a script to write a mutt command to a file and then sourcing it, since I hadn't gotten that far before). You're welcome, I'm glad it works for you. My initial attempt was to have a script which would use the filename of the script as the input, then create a link to that script which was named =lists.mutt-users (or whatever the mailbox is). That seemed overly complicated, though neat, so I dropped that for command-line parameters. My mutt runs on a debian install under VirtualBox which is running on a Vista Host. That said, my theory is that mutt is going fast enough that the file is not available in time for mutt to source it on my installation. Not sure what to do if that's the case, though. Here's my mutt -v output just in case there's something screwy. I'm following HEAD on a personal install of mutt. #v+ Mutt 1.5.19 (2009-04-28) Copyright (C) 1996-2009 Michael R. Elkins and others. Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'. Mutt is free software, and you are welcome to redistribute it under certain conditions; type `mutt -vv' for details. System: Linux 2.6.26-2-686 (i686) ncurses: ncurses 5.7.20090404 (compiled with 5.7) libidn: 1.12 (compiled with 1.12) hcache backend: GDBM version 1.8.3. 10/15/2002 (built Aug 27 2008 09:23:18) Compile options: -DOMAIN +DEBUG +HOMESPOOL -USE_SETGID +USE_DOTLOCK -DL_STANDALONE +USE_FCNTL -USE_FLOCK -USE_POP +USE_IMAP -USE_SMTP +USE_SSL_OPENSSL -USE_SSL_GNUTLS -USE_SASL -USE_GSS +HAVE_GETADDRINFO +HAVE_REGCOMP -USE_GNU_REGEX +HAVE_COLOR +HAVE_START_COLOR +HAVE_TYPEAHEAD +HAVE_BKGDSET +HAVE_CURS_SET +HAVE_META +HAVE_RESIZETERM +CRYPT_BACKEND_CLASSIC_PGP +CRYPT_BACKEND_CLASSIC_SMIME -CRYPT_BACKEND_GPGME -EXACT_ADDRESS -SUN_ATTACHMENT +ENABLE_NLS -LOCALES_HACK +HAVE_WC_FUNCS +HAVE_LANGINFO_CODESET +HAVE_LANGINFO_YESEXPR +HAVE_ICONV -ICONV_NONTRANS +HAVE_LIBIDN +HAVE_GETSID +USE_HCACHE ISPELL=/usr/bin/ispell SENDMAIL=/usr/sbin/sendmail MAILPATH=Maildir PKGDATADIR=/home/dave/usr/mutt SYSCONFDIR=/home/dave/usr/etc EXECSHELL=/bin/sh -MIXMASTER To contact the developers, please mail to mutt-...@mutt.org. To report a bug, please visit http://bugs.mutt.org/. #v- As I said, this works for me, and I don't have any timing issues either. I'm curious, why the push enter-command at the beginning of the last folder hook up above? I was trying to make the source happen later in the sequence of events. My theory was that pushing the source command onto the stack would force mutt to wait until after running the shell command to perform the source. This does not work (unfortunately), although it does force the source to happen later in the sequence of events. I never knew whether mutt ran hooks in parallel or one after the other. Was it just a hunch you had that mutt doesn't wait for one hook to complete before moving on to another, or do you have some documentation which indicates this? I checked the mutt documentation but did not see anything to that end. First, I tried your example and my_revdir did not contain the folder name, although all the individual steps functioned as advertised. I ended up simplifying it a bit by not changing the shell, and simply including that as the text of the shell-escape command (that way I don't have to worry about reseting the shell). The timing idea is a hunch based on a specific behavior I can still reproduce. Using the following muttrc commands. #v+ # previously discussed folder-hook . set my_oldrecord=\$record folder-hook . set record=^ folder-hook . set my_curdir=\$record folder-hook . set record=\$my_oldrecord # save the state of wait_key folder-hook . set my_wait_key=\$wait_key # turn off wait_key folder-hook . set wait_key=no # run command to create file to source folder-hook . push shell-escape\~/.mutt/muttecho.sh \$my_curdir\enter # set wait_key to saved state folder-hook . set wait_key=\$my_wait_key # source the file folder-hook . push enter-command\source ~/.mutt/muttintest\enter #v- And the following muttecho.sh file. #v+ [ -e ~/.mutt/muttintest ] rm ~/.mutt/muttintest echo set my_revdir=$1 ~/.mutt/muttintest #v- I get two results that I did not expect. 1) I get the any key prompt after the shell command executes. 2) my_revdir is not filled with the current folder name. If I move the set wait_key=\$my_wait_key folder-hook below the source hook, and leave
Re: use current folder name as argument to abitrary command
First, my goal is to change the from variable based on which mailing list mailbox I'm in (my non-list email addresses don't change enough to make this worthwhile for them). I was using a one-line patch to export the mailbox name to the shell. With your solution that should no longer be necessary, but I'm having trouble getting this to work. All my list email addresses are based on the mailing list name so the actual translation is easy. I'm almost there. * Noah Sheppard nhshepp...@taylor.edu [2008-12-15 08:52 -0600]: I modified it slightly so that I get the current folder path in a variable on its own so I can be free to play with it further: folder-hook . set my_oldrecord=\$record folder-hook . set record=^ folder-hook . set my_curdir=\$record folder-hook . set record=\$my_oldrecord Once I had time, this was very helpful - thanks to both you and Kyle. The next step is to strip down that name so I have only the folder name, not the full path. The best way I can think to do this would be to pass the full path folder variable to a shell command which will strip that down, and return the folder name to another variable (or the same one, I don't care). I'm stuck at figuring out how to pass a mutt variable to a shell command. I tried your way for a bit, but was unable to make it work - here's where I'm at now. #v+ folder-hook +lists.* set my_oldrecord=\$record folder-hook +lists.* set record=^ folder-hook +lists.* set my_curdir=\$record folder-hook +lists.* set record=\$my_oldrecord folder-hook +lists* set shell=\~/.mutt/gen-set-from.pl \$my_curdir sleep 0.5\ folder-hook +lists* push shell-escapeenter folder-hook +lists* push enter-commandsource ~/.mutt/list-fromenter #v- Some explanation is in order. The gen-set-from.pl script takes the current mailing list mailbox name (something similar to =lists.mutt-users) on the command-line, and writes the file list-from containing the line set from=dave-lists-mutt-us...@weller-fahy.com. Right now everything works except from never gets set. I thought this might be because of the timing (source happening before the link is created), so I added a 0.5 second sleep after list-from generation. Adding the sleep did not fix the problem from never gets set because the source command runs before the shell finishes creating the link, but I'm not sure. At this point I've been staring at the problem for too long. Can anyone suggest a fix for this? Regards, -- dave [ please don't CC me ]
Re: fixing email dates
* Rocco Rutte pd...@gmx.net [2009-04-28 05:02 -0500]: It would be nice if you could keep an eye on database file sizes. If the db libraries don't reuse freed space (either by deleted or updated entries), then we get a growing db file. I'm running HEAD with your patch, and am running the following commands at 2330 local every night. #v+ find ~/.mutt/cache/ -iname *.hcache -printf %p %s\n | sort -u ~/.mutt/$(date +%F).hcache diff -uwd ~/.mutt/$(date -d $(date +%Y-%m-)$(($(date +%d)-1)) +%F).hcache ~/.mutt/$(date +%F).hcache #v- I'll review in a few days and see if the header caches for my ham/spam training folders reduce after I empty them. Regards, -- dave [ please don't CC me ]
Re: fixing email dates
* Kyle Wheeler kyle-m...@memoryhole.net [2009-04-23 12:01 -0500]: I'm using it since a few days (no imap, only local Maildir), no problem so far. I've been using it for a few days now too, with IMAP only, and it seems to work fine for me. I have been using it, IMAP only as well, since the 18th of April, and have had no problems. -- dave [ please don't CC me ]
Re: can not go to the message I want to undelete
* Chris Jones cjns1...@gmail.com [2009-04-21 21:26 -0500]: Nobody I know is able to hit Shift+d by accident. My cat can... wait, I'm assuming he does that on accident... hrm. ;) -- dave [ please don't CC me ]
Re: can not go to the message I want to undelete
* Zhengquan Zhang zhang.zhengq...@gmail.com [2009-04-21 19:58 -0500]: I accidentally used 'd' on a message and can not go back to it. I tried to use arrow keys to go back to it and use 'u' to undelete it but it just failed to do so. I have 'set delete=yes' in muttrc. So once I quit mutt, the message will be automatically deleted. I don't want this to happen. Perhaps you could simply select the message by typing its number, then 'C' to copy it, and select the current mailbox as the destination? That would result in a duplicate message existing if your undelete efforts succeed, but even if you lose the original message you'll have the copy. Regards, -- dave [ please don't CC me ]
Re: a puzzlement
* On 18 Apr 2009, Paul E Condon wrote: When Mutt closes, it invariable issues the message: Mailbox is unchanged. Do you sync-mailbox before you quit or exit? Mailbox is unchanged means that no messages were changed since the last sync. (It doesn't count changes since startup, just changes to the current context; and the context is reset whenever you sync.) -- -D.d...@uchicago.eduNSITUniversity of Chicago
Re: what is the benefit of imap? Another meta-question.
RfC1939 explicitely states that the maildrop (mailbox) needs to be locked once a client is authenticated, see section 4. It doesn't say what exactly the lock means, though. At least I read it like that. This is drifting pretty far away from mutt, and I doubt any of us are writing new POP client code, so I'll keep this shortish. :) I imagine that I understand why the draft suggests a mailbox lock, but I think it's wrong to interpret that as a real requirement of POP. RFC 1939 predates BCP-14 (RFC 2119) and no MUST/SHOULD is present. Absent such terminology (and reasons for using it) I think that a protocol RFC doesn't get to prescribe the exact behavior of the server as long as the interface goals are met, and this can be done without an exclusive lock on the whole mailbox. What 1939 describes may be necessary for some server implementations, but not for all. -- -D.d...@uchicago.eduNSITUniversity of Chicago Just to clear the deck, I own no monkeys.
Re: what is the benefit of imap? Another meta-question.
I think the best summary is that IMAP is a remote mailbox access protocol, supporting all common mailbox operations at the protocol level. POP is not: it supports full message retrieval, new-message scan (kind of, via UIDL), and deletion. This makes it, at best, a queued message pull protocol. But as someone else said, IMAP is just more flexible. You may not need all the features of IMAP, but since it fully encompasses everything that POP supports, why not use it? so the leave mail on server option that most pop-clients have is certainly not a convenient way to access your mail remotely from different locations. If you have minimal needs, it works alright. It's implementation- dependent since it's not done at the protocol level, but POP servers can track basic message and mailbox status. Plus: POP needs locking, i.e. only one client at a time can access the mailbox which implies that tools should not perform time-consuming tasks while they have a POP session open. That's implementation-dependent though. A server might require locking, but it's not inherent to the protocol and it's possible to implement one that has few of the contstraints that people have mentioned in this thread. But historically, there are few really good POP servers, so in practical terms you're not wrong. Most of the things that people cite as flaws of POP are really flaws in particular implementations, not in the protocol. The POP protocol is limited in scope, but I don't think this is a flaw; POP just has a different design goal. (That said, it's really too bad that the POP and NNTP groups didn't join forces from the start. With an NNTP server that supported authentication and operationally understood the goals of user-oriented mailbox access, it would have been a completely reasonable alternative to both POP and IMAP, and much closer to IMAP in spirit.) -- -D.d...@uchicago.eduNSITUniversity of Chicago Just to clear the deck, I own no monkeys.
Re: Sort by thread, but not by date of first mail
* Nathan Huesken m...@lonely-star.org [2009-02-19 05:04 -0600]: I really like the thread sorted view of mutt. But I would like a little change: I would like the threads not to be sorted by the date of the first mail but by the date if the most recent mail... Is this possible? Here's what I have in my muttrc file: #v+ set sort=threads # Set the sort method in the index menu to threads. set sort_aux=last-date-sent # List the most recent threads last. #v- It works for me. Regards, -- dave [ please don't CC me ]
Re: does mutt splitting large messages?
On Thu, Feb 12, 2009 at 02:15:05PM +0200, Robert Spencer wrote: On Wed, Feb 11, 2009 at 12:18 PM, Andrey Zhidenkov wrote: Can mutt split a large messages and send it with a several messages? I need to send a big file, but gmail doesn't allow it. There are other ways to split a file. On BSD/Linux/Mac OS X cut will do it and then you use cat to paste it all back together. iirc, tar can also split files and join them back together. I think 'split' is what you're looking for. 'cut' is used to cut out a certain part of a line, not to break a file down into smaller pieces. David
Re: Where did this line come from?
On 07 Feb 09 16:03, Rem P Roberti wrote: I must be getting senile. Either I have never noticed this before, or I inadvertently messed something up in my .muttrc. Observe: -N F- 1/1: Rem P Roberti test -- (all) Date: Sat, 7 Feb 2009 15:56:40 -0800 ... Where on earth did the first line in the header (preceding the date) come from? It is Mutt's statusbar and you certainly did set the variable status_on_top to yes so the statusbar ist displayed ... on the top. See: - L- 3/9: Rem P Roberti Where did this line come from? -- (all) From: Rem P Roberti remeg...@comcast.net To: Mutt List mutt-users@mutt.org Subject: Where did this line come from? If you see this line while viewing a message in the pager it probably *looks like* a header because you changed the coloring. Best regards, David -- Email. maus.da...@gmail.com Jabber dmj...@jabber.org ICQ... 241051416 OpenPGP... 0x316F4BE4670716FD signature.asc Description: Digital signature
correct usage of my_ vars
Hi, I have several spam reporting macros like this one: macro index,pager Se enter-commandset nocopy noautoedit nomime_fwd editor=/bin/trueenterforward-messagesp...@ebay.comenterkill-linephishing attempt reportentersend-messagedelete-messageenter-commandset copy autoedit nomime_fwd editor=\vim +'/^$'\enter SPAM REPORT To avoid repeating the same 'set' and 'unset' commands for each macro I thought about putting them in my_ variables: set my_begin_spamreport=enter-commandset nocopy noautoedit nomime_fwd editor=/bin/trueenterforward-message set my_end_spamreport=enterkill-linephishing attempt reportentersend-messagedelete-messageenter-commandset copy autoedit nomime_fwd editor=\vim +'/^$'\enter The result is this shorter, more readable macro: macro index,pager Se $my_begin_spamreport sp...@ebay.com $my_end_spamreport SPAM REPORT The shortened macro seems to work well, however as this my first use of my_ variables I thought I'd ask the list for a quick review of the above for correctness. Thanks,
Re: Delivering system mail
On Fri, Jan 30, 2009 at 08:57:47AM +0200, Tolga wrote: Thanks for the response, Patrick. I get line two, but wouldn't line three of the recipe have to read $HOME/Mail/system/? Rem Add MAILDIR=$HOME/Mail at the beginning of your .procmailrc and amend the recipe Patrick gave to :0: * ^TO_.*root system/ With procmail's special ^TO_ pattern you don't need .* : :0: * ^TO_root system/ My own system message filtering works this way: - each machine on the network sends their 'root' message to a filter-friendly address: root+admin-mymach...@example.com This is done with a simple postfix virtual rule on each box: /^root@/ root+admin-mymach...@example.com - these mails are all relayed to the central mail host, where /etc/aliases points any 'root' mail to my own account, - my .procmailrc then filters them: ## pseudo variable $1 can't be used on condition line: copy the value to ARG EXTENSION=$1 ## ## admin and cron messages :0 * EXTENSION ?? ^admin-\/.* .Admin.$MATCH/ -- http://www.critikart.net
Re: Certificate
Hi, On 22. Jan 2009 08:59, Tolga wrote: How did you generate it in the first place? And what server software are you using? (Really, this is a question better suited for the support forums of your email *server* software, rather than your *client* software.) I had no idea I generated it, and I am using Postfix. If mutt is complaining about the expired certificate when you are _sending_ Mail, it's up to Postfix: https://help.ubuntu.com/8.10/serverguide/C/postfix.html, Section SMTP Authentication explains how to create a self-signed digital certificate for postfix. If mutt complains about the certificate when logging into a mailbox, it's up to your IMAP/POP3 server software. Check the Ubuntu serverguide for the help on creating a certificate for your IMAP/POP3 server software. Regards, David -- Email. maus.da...@gmail.com Jabber dmj...@jabber.org ICQ... 241051416 OpenPGP... 0x316F4BE4670716FD signature.asc Description: Digital signature
Re: saving from IMAP folder F to F deletes
On Wed, Dec 17, 2008 at 01:19:06PM -0800, Brendan Cully wrote: On Wednesday, 17 December 2008 at 15:15, David Young wrote: Today I have found that if I save a message M in IMAP folder F to the same folder F, and then I sync folder F by tapping '$', then message M is no longer present in F. This is different behavior than I expect for two reasons: saving a message should not be a destructive operation, no matter what the destination folder. Also, this behavior on IMAP folders is not consistent with the behavior on mbox-format folders, where saving to the same folder duplicates the affected message before marking it 'D'eleted---that is, the message is not destroyed. In my 1.5.18 IMAP behaviour is identical to mbox. Thanks. I am running 1.5.18, now, and the behavior is closer to what I expect, but still a bit nerve-wracking. If I save a message M that is in my inbox back to my inbox with s!Enter, then mutt adds a 'D' flag to M. No duplicate of M appears. According to the state in the index, it sure looks like I deleted M. Indeed, if I sync the folder by tapping '$', M disappears. Now it *really* looks like I deleted M. :-) The message isn't really gone, though: if I load my inbox in a second instance of mutt, however, there is message M. Under the same commands as above, the behavior of a local mbox's index is a lot more desirable; I wonder if it is very hard to replicate that behavior on the index of an IMAP folder? Dave -- David Young OJC Technologies dyo...@ojctech.com Urbana, IL * (217) 278-3933
Re: sendmail?
On 27. Dec 2008 04:34, zirath wrote: Is there a way to set up mutt to send mail directly from our dynamic dsl address rather than thru the provider's mail server? As far as I know: no. Mutt is a MUA (Mail User Agent) what basically means it's responsibility for sending mails ends when it delivers the mail to an external program or your someones mail server who take care of delivering the mail where it belongs to. The task of delivering mails and all tasks arround that (i.e. find out which mailserver is responsible for the destination mail adress, handle responses of these server etc.) is performed by special mailserver software designed for doing exactly that (MTAs, Mail Transport Agents). So you *could* set up such software on your box that does the delivery but you probably wouldn't be happy with this solution as some mail providers do not accept delivery attempts from dynamic ip addresses for spam prevention. Regards, David -- Email. maus.da...@gmail.com Jabber dmj...@jabber.org OpenPGP... 0x316F4BE4670716FD signature.asc Description: Digital signature
saving from IMAP folder F to F deletes
Today I have found that if I save a message M in IMAP folder F to the same folder F, and then I sync folder F by tapping '$', then message M is no longer present in F. This is different behavior than I expect for two reasons: saving a message should not be a destructive operation, no matter what the destination folder. Also, this behavior on IMAP folders is not consistent with the behavior on mbox-format folders, where saving to the same folder duplicates the affected message before marking it 'D'eleted---that is, the message is not destroyed. Two questions: 1 Is this behavior fixed in mutt version 1.4.2.3 or later? (I run Mutt 1.4.2.1i.) 2 If the behavior is not fixed, where can I file a PR? Dave -- David Young OJC Technologies dyo...@ojctech.com Urbana, IL * (217) 278-3933
Re: saving from IMAP folder F to F deletes
On Wed, Dec 17, 2008 at 03:35:29PM -0600, Kyle Wheeler wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wednesday, December 17 at 03:15 PM, quoth David Young: Today I have found that if I save a message M in IMAP folder F to the same folder F, and then I sync folder F by tapping '$', then message M is no longer present in F. Interesting - I wonder if maybe your IMAP server is trying to be helpful in a nonstandard way. This is different behavior than I expect for two reasons: saving a message should not be a destructive operation, no matter what the destination folder. Unfortunately, the way it works normally is that moving a message between IMAP folders is actually a copy-then-delete-the-original operation. I believe the reason for this is buried in the problems of dealing with multiple IMAP clients accessing the same folder (the fewer semantics you have, the better), but I'm not certain. In any case, mutt is showing you how things really work. If you check out the IMAP RFC, there's a COPY command, but not a MOVE command. So all move operations are actually destructive operations My guess is that what is happening is this: as always, mutt tells the server to copy the message and then tells the server to delete the original. On *MOST* IMAP servers, the copy operation will create a duplicate message even if the destination is the same as the source. However, I'm guessing that on your server, copying a message into the folder it's already in is considered a no-op, so no actual copying occurs. Then, when mutt deletes the original, it's deleting the *only* copy of the message. If that's what's going on, then your mail server is broken; the COPY command is supposed to be able to create duplicate messages. The way to test this is to see what happens when you use mutt's copy-message function instead of save-message (by default, copy-message is triggered by tapping C). When you copy a message from a folder into the same folder, does your IMAP server produce a duplicate message? I just tried this on my inbox. 'C' works as expected: it duplicates the message. 's' deletes. The IMAP server is Dovecot. Dave -- David Young OJC Technologies dyo...@ojctech.com Urbana, IL * (217) 278-3933
Re: saving from IMAP folder F to F deletes
On Wed, Dec 17, 2008 at 04:19:56PM -0600, Kyle Wheeler wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wednesday, December 17 at 04:14 PM, quoth David Young: The way to test this is to see what happens when you use mutt's copy-message function instead of save-message (by default, copy-message is triggered by tapping C). When you copy a message from a folder into the same folder, does your IMAP server produce a duplicate message? I just tried this on my inbox. 'C' works as expected: it duplicates the message. 's' deletes. The IMAP server is Dovecot. Weird. What version? Dovecot 1.1.7 Dave -- David Young OJC Technologies dyo...@ojctech.com Urbana, IL * (217) 278-3933
Re: Remove old signature
Any pointers on how to do that with vim ? I don't let my editor (vi, not vim) strip signatures automatically. Sometimes I want to comment on the signature in my reply. I have a vi macro for signature-stripping: From main.d/070.delsig: Remove quoted signature, up to blank line map ; :/^[ ]* -- *$/;?^[ ][ ]*$?;.,/^[ ]*$/-1d All the sequences of whitespace above are spacetab, and the ^M is a control-M, not a caret and an M. Be sure to fix that if you copy and paste. Vim should be able to use this too -- if not, its vi compatibility is worse than I thought. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: save-message to ? and then sync the folder
* On 2008.11.27, in [EMAIL PROTECTED], * [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello how can I sync the mailbox after save a message to any folder like this: macro s save-message? the above works great, but after this save mutt should sync automatically. Like this: macro s save-message?sync-mailbox This works for me. macro index S 'enter-commandset my_folder=`mutt-prompt Save to folder \\`; push refreshsave-message$my_folder\enter\sync-mailboxenter' Be sure to enter it in only one line. The backslashes are wacky, but so are mutt's quoting rules. This is no typo; it really does work on my system. A mutt-prompt script is required; see attachment. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago #!/bin/sh ## ## usage: mutt-prompt prompt text ## ## In muttrc: ## set my_var=`mutt-prompt Folder` ## # save current tty state s=`stty -g` # redirect default i/o, saving current stdout in fd 5 exec 51 exec /dev/tty /dev/tty # reset tty state stty icanon sane onlcr # position cursor at bottom of screen rows=`tput lines` rows=`expr $rows - 1` tput cup $rows 0 # print prompt and read response printf ${1}: read answer # return response to mutt echo $answer 5 # reset tty state stty $s
Re: new mail to sender
Sorry for the maybe primitive question, but I couldn't find an answer anywhere: Sometimes I want to create a new mail (not reply) to a sender who is not in my aliases file. Is there a way to do it quicker then typing his email address? If you have edit_headers=yes, you can just use reply and delete the In-Reply-To: header and change the subject. But I understand that some people don't like edit_headers. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: searching in search results
Hi, * lee [EMAIL PROTECTED], 2008-11-19 20:36:43 Wed: is it possible to somehow search within search results? For example, if I want to find a message of which I know the From: header and a word or some words of the body, how do I find it when going by either the From: line or the body only would give too many results? I recommend Mairix as well, but otherwise you can simply use a more complex search pattern, such as `~fuser~bword', where `user' and `word' stand for the strings you are looking for. This pattern will only match messages that are both from `user' and contain `word'. -- David Haguenauer pgpQlaXhgp7Wk.pgp Description: PGP signature
Re: Customize To: field
* Michael Elkins [EMAIL PROTECTED], 2008-11-17 21:46:02 Mon: On Mon, Nov 17, 2008 at 09:32:52PM -0800, Brendan Cully wrote: Seems fine. Does anyone object? I think this makes sense. The user is already requesting that it be displaying this way in the index, so it should not be a problem to display it this way when replying. I was about to suggest making the To: change conditional on the value of a configuration variable, because reverse aliases may be used to reply to people who don't know how to spell their own name properly, and we may want to keep that kind of fix private. But then I noticed that the reverse-alias name is already being used in attribution lines, leaking the local alias to the recipient, so that adding it to the To header as well does not change the situation much. So, unless someone else advocates in favor of an extra configuration variable controlling this behavior, I guess I consider this change acceptable. -- David Haguenauer pgpaoJnY1fAF9.pgp Description: PGP signature
Re: unignore and regular expression help needed
I want to only show a a spam status header when the score is positive. In other words, X-Spam-Status:\ No,\ score=2.4... should be displayed, but X-Spam-Status:\ No,\ score=-2.4... shouldn't. Consider upgrading to mutt 1.5. Then you can do this: spam X-Spam-Status: Yes, score=([^-][^ ]+) %1 Now %H in your $index_format will expand to a message's spam score, but only if it's positive. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: sync mailbox
* Albert Shih [EMAIL PROTECTED], 2008-10-17 08:19:10 Fri: Le 17/10/2008 à 04:34:56+, Michael Kjorling a écrit On 16 Oct 2008 22:06 +0200, by [EMAIL PROTECTED] (Albert Shih): It's working but the mail a edit disapear from the mailbox and...and the new one not come. I must exit mutt and re-launch. Maybe I can wait long-time. What happens if you simply reload the mailbox? Stupid question : How I do that ? Do change-folder to the same mailbox, which you do by hitting c ^, with the default bindings. -- David Haguenauer pgp8TdFQd6IzC.pgp Description: PGP signature
Re: patch: signin signoff feature (1.5.18)
This entire discussion should be on mutt-dev. Followups set. Why can you set sig_dashes, if you could set it via signature? signature can be a file or a program. The signature turns out to be whatever is read from the file or whatever is printed to stdout by the program. This file or program may or may not include the dashes, so there's an option to let you tell mutt whether to assist by including them. The only simplification that doesn't remove functionality is to always assume that the signature provides its own dashes, and eliminate the sig_dashes variable. I would say that the reason for not doing that is that it's an extra hurdle for new users, who most likely assume that only the signature proper should be in the signature file. (If you're using a signature program, it's reasonable to assume you're an advanced user.) Maybe conditionally redundant describes sig_dashes, but it's not absolutely redundant. It may be redundant, but it depends on what the signature actually produces. I guess the proposed signoff variable is similarly conditionally redundant, but logically we can: * express signoff in terms of sig_dashes + signature, or * express signature in terms of sig_dashes + signoff, or * express sig_dashes in terms of signoff + signature. Having all three is strictly redundant, so adding signoff adds complexity. Adding a variable should introduce simplicity, convenience, functionality, or some other value. It doesn't add simplicity or functionality. Does it really add convenience? How often do you need to change this in a way that you can't as easily change sig_dashes and signature? -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: command mode?
On Sun, 28 Sep 2008, Michael Kjorling wrote: :push query Thank you for quick response. I see the syntax is to type :push first. memo Right. These symbols from the help screen are names of key bindings. Commands are different; they're what you putt in muttrc or after pressing the : key (the enter-command keybinding). The push command is the inverse of enter-command. Enter-command lets you initiate a command by pressing a key (:). push lets you enter keystrokes (or bindings) by entering a command. When you push keystrokes, you can use either literal letters, numbers, etc., or you can use binding names. Binding names are always inside angle-brackets, with no spaces. Keys substitude for the bindings they're bound to, but binding names can be used whether or not they're bound to a key. In other words, push arguments work the same way as macros definitions do. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
On RTFM
Of course one should always check the manual and try a web search before asking for help. This is a given, and I don't think there's any argument. It's not always easy to find what you're looking for in the manual, and it's not always straightforward to construct a search query that yields what you're looking for. Your success varies with multiple factors: your facility with reading *and* with writing English, as noted; the way you're framing the problem in your mind; the character of the problem; the terminology involved; the organizational structure of the manual vs. the kind of problem you're trying to solve; your existing familiarity with the subject and with the reference material available. These can interplay to make one person's search fruitless, or to suggest that further search will be fruitless, while another person might come up with the answer right away. So a person posts to a list that is nominally for providing support, answers, and discussion. How can I fairly judge whether he's read the manual, or how deeply? Just based on my knowing where the answer is, and thinking he should have found it too? I don't think that's a fair measure. Yet I don't think it's the point, either. Even if someone has not done his own legwork, how is anyone's time well spent for me to tell them publically to do so? I don't see that, as someone suggested, this is helpful. It's condescending. It's saying: it's there, you missed it. Look again. But I won't say where to look because I think the exercise of finding it yourself is good for you, grasshopper. Even in this thread, Bill's question just by being asked has sparked original discussion of other approaches than what you'll find in the manual. Is there no value in that? Does anyone suggest some other way to obtain that benefit, besides having and expressing a need? It's absurd to say that you should not post a how-to question to a mailing list until you're sure the answer is not already out there, or prepared with your flame-retardant jammies. If I don't have time to help with a basic question, or I don't want to, or I resent the simplicity of the question or the way it was asked, I don't reply. It's simple, it causes no grief. The question, unanswered, has done me no harm. I am facile with my 'd' key. What's the trouble? Let people ask questions honestly and politely, but if all you have to give is rtfm, with no reference or citation or vague hint at a substantive answer, then don't bother replying -- or at least keep it out of the mailing list archive and my mailbox, please. Save RTFM for abusive and demanding inquiries only, and you'll see less abuse and fewer demands. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: Index Column Width
I'm looking for a way to more strictly regulate the width of the columns in the index. For example, in my current configuration if an email address shows up in my index that is too long to be displayed in the parameters I have set for the From field (25 characters), it overflows into the subject column pushing my column formatting off. Is there a way to cut off names and addresses that run over? %-25.25F This is a printf-like string sizing specification. See the mutt manual or man printf for details. It's the .25 that makes the difference. The first 25 makes it a minimum of 25 characters; the .25 makes it a maximum. The - left-aligns. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: Automated message processing
On Wednesday, September 3 at 10:54 PM, quoth Peter Davis: Usually, the person responds to the who are you? message leaving the message body intact. So I want to have something embedded in the who are you? message that can point my script back to the original so-and-so wants to join message from Yahoo!, so I can reply to that. How about just a long random number? This works, but you'd need to store the valid random number someplace. For a zero-knowledge approach you could do something like generate an MD5 hash of the prospective member's e-mail address with some secret that's shared between the script that sends the 'who are you' and the script that processes the reply. This would depend on some reasonable parsing of the sender address, though (to reduce it to [EMAIL PROTECTED], discarding angle bracket enclosures and any real name present). -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: Dealing with Exchange meeting invitations
Can one accept/decline a meeting invitation by sending a reply in some defined format? If yes, where can I find some documentation on what the reply is supposed to look like? I don't have a good answer, but a cheap partial solution is to save invitations to imaps://exchange.your.org/Calendar to accept them. Not sure how to decline though, and this still depends on actually receiving the invitation. I've run across cases where the invite doesn't reach me as an IMAP user, I but haven't figured out why yet. (Time and concern haven't intersected.) -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: trash folder in 1.5.18
http://cedricduval.free.fr/mutt/patches/#trash is only upto the mutt version 1.5.5.1; there are no patches after that. I am guessing that it has been included in the original code. It has not been. Cedric hasn't updated it AFAIK, but a google on cedric duval trash patch turns up http://scie.nti.st/2007/6/21/mutt-trash-folder-patch-for-1-5-16 . Maybe that version will apply more cleanly to 1.5.18. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: mutt and plaintext passwords : muttrc encryption ?
On Mon, Jul 28, 2008 at 05:12:50PM +0100, Michele Martone wrote: Hello. I was wondering about some way to protect the passwords potentially stored in the mutt rc files (i have multiple acccounts, and I feel unconfortable remembering and typing all of them each time using mutt) on my Linux laptop. Hi, Provided you have shell access on your imap host, ssh can help you eleminate all passwords from you muttrc: 1) generate a ssh key with a passphrase identical to you login password, 2) when entering your gnome or kde session your key should be decrypted, (if using xdm then you need libpam-ssh) and ssh-agent active, 3) configure password-less ssh access to your imap and smtp host, 4) add (and adapt) these lines to your .muttrc account-hook ^imaps?://your.imap.host/ 'set tunnel=/usr/bin/ssh your.imap.host /usr/bin/imapd 2/dev/null' set sendmail=/usr/bin/ssh your.smtp.host /usr/sbin/sendmail -oem -oi Look Ma, no passwords! If you don't have shell access to your mail host, then I suggest you get a hosted account or (better) a linux virtual server, they are really cheap these days (starting at 6 euros at http://www.gandi.net/hebergement/). Then forward all other accounts to this central one.
Re: mutt and plaintext passwords : muttrc encryption ?
:source echo set my_var | All I get is the error message: source: errors in echo set my_var | :set my_var yields my_var: unknown variable too. Try, for example, :source echo set ?index_format | I was going to suggest this approach as well, although I'd have proposed openssl enc instead of gpg, I guess. Not much call for an asymmetric cipher here, especially as the point is to store secret data on a filesystem that contains the key for decoding the secret data. (I'm sure your gpg key is secure and all, it's just that no stored key encrypted key.) I'm kind of surprised you've missed my dozens of messages recommending source with pipes, Kyle. :) It's super useful. My entire muttrc is generated this way. Thanks to the OP for asking the question, though. I hadn't thought of using programmic sources to encrypt sensitive muttrc files. Embedding programmatic source statements within programmatically-generated muttrc streams... tasty. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: use script output as regex pattern in folder-fook
folder-hook folder1|folder2|folder3 ... I replaced this with folder-hook script.sh| ... This approach won't work. Here's why, and a possible alternative. The script.sh| notation for incorporating a script's output into your muttrc only works where mutt knows that it's looking for a filename or a format string. Otherwise, script.sh| is just a literal string. In your case, it's a regular expression listing a set of either-or patterns, and one of these patterns is an empty string, which matches everything since all strings contain an empty string as a subset. As Michael said, you can use `script.sh` instead. This should work equally well for most purposes. The only difference is that script.sh|, when it works, executes the script each time that the value is evaluated. `script.sh` executes the script only once, at the time that the muttrc is processed. This makes script.sh| really useful only when used for set variables that are evaluated multiple times. Hooks are evaluated only once anyway, so it wouldn't really be meaningful. If you really need the same kind of dynamic meaning that script.sh| provides over `script.sh`, you might be able to use a compound folder-hook -- something like this: folder-hook . 'folder-hook \`script.sh\` command...' or perhaps: # all other folder-hooks in folder-hooks.mutt folder-hook . 'source folder-hooks.mutt' These are untested, but its intention is that for each folder change, mutt will interpret folder-hook `script.sh` command... again. I'm not sure that the second folder-hook would actually be applied to the new (now current) folder, though. It might be necessary to reopen the folder to make the new folder-hook stick, and that's so unusable as to make the whole approach worthless. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: robots [ was Re: Alternative Identities ]:wq
Question for people who post here more frequently than I do - is it normal to get a challenge/response mail from [EMAIL PROTECTED] when posting here ? It's typical (I get one every time I post), but it's not normal (in the sense that it shouldn't happen). Challenge/response should never be used for mail that you receive as a list member; it's really, really irritating to other list members. It's understandable (if somewhat annoying) as a posting filter on a list -- just not as a receiving filter on your personal subscription. I'd like to see the subscriber in question removed from the list -- evidently he's not getting list mail anyway. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: use script output as regex pattern in folder-fook
You can work around this by putting MUTTDIR in your shell environment before running mutt. Hmm, how do you read my mind? :) :) Well, I actually do this for a few variables -- predating the $my_xyz feature. I should switch where I can though, so I can drop the setenv patch. (Lets me stuff things into the environment from inside mutt.) A more elegant solution could be a config var $configdir or $scriptdir for people who - have more then one script laying around in ~/.mutt (or wherever) - don't want to put Mutt-specific scripts in a location on $PATH You also can do this in ~/.muttrc: source ~/.mutt/muttrc.py| and generate your real muttrc programmatically: another way to do things like macros/variables and search paths, and you also get to automatically define hooks, lists, etc. based on the contents of your filesystem. But once again this only executes at startup -- it doesn't update itself continuously. If you're ambitious enough you could set mutt up to reload much of its configuration every time you change folders, or something. But I'm not sure how useful this really is for most people. :) -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: gbnet address still used for mutt-users list?
A few years ago messages to the mutt-users list (from Germany?) were occasionally ending up in my inbox because they had been sent to what was apparently some sort of alternative address for the list: [EMAIL PROTECTED] Is anyone aware if this address is still in any way active for the list? That was the original address for the list, before mutt.org began fronting for it. It's still the domain that handles the list though: % host -t mx mutt.org mutt.org mail is handled (pri=10) by dm.gbnet.net mutt.org mail is handled (pri=20) by spamgizmo.flirble.org So it almost certainly still works, and it's probable that some day someone will use it. If it is not, I'd like to remove the following from my .procmailrc: :0 * ^Delivered-To:[EMAIL PROTECTED] $HOME/Mail/m/ Just use a List-* header instead: List-Post: mailto:mutt-users@mutt.org It's too bad Majordomo doesn't offer List-ID, but List-Post will do. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: gbnet address still used for mutt-users list?
Not sure what you mean by use a List-* header -- I'm trying to clean out Several RFCs (e.g., 2369, 2919) specify mail headers beginning with List-. These culminate (I guess) with inclusion in RFC 4021. Most modern mailing list managers support one or both of List-ID or List-Post. You can write a single rule or two that will categorize almost all lists appearing from a mailing list, and dispose of almost all rules dealing with specific lists. # Discover mailing lists with List-Post: set :0 * List-Post: mailto:\/.* { # To set LISTNAME to whole posting address: #LISTNAME=`echo $MATCH | cut -d'' -f1` # TO set LISTNAME to LHS of posting address: LISTNAME=`echo $MATCH | cut -d@ -f1` } ## [insert other rules which update LISTNAME for edge cases] # File discovered list mail into per-list archives :0 c * LISTNAME ?? . $HOME/Mail/lists/$LISTNAME # Add X-Label for list name :0 f * LISTNAME ?? . | formail -I X-Label: $LISTNAME -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: index_format setting to show yr
Is there any way to setup mutt (the date_format variable?) such that in the index view, the year is shown only if the year of the message is different from the current year? The default %d shows only the Month date. You need the date_conditional patch to make date formats conditional upon relative date offsets, but even so you can only say in the last 6 months or the like -- not in the current year. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Unable to sign messages with gpg
Hi, I am trying to use gpg with mutt. When i try to sign an email with S-s, i get the following error Can't sign: No key specified. Use Sign As. When i try using Sign as S-a, i get the following error /.index: No such file or directory (errno = 2) I can use gpg from the command line to sign and encrypt documents its only a problem in mutt. Here are the entrys from my .muttrc file set pgp_sign_command=/usr/bin/gpg--no-verbose --batch --quiet --outpu t - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f et pgp_clearsign_command=/usr/bin/gpg --charset utf-8 --no-verbose --bat ch --quiet --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f TIA David
Re: Hi all, is there anyone knows how to send bigger attachments
Thanks. But I am using a Linux system, and the file is just about 6M. I am just curious that where can I find the so-called system restriction ? It could be on your system, or it could be on the one that your system relays to when it sends the message on to the recipient. Where you find the configuration depends on what MTA you're using. If you're using sendmail, it's probably in /etc/mail/sendmail.cf and/or /etc/mail/sendmail.mc. If you're using postfix, it's probably in one of the files in /etc/postfix -- perhaps main.cf. Check your MTA's docuementation for whatever distribution of Linux you're using. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: Sorting messages by score AND keeping threading - is it
Question: Is it possible to maintain the following threading whilst viewing messages in sorted by score mode ? folder-hook . \ set sort=reverse-threads ;\ set sort_aux=last-date-received ;\ set duplicate_threads=yes ;\ Not really. Mutt's threading is implemented as a sorting mechanism rather than some other layer, and unfortunately mutt is coded in multiple places to honor only two sort functions. Daniel Eisenbud did the last major overhaul of mutt's threading code. Shortly after he finished it he proposed taking a further step of either separating threading out from sorting, or permitting more than two sort functions. I gather there wasn't very much interest from people with substantial use cases. I think perhaps the only vaguely common use case for having two sort keys in addition to threading involves scoring, and I'm not too sure that very many people actually use scoring. You might approximate this if you can find a way to mix (last-)date-received into score, but whether that's feasible depends on your mailboxes and your habits. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: Mutt hangs, Network Issue?
This Mutt hangs/freezes probably 10-15 times a day. It is completely unresponsive. If I open a second ssh session, and kill the mutt process, it generally takes maybe 30 seconds for mutt to let go, and to get a shell prompt back. If I don't manually kill mutt, and just So you regain control of mutt's session when mutt dies to a kill signal? Can you also suspend mutt (control-Z) from within the same session, or only from outside? Does mutt freeze while you're actively using it, or only while you're idling? Or both? Is it at all possible that the freezes are related to software flow control signals (normally control-S = stop; control-Q = start; but see `stty`)? This seems unlikely since you said the problem started with the installation of a NATting router, but it's sometimes worth asking. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: Mutt hangs, Network Issue?
What should a functional control-z tell me? If control-Z works, your transport (ssh) and terminal are still fundamentally intact, and responsive to low-level traffic and out-of-band signals. (It means that mutt is responsive to signals too, for that matter -- once it receives them.) Does mutt work again once you bring it back to foreground, or does it remain hung? If it hangs, and you type a bunch of stuff followed by control-Z, and then foreground mutt, does all the stuff you typed suddenly appear to execute at once? Does it appear to have already executed long ago? Or is it ignored? This all serves to indicate what stage things are at when mutt appears to be unresponsive. You might also check the debug log during a suspend instead of after a kill; this could help pinpoint more exactly what mutt thought it was up to. If you have gdb installed and you're familiar with it, you might try attaching gdb to the hung mutt process from within another terminal. That is: window 1window 2 -- -- + ssh in- ssh in + run mutt - get mutt's process id from ps for example: 14001 + do stuff, wait for a hang - attach gdb to the mutt process for example: gdb /usr/bin/mutt 14001 - get a backtrace, minimally type: backtrace This will tell you more finely than debug logs will what mutt is doing at an exact moment that it appears hung, but it's quite possible that it's just waiting for input that's simply not arriving. The logs will tell what it *has* been doing up until that, but it might not be anything special. Honestly this has the feel of an ordinary session timeout at the network level, which wouldn't be surprising. But you said that it happens only with mutt, and not even with an idle shell. That's what seems strange to me. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: Change mail folder without pressing = first?
The subject line hopefully says it all: the one thing that bothers me most in mutt is that I have to press = before changing mail folders. Is there a way to change this behaviour, so that I can type c and then directly the name of the mailbox? On my keyboard (norwegian), the = key is a macro index c change-folder= -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: pass single-quoted arguments to external script
So how do I properly escape the single quotes in the vim args Personally, as soon as I start having trouble figuring out how to quote things withing multiple layers of parser, I ditch the headache and put the command into an external script that accepts only the minimum arguments from mutt (i.e., the values that only mutt knows). In you case, I guess that would be approximately: send-hook ... 'set editor=mutt-xvim' $ cat mutt-xvim #!/bin/sh exec xterm -e vim '+/^--[ ]*$' -c 'read some_file' $@ I know that's a level of abstraction away from what you were aiming for, but time is just too precious to spend it on all the various (and they indeed vary) quoting idiosyncrasies, unless that sort of thing is fun or educational for you. And by putting mutt-specific scripts into a mutt namespace, as it were, you're not really causing any layering conflicts. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: changing subject of all messages in a thread
part of a subthread? I know how to set $editor to get it to do this automatically, but how do I convince mutt to spawn the editor on all tagged messages or messages of a subthread without manually iterating? set editor=perl -pi -e 's/^Subject: .*/Subject: mwahaha/;' %s [tag some messages] tag-prefixedit-message -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: changing subject of all messages in a thread
/me wants mutt to have a prompt function. prompt would be handy. Meanwhile, you might try something like: $ cat mutt-subject-edit #!/bin/sh printf New subject: /dev/tty read subj /dev/tty cat X set editor=perl -pi -e 's/^Subject: .*/Subject: $subj/;' %s X :source mutt-subject-edit | [tag some messages] tag-prefixedit-message Untested. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: Accessing raw mail data?
On Fri, Apr 25, 2008 at 02:46:24PM +, Michael Kjorling wrote: Short of saving a message to a separate folder and opening that in a text editor, or digging out the correct Maildir file using a general-purpose file manager, is there a way in Mutt to access the raw (undecoded) data of an e-mail? You can pipe it to some external app by using the 'pipe-message' command, which is by default bound to | (pipe). Just make sure 'pipe_decode' is set to 'no' (the default value). Some examples: (First select desired message) Open in less: |lessenter Open in vim: |vim -enter David
Re: Output matching line in message body on ~b pattern match
On Tue, Apr 15, 2008 at 03:22:26PM -0400, Ethan Mallove wrote: If this is not possible, is there a way to download all the matching messages to a local filesystem so I can grep them? I don't think it's possible to show matching lines in mutt. However, you can copy matching mails to a Maildir-type mailbox. Set $mbox_type to Maildir and copy matching mails to a new mailbox. That would be something like :set mbox_type=Maildirenter Set mailbox-type to Maildir T[YOUR SEARCH PATTERN]enter Tag all matching mails ;C=my_matching_mailsenter Copy them to a new Maildir-mailbox named 'my_matching_mails' That's in case you didn't remap any of the default keys. Maildir-style mailboxes save messages in different files, so you can grep through them. $ grep -Hni [YOUR SEARCH PATTERN] my_matching_mails/{cur,new,tmp}/* Problem is the overhead of typing the search pattern twice, once for mutt and once for grep. Maybe one could write a macro/script-combo for this purpose. Or you could convert your mailboxes to Maildirs. Also, you maybe want to have a look at mboxgrep. It's a tool for searching through multiple mailboxes. It's also possible to save matching messages to a new mailbox. I don't know if you can save to a Maildir mailbox though. HTH, David
Re: to hook script
On Tue, Mar 18, 2008 at 02:40:04PM +0100, Albert Shih wrote: How can I write a to hook script ? For example : When I send a mail to X I want modify my From field When I send a mail to Y I want modify my Reply_to field. etc. Have a look at 'send-hook' and 'send2-hook' in mutt's documentation. David
Re: to hook script
Hi Albert, * Albert Shih [EMAIL PROTECTED], 2008-03-18 14:40:04 Tue: How can I write a to hook script ? For example : When I send a mail to X I want modify my From field When I send a mail to Y I want modify my Reply_to field. Do you mean something like the following? send-hook . 'my_hdr from: default-from; my_hdr reply-to: default-reply-to' send-hook X 'my_hdr from: x-from' send-hook Y 'my_hdr reply-to: y-reply-to' -- David Haguenauer pgpGd2RM3xOyz.pgp Description: PGP signature
Re: how does threading get disabled?
* [EMAIL PROTECTED] [EMAIL PROTECTED], 2008-03-06 16:07:25 Thu: Every once in a while I find that email is no longer shown as threaded, and I can't figure out how to turn it back on. Hitting esc-V makes it say that threading is disabled. Any help? You want sort-mailbox thread, which you get, with the default bindings, by typing ot. -- David Haguenauer pgpk4WskBh7Q4.pgp Description: PGP signature
Re: folder tab-completion to offer only folders containing new
On Fri, Feb 22, 2008 at 05:59:32PM +0100, Vladimir Marek wrote: would there be possibility to have some sort of folder name completion which would offer only folders with new mail? Let's say that after pressing '.' I can see: New mail in =INBOX, =vim-dev, =mercurial-devel Try this: Press c to get to the change-mailbox prompt and then press space repeatedly to cycle through the mailboxes containing new mail. David
Re: copy on a per email basis
Do you want to press a key to make mutt save messages to a specific folder, but to not do so if you do not press this key? Yes, exactly, without even having to answer the Yes/No question (if I set ask-yes, or ask-no option) every time. This might do it. ## Set copy to no when initiating new messages send-hook . 'set copy=no' ## Set copy to yes when you press control-K at the compose menu macro compose \CK 'set copy=yes' -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: A few mutt questions
1. I'd like to have new or unread mail (what's the difference, anyway?) To mutt, 'new' means that the mail is unread and has arrived during this mutt session. 'old' means that it's unread but remains from a previous mutt session. But like another poster, I use them differently. For me, 'new' means 'unread', and 'old' means 'must reread'. Unmarked mail (neither new nor old) is read and can be removed. flagged somehow. Occasionally I see an N next to some messages, but in general mutt seems to completely oblivious to what's new or unreaed. It certainly supports this, but it depends on the mail source itself to say what's read. Mutt can alter these flags, but so can other tools. If you have other programs (other mail clients, or biff programs, etc.) reading your mailboxes, they could be interfering with your expectations of mutt. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: Setting subscribe/list within muttrc (using IMAP) [SOLVED]
* Rocco Rutte [EMAIL PROTECTED] [2007-09-06 06:19 -0700]: Just a minor note: When does this script get called? I'm asking because if it gets called more than once per session, you'll keep adding the same lines of folder-hook and subscribe all the time. Or do you clear them previously? Sorry, just noticed this email. The script gets called every time a new mailbox is entered. I do not clear the values, because I assumed that identical values would be overwritten. That may be a bad assumption. I'll have to contemplate my setup and see if there's a better way to do what I want to do, again. ;] Regards, -- David J. Weller-Fahy| 'These are the questions that kept me out largely at innocent dot com | of the really *good* schools.' www dot weller-fahy dot com | - One of The Group
Re: Reliable/safe way of removing empty maildirs?
On Thu, Dec 06, 2007 at 01:03:13PM +, Chris G wrote: What's a reliable way of removing empty maildirs? my /etc/crontab entry: for i in ~/Maildir/.*; do if [ -d $i ] [ ! $(find $i -mindepth 2 -type f) ]; then rm -rf $i ; fi ; done
Re: Reliable/safe way of removing empty maildirs?
On Sun, Dec 09, 2007 at 08:41:07PM +, Chris G wrote: On Sun, Dec 09, 2007 at 05:59:40PM +0100, Louis-David Mitterrand wrote: On Thu, Dec 06, 2007 at 01:03:13PM +, Chris G wrote: What's a reliable way of removing empty maildirs? my /etc/crontab entry: for i in ~/Maildir/.*; do if [ -d $i ] [ ! $(find $i -mindepth 2 -type f) ]; then rm -rf $i ; fi ; done Which is OK until some mail arrives between the find and the rm surely?! No, it is still OK: 1) if any maildir is missing the mda (procmail) will instantly recreate them 2) one should only prune empty maildirs for low-priority list/bulk mail
Re: Cc doesn't work
On Tue, Dec 04, 2007 at 03:05:44PM -0600, Derek Xu wrote: On Dec 4, 2007 12:04 PM, Kyle Wheeler [EMAIL PROTECTED] wrote: On Tuesday, December 4 at 10:28 AM, quoth Derek Xu: [cc doesn't work] What's your $sendmail variable set to? You could try setting it to '/var/qmail/bin/qmail-inject' (or wherever your qmail-inject binary is hiding). My $sendmail is set to a perl wrapper script because the mail server is not allowed to run on the machine where mutt resides on. Here is the link to the perl script: http://www2.zdo.com/articles/mutt-smtp-wrapper.php Maybe you should have a look at the $smtp_url variable. It enables you to relay your outgoing mails through an smtp-server. David
Re: Deleting attachment from signed email
How can I do this? Is it a principal problem, or a bug in mutt? It's unsupported because attachments are part of the signed data. If you delete the attachment, the signature becomes invalid. I would guess that this was a design decision, not an oversight (bug). But that's largely a semantic technicality. If you want to remove an attachment, first remove the signature. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago War is God's way of teaching Americans geography. - Ambrose Bierce
OS X (Intel) build problems
Hi, I'm new to mutt and I'm trying to build it on OS X (10.4.10, Intel), GNU make (3.80), and GNU gcc (4.0.1). I installed the ncurses-5.6 and libiconv-1.11 libs like the INSTALL file said I would need to. I then did ./configure and ./make install everything completed without errors. When I try to run mutt however it gives me the following: $ mutt dyld: Library not loaded: /usr/local/lib/libintl.3.dylib Referenced from: /usr/local/bin/mutt Reason: no suitable image found. Did find: /usr/local/lib/libintl.3.dylib: mach-o, but wrong architecture /usr/local/lib/libintl.3.dylib: mach-o, but wrong architecture Trace/BPT trap Any ideas? ~David
Re: How to send a return receipt
On 2007-10-17, Stephan Seitz wrote What you want is an invasion of privacy of every reader. It is not of your concern if and when a user reads your mail. Mr. Schoenfeld has stated several times in this thread that he is trying to respond to requests for a return receipt from his *customers*. It is his concern that his customers be satisfied. -- David Ellement
Re: How to send a return receipt
What you want is an invasion of privacy of every reader. It is not of your concern if and when a user reads your mail. Such a feature should never be part of mutt. Besides if you are sending a mail to more than one recipient or an alias, you will get a notification from every recipient. You're talking about MDN requests. The OP is asking for MDN reply support. While I agree that there's a privacy exposure in MDN arrangements, it's only an invasion if it's not wanted. If the OP wants to send MDN replies, he's volunteering his own privacy, and then what business is that of anyone else's? In privacy terms, the only thing you gain by disallowing this capability in mutt is the freedom to tell potential MDN requestors I can't instead of I won't. That's easier, but it makes mutt look bad. If your business environment requires MDN replies, then the upshot is that mutt is regarded as unacceptable in the business environment. Nobody wins. Your post brings up an interesting point, though. It's true that you can loosely or fully implement MDN with mutt as it stands, depending on how much work you put into your scripts, macros, and hooks. (That's even true of almost any automation feature currently built into mutt.) But a policy that MDN should not be implemented in mutt per se because of privacy concerns constitutes an acknowledgement that scripts, macros, and hooks are insufficient for certain legitimate interests. If there's a privacy concern, then mutt doesn't support MDN. You can't get both. On to the soapbox: Someone mentioned that support for MDN with current mutt is trivially simple, I think. That depends on how much support you want. It's fairly easy for an intermediate-level user to set something up that sends an MDN reply on a keystroke, without checking for whether MDN has been sent before, whether an error occurs, etc. For meeting the requirements of a business practice, though, that's not enough. I don't think this is very different from PGP support, except perhaps in how many people want the feature. You could set up a macro and script to PGP/MIME sign your mail, but it would grow wearisome if you sign often. If it's a business practice to sign all mail to customers, eventually you'll forget. What are the consequences? You can put in varying amounts of work to get the varying extent of support for MDN that you want (always MDN for sender X, never MDN for Y, ask for everyone else, etc.), but eventually it becomes a chore and a potential liability in certain environments. Eventually the reliability of the business process depends on better integration, and that leads to greater complexity in your add-ons. I would argue that the net entropy of several people maintaining varying degrees of hook/script based support for a feature as potentially complex (for an unbundled add-on) as good MDN support is greater than the entropy of a single point of maintenance. You can use this argument to defend the add-on model (there's no inherent reason that there should be more than one add-on), but with the differences among various user environments, support for all interests can become chaotic even faster than C code added to mutt, where there's a standard infrastructure that's already present everywhere by definition. Portable and full-featured scripts will tend toward chaos faster than bundled code, and that's why there's almost never a single canonical script to accomplish some task. What's really at stake is only who wants to assume the responsibility. I don't care much either way whether the patch goes upstream into the main code base -- that's a matter of what the maintainers feel is in demand enough to maintain, and either yes or no would be a reasonable decision in this case. (It's worth noting though that while it's the maintainers' responsibility to oversee the project and make feature decisions, they're not alone in providing support for bugs and extensions.) But I think the argument that it's just as good to do it with hooks and scripts is either very naive about what kind of support people would desire, or it's not very well thought out, no matter how many times the expression unix philosophy is invoked like a magical charm. All this can be said of any feature proposal, but it's critical to recognize how much the feature actually benefits from deeper integration with the mail environment. MDN does. Mowing my lawn does not. Mowing my lawn should be done by hooks and scripts. MDN depends on how much you want from it. For the most part, this thread has become a game of attrition, where the winner will be the last one to say is not or is so. Changing people's minds requires logic and empathy -- or radiation emitters -- so unless someone's hiding some creepy isotopes I'm not sure we're getting anywhere anymore. This really is up to the level of being a maintainer decision. Most of the people I've seen posting on this thread are mutt-dev readers, but if anyone
Re: How to send a return receipt
Well, the first thing that springs to my mind is some sort of message-hook (since that's what triggers when you view a message). The difficulty with this approach is that you don't want to send an MDN response any time you read the message, so you need to track whether the message has ever been read and MDN-replied to. You can do this with formail -D, but that involves an external Message-ID cache, separate from the message store, wherever that might be. I suppose that's one reason that Werner chose to implement this as a patch instead of as a set of macros/script(s). But it might not be compelling for everyone. The patch certainly provides better functionality than hooks, macros, and scripts do, given the usual constraints. Whether the better functionality is necessary functionalty is debatable, but I'm not sure it's worthwhile to debate it unless committers are wavering about committing the patch. Otherwise it's clear what you should do: patch mutt if you're comfortable patching, or settle for scripts if they're sufficient. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago Polka music needs to prevail. John Ziobrowski, Polka America Corporation
Re: How to send a return receipt
The difficulty with this approach is that you don't want to send an MDN response any time you read the message, so you need to track whether the message has ever been read and MDN-replied to. You can do this with What? Poppycock. If the New flag is insufficient (and I would argue it *ought* to be sufficient), you can simply add a header to mark messages by manipulating the $editor variable. For example: So in other words, you're tracking whether the message has ever been read. I just named one way to do it; each has its merits. The patch certainly provides better functionality than hooks, macros, and scripts do, given the usual constraints. I don't see what that missing functionality might be. Maybe I'm missing something. I didn't say missing, I said better. I haven't said there's anything fundamentally wrong with your approach; it's just not as -- as you said -- convenient. But why is this an argument? -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago Polka music needs to prevail. John Ziobrowski, Polka America Corporation
Re: hook \\.
On 2007-10-12, I wrote On 2007-10-12, Joseph wrote Why there is a \\.? The the muttrc file is read, the first backslash is removed, ... My apologies to the list for posting this after Mr. Wheeler had posted a much more informative reply. Messages are getting delayed in a queue here today, and it appeared to me that no one had yet replied after several hours. -- David Ellement
Re: hook \\.
On 2007-10-12, Joseph wrote I'm reading mutt manual and it has an example: save-hook me@(turing\\.)?cs\\.hmc\\.edu$ +elkins save-hook aol\\.com$ +spam Why there is a \\.? I know singe backslash \ turn off special meaning for . double backslash would indicate that it is a \ character. The the muttrc file is read, the first backslash is removed, so the send-hook then gets stored with the pattern having a single backslash. -- David Ellement
Re: How to send a return receipt
asked if we want to send such a return receipt. Is this configurable? I also read somewhere that mutt doesn't support that but I can't believe that. Is that true? This is correct. Mutt doesn't internally support MDNs. A patch has been posted by Werner Koch, but it might not be current. Check the mutt-dev archives. You can set up procmail or a similar mail filter to return a DSN if your mail server doesn't support it, but this lets the sender know only that the message was received, not that it was read. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago Polka music needs to prevail. John Ziobrowski, Polka America Corporation
Re: index_format - indicate which email has attachment
Did you properly configure all 'attachment' commands (see the system Muttrc file for examples) or did you just add '%X' to $index_format? You have to tell mutt what an you consider an attachment before %X does display the counts in $index_format. Right. You can type :attachments ? (no quotes) into mutt to see what settings it has now. The defaults come from the system muttrc: Current attachments settings: attachments +A */.* attachments -A text/x-vcard attachments -A application/pgp.* attachments -A application/x-pkcs7-.* attachments -A message/external-body attachments +I text/plain attachments -I message/external-body These basically mean that attachments with a content-disposition of inline will not be counted as attachments, unless they are content-type text/plain; and all messages with a content-disposition of attachment will be counted, except for the four types listed (pgp signatures, vcards, and external-body messages). Perhaps your message with an attachment doesn't qualify under these rules. But that's why you can change the rules. :) -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago Polka music needs to prevail. John Ziobrowski, Polka America Corporation
Re: index_format - indicate which email has attachment
Thanks Dave for the example, no my muttrc did not come with these defaults, and yes it works now. These defaults are installed when you build from source. Are you using a distributed package? If so, sounds like someone oopsed. It displays attachments but is there a way to suppress the 0 if there is no attachment. What Gary said. :) Personally I use something akin to this: %?X?{%2X}%4c? Which shows me attachment count if there are attchments, or total message size othewise. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago Polka music needs to prevail. John Ziobrowski, Polka America Corporation
Re: Generate Reply / New Mail in new shell session
It would be nice if it was possible to start a New Email or Replies in a new shell session and close it automatically when a mail is sent, without, going through postpone. Is it possible? Check the archives -- possibly a few years back. People have posted examples of how to do this using an external script and a macro. Basically you generate a draft file as normally, but set your editor to an external script that launches a new mutt instance in a new window using that draft file as a template. Then restore $editor and move on. Should be even easier now, with my_ variables. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago Polka music needs to prevail. John Ziobrowski, Polka America Corporation
Re: Send Later
As I understand, ssmtp does not support message queuing, which is possible in other mta's, but if there is any workaround to this (before I explore any other mta), would like to know it. Check the archives, possible several years back. People have posted scripts for this too. :) Basically you set $sendmail to a script that appends your outbound message to a folder (mbox or maildir, your call) and returns. You can have a cron job, an external script, or a macro that splits this folder (using formail, if mbox, or basic looping structures if maildir) and sends each message into ssmtp one by one. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago Polka music needs to prevail. John Ziobrowski, Polka America Corporation
Re: Generate Reply / New Mail in new shell session
All I was able to find is a solution with Ctrl-z putting it in a background and starting new session. That is not really a solution. Agreed. That's not it. I'm sure somebody has similar macro worked out, it is just a mutter of finding it :-/ Something along these lines might work. Untested. It's been years since I used xterm, so I'm not sure if the syntax below is correct for expressing what xterm should run. Might need to add sh -c and quoting, or somesuch. Maybe you need some more dressing, but perhaps this will get you started. If you want this only sometimes, you'll need to macro-fy the muttrc bits. $ cat external-reply #!/bin/sh DRAFT=$1 # hard-link our own copy of the draft so that mutt can remove original ln $DRAFT $DRAFT.tmp ( ## execute this in a bkgrounded subshell, ## allowing the original shell to exit xterm -e exec mutt -H '$DRAFT' rm -f $DRAFT ) exit 0 .muttrc: set editor=external-reply -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago Polka music needs to prevail. John Ziobrowski, Polka America Corporation
Re: how to cut attachments from mails...
how can I remove all attachments from a mail? The idea is, if someone Delete them from the attachments menu. Normally this means pressing 'v' while viewing the message in index or pager, scrolling to the attachment you don't want, and pressing 'd'. When the folder is synced, the attachments will be gone. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago Polka music needs to prevail. John Ziobrowski, Polka America Corporation
Re: sorting outgoing mail
Procmail is a delivery agent; it only handles incoming mail. Automatically sorting outgoing mail (i.e. putting mail into different folders as it is sent) requires send-hooks. While it's true that procmail can act as a delivery agent, it can also filter any mail that you feed into it. If you sent $sendmail to a program that first filters the message, then injects the message to SMTP, you can external outbound message filtering. #!/bin/sh ## ## Use this as $sendmail in mutt ## procmail -p -f [EMAIL PROTECTED] -m $HOME/.procmailrc.outgoing Make sure that .procmailrc.outgoing **always** acts on a message copy using rules beginning with :0 c. Then make sure that the last rule in .procmailrc.outgoing, the one that catches all messages coming into the filter, is like this: :0 | /usr/lib/sendmail -oi -oem -t I haven't tested this approach at all, but it seems like it should work. :) -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago Polka music needs to prevail. John Ziobrowski, Polka America Corporation
Re: Is SMTP with no authentication possible?
I use this: smtp_url=smtp://localhost/ (I run sendmail locally. I could use local submission via $sendmail, but I use the built-in SMTP code to exercise the code.) I also have certain send2-hooks which replace that with another SMTP server. You can replace localhost with your smtp server name, and submit without authn. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago Polka music needs to prevail. John Ziobrowski, Polka America Corporation
Re: Is SMTP with no authentication possible?
It still seems a bit odd that you have to compile it with SASL in order to get mutt to work with an SMTP server that doesn't require authentication. I don't think you do. $ mutt -v | grep -i sasl +USE_POP +USE_IMAP +USE_SMTP -USE_GSS -USE_SSL_OPENSSL -USE_SSL_GNUTLS -USE_SASL +HAVE_GETADDRINFO As Kyle said, try it with no username in $smtp_url, and $smtp_user and $smtp_pass unset. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago Polka music needs to prevail. John Ziobrowski, Polka America Corporation
top-posting and Re: signature at the beginning, not the end
Ok, I can see how its preferable to edit and reply at the bottom for mailing lists. I'm going to keep that in mind from now on. :) Jeopardy-style, answer-first is not always bad for other types of correspondences. This is fair. You said before that it seems like a matter of preference. I can agree somewhat, but it's really more a matter of general convenience to the _reader_, rather than to the _author_. Whether I'm posting to a conventional list or to an individual or small group, I try to anticipate the situation and post accordingly. (Sometimes top-posting makes most sense.) But obviously, the more people might be reading your message, the more you lose the ability to anticipate what works best for the reader. :) I'd like to think that's why it's called 'netiquette', btw: not because it's a strict behavioral convention, but because its goal is to honor the recipient's interests above one's own. I usually find that top-posting is only suitable for very concise answers to questions, or me too type stuff. If the reader is likely not to know what I'm talking about at a glance, it's better to trim context and tail-post. But I suppose there are probably exceptions, and I'm allowed some error in judgment. :) And sometimes I find it best to put text both before and after the quoted material. * As for your original question, because I sometimes top-post and usually do not, I don't normally use mutt for attaching my signature at all. Instead I have an editor macro to insert it at the current cursor line. Mutt inserts my signature automatically at bottom, but I usually end up deleting it and re-adding it during the course of trimming context. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: signature at the beginning, not the end
On 2007-09-14, Ben Gladwell wrote Maybe someone should explain to me what's so bad about top posting. Seems like a matter of preference to me. It *is* a matter of preference, as are good manners. Top posting puts the burden of putting the poster's reply in context and logical order on the readers; as such it is selfish behavior. Selfish behavior was once considered poor manners, even rude. If you choose to fart in a crowded elevator, expect some of your fellow travelers to tell you that you stink. -- David Ellement HP Confidential This e-mail message and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail message, you are hereby notified that any dissemination, distribution or copying of this e-mail message, and any attachments thereto, is strictly prohibited.
Re: signature at the beginning, not the end
On 2007-09-14, I wrote HP Confidential This e-mail message and any attachments thereto ... My appologies to the list. I didn't intend to include the disclaimer, but forgot to delete it. I should stick to posting replies from home. -- David Ellement
Re: Setting subscribe/list within muttrc (using IMAP) [SOLVED]
* Michelle Konzack [EMAIL PROTECTED] [2007-08-29 19:12 +0200]: Am 2007-08-24 23:49:36, schrieb David J. Weller-Fahy: Perhaps I'm looking for a feature that doesn't exist, and I'm almost certainly missing something simple, but here's the background: snip It seems there is no way in mutt... That is the way it seemed. However, after digging into the archives a bit deeper, and playing with a patch I found, I've come up with a solution that works for me (it does require patching, though). Details follow. Inspiration came from: http://marc.info/?l=mutt-usersm=99616338121641w=2 The patch exports the current mailbox name to an environment variable, then I source a shell script as part of a folder hook. The shell script parses the mailbox name to determine whether it is a list mailbox, then, if it is, outputs the muttrc commands I use for lists. I've tested this with all the lists I subscribe to, and it works with one caveat: All my lists are stored in the format =lists.list-name, so mutt-users is in =lists.mutt-users. While this makes it easy for my script to parse the name, it also means that my script/setup may not work for you. Hope this helps... I know it doesn't do everything, but it gets me a little closer. ;] I am too using a simplified code sniplet of uw-imap to get all directories (and number of NEW/READ messages ) from an imap-server... Would you mind sharing your sniplet? It may be a bit better than mine. Regards, -- dave [ please don't CC me ] # vim:ft=diff: This is a patch to place the current mailbox path in an environment variable whenever a folder-hook is called. This (trivial) patch was based on a message[1] on the mutt mailing list: [1]: http://marc.info/?l=mutt-usersm=99616338121641w=2 In fact, the ONLY differences are the name of the variable, and adding the patch name to PATCHES. ;] diff -r f467353f5657 PATCHES --- a/PATCHES Sat Mar 31 18:50:39 2007 -0700 +++ b/PATCHES Wed Aug 29 22:09:38 2007 +0200 @@ -0,0 +1,1 @@ +patch-tip-20070829-env_current_mailbox diff -r 3f8829e739e9 hook.c --- a/hook.cTue Aug 28 11:33:52 2007 -0700 +++ b/hook.cThu Aug 30 22:08:56 2007 +0200 @@ -282,6 +282,8 @@ void mutt_folder_hook (char *path) BUFFER err, token; char buf[STRING]; + setenv( MUTT_CURRENTMAILBOX, path, 1 ); + current_hook_type = M_FOLDERHOOK; err.data = buf; #!/bin/sh # .mutt/rc.testforlist.sh # This will only work if: # - $MUTT_CURRENTMAILBOX contains the name of the current mailbox in mutt. # - Your list directory structure looks like the following: # lists # lists.aklug # lists.mutt-users # lists.resnet-l # lists.[mailing list name] # # If your structure is not like the above, then tweak the code heavily. mailbox=`echo $MUTT_CURRENTMAILBOX | sed -r -e s/^imaps:\/\/[^\/]+\///` listpfx=`echo $mailbox | cut -d . -f 1` if test $listpfx = lists ; then test $mailbox != lists echo subscribe ${mailbox#lists.} echo folder-hook +$mailbox set from=dave-$( echo $mailbox | tr '.' '-' )@weller-fahy.com fi
how not to auto-load attachments?
Hi, When using imap with mutt-1.5.16 is there a way to not automatically load attachements when viewing the message body? Ideally when on a low-bandwidth connection I'd like to have access to the message text and select which attachments to download. I tried running mutt with auto_view turned off but it didn't change its behaviour. Thanks,
Setting subscribe/list within muttrc (using IMAP)
Perhaps I'm looking for a feature that doesn't exist, and I'm almost certainly missing something simple, but here's the background: I currently use a script to connect to my IMAP server, and get a list of all mail folders. I then parse that list to get the mailing list folders (all named list.mailing-list-name), and use that to generate the necessary rc commands (subscribe and from). I would like to remove that extra connection to the server, and just use rc commands plus a little shell scripting to do the same thing. I've searched TFM, and the mailing list via marc.info, but haven't been able to find anything useful. I believe I should be able to do what I need to do if I can figure out how to pass the value of ^ to the shell. So, is there a way to pass the value of ^ to the shell? If so, would someone mind showing me an example? If there is something about this in the manual/man pages/wiki/mailing list, a simple scoff and pointer will be sufficient. ;] Oh, and if there's an easier/better way to do this, please let me know. Regards, -- dave [ please don't CC me ]
Re: How to organize mail in folders?
On Wed, Aug 15, 2007 at 10:39:09AM +0200, M. Fioretti wrote: On Tue, Jul 31, 2007 12:25:04 PM +0200, Louis-David Mitterrand ([EMAIL PROTECTED]) wrote: Here is a mail strategy I refined over 10 years and that serves me well: - mail BCC'd to me is procmail'd in a ~/Maildir/.BCC folder, as are replies to my mailing list posts ... (procmail recipes available on request) Louis, yes, I'm really interested in your all procmail recipes, especially the one above (I'm trying to do the same thing myself). Configuration files for mutt and server side anti-spam are also welcome, if you can share them. Hi, Here are a few sections of my ~/.procmailrc: ## LDM's procmail file MAILDIR=$HOME/Maildir VERBOSE=on LOGABSTRACT=yes ## pseudo variable $1 can't be used on condition line: copy the value to ARG EXTENSION=$1 ALTERNATES=([EMAIL PROTECTED]|[EMAIL PROTECTED]) ## all mailing list mail comes in as vindex+lists-listname@apartia.org ## EXTENSION thus contains the list name :0 * EXTENSION ?? ^lists-\/.* { FOLDER=$MATCH :0 *$! ^From:.*$ALTERNATES *$! ^TO_$ALTERNATES * ! ^References:.*\(some|of|my|domains)\ * ! ^From:.*@(other|patterns|to|watch|for)\ * ! HB ?? (Louis-David|Mitt?err?and) ## skip if message has my name { # eliminate duplicate list messages :0 Wh: $HOMEMAIL/.msgid.lock | formail -D 32768 $HOMEMAIL/.msgid.cache :0 .$FOLDER/ } :0E ## else file in .BCC * ! ^From: mailman-owner@ .BCC/ :0E ## if from mailman-owner .junk-admin/ } ## file in .CC :0 *$! ()\/^To:.*$ALTERNATES *$ ()\/^Cc:.*$ALTERNATES .CC/ ## not in To: header, low-priority stuff :0 *$ ()\/^To:.*$ALTERNATES ## not to me *$! ()\/^From:.*$ALTERNATES ## from me *$ ()\/^X-Original-To:.*$ALTERNATES ## bounced to me { } :0E ## trick to OR inverted above conditions .BCC/ ## beep, it goes into INBOX BEEP=`/usr/bin/beep -f 2000`
Re: A question about macros, how to handle user input (if
E.g. I want a macro which does something, then does a s[ave] command (to which the user responds) and then does some more things after the save. This is not a complete or flawless answer, just a quick example of one way to do this. And it's untested. macro index = do-somethingenter-commandsource 'mutt-prompt \save as\ \push \save%s\enter\ |'enterdo-something-else If I didn't screw up quoting, this (1) does something, (2) enters the command source 'mutt-prompt save as push save%senter |' then (3) does something else. In stage 2, mutt-prompt (a) issues the prompt save as: (b) accepts input, then (c) echoes out save[your input here]enter. Because of the | at the end of the source command, mutt executes the commands echoed in (c), then proceeds to (3). Horrific, no? Mutt-prompt is attached. It's very straightforward. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago #!/bin/sh ## ## usage: mutt-prompt prompt text mutt commands ## mutt commands should contain a %s, which will be replaced by ## the user's response to the prompt. ## printf $1: read answer /dev/tty printf $2 $answer
Re: How to organize mail in folders?
On Wed, Jul 11, 2007 at 12:57:10AM +0200, Kai Grossjohann wrote: I used to use Gnus which is a newsreader at heart. Therefore the method to organize mail in folders (groups in Gnus-speak) was different from what I think I need with Mutt. I'd like to get some ideas from you how you organize your mail. Here is a mail strategy I refined over 10 years and that serves me well: - strong spam filter at the postfix level (running my own domain and mail server), no client-side spam filtering, - mailing lists are pre-sorted in ~/Maildir/.* folders by procmail, I check them from time to time with mutt, - mail from daemons and mailers is procmail'd in a ~/Maildir/junk-admin folder, infrequently checked, - mail CC'd to me is procmail'd in a ~/Maildir/.CC folder - mail BCC'd to me is procmail'd in a ~/Maildir/.BCC folder, as are replies to my mailing list posts That way my INBOX only contains messages addressed to me by live persons. When checking that folder from a low-bandwidth/expensive connection I can be reasonably sure that it contains only important/urgent/relevant messages. My mail clients usually only monitor INBOX, CC and BCC - once INBOX messages are read they are moved by mutt to a ~/Maildir/.In folder - if some message is read but not yet processed I mark it as important (F key) and it stays put until unmarked, - sent messages are all copied to a ~/Maildir/.Sent folder .In and .Sent folders are not post-sorted and no longer archived thanks to the power of mutt's header-cache and limit features. (procmail recipes available on request)
Re: Automatically Deleting old Messages
On Fri, Jun 15, 2007 at 11:56:41PM +0300, [EMAIL PROTECTED] wrote: Hi, Is there any way I can make mutt (or another application) automatically delete messages in _certain_ folders (such as mailing lists) that are over a certain number of days old? If you have a unix account on your mail server then you can enter these crontab jobs: ## remove all list mails older than 60 days in folders matching ## ~/Maildir/.[a-z]* and ~/Maildir/.Admin.* 0 2 * * * find /home/ldm/Maildir -mindepth 3 -maxdepth 3 -type f -mtime +60 \( -path '/home/ldm/Maildir/.[a-z]*' -o -path '/home/ldm/Maildir/.Admin.*' \) -exec rm -f {} \; ## remove all empty maildirs 0 3 * * * for i in ~/Maildir/.*; do if [ -d $i ] [ ! $(find $i -mindepth 2 -type f) ]; then rm -rf $i ; fi ; done (thanks to greycat on #bash for help on these)
Re: Fwd: Re: alias list and bcc
Okay, as a workaround this should work for me, too. Thanks. But I don't want my mails regarded as possible spam for the to-field isn't correct. Please explain to-field isn't correct and site rfc's supporting your supposition. undisclosed-decipients:; is a valid content for the To: header, but that doesn't mean that spam filters will never object to it. By necessity, spam filters are as bad in their non-accomodation of irregular but legal constructions as spammers are in their use of irregular/illegal but accepted constructions. The concern is legitimate. Maybe someone shows up with a clean solution. I tend to use undisclosed-recipients:; myself, but a more normal-looking approach that I often see is to put your own address in the To: field. You can also just make one up, if you don't mind the bounce. example.com and example.net are even reserved by IANA, and will never (again) be valid domains for actual users. ps: full quoting, especially sigs, is ungregarious. So is being an ass. If you want to tell someone you're not going to help, do it in private, not on a list with thousands of subscribers. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: alias list and bcc
is there a way to create a simple list with the alias command like alias my_list contac1 contact2 contactN but not having send your messages cc: but bcc: ? What isn't working about this? The alias you gave should work, and if you put it into the Bcc: field it should Bcc those addresses. You can do this either in your editor (with edit_headers set), or in the compose menu. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago