Macro to change role
Hi there, I'm new to mutt being a long-time Pine fanatic. Just because I was bored today I switched to mutt (don't ask why, I'm not sure myself) and so far I'm somewhat impressed. I search the archive and couldn't find a satisfactory answer to this question... I used the Pine roles somewhat exclusively. I've got this, my default email address, but I also send out "admin" messages at times that need a different email address. These messages are also put into a folder by the name of "freezerburn" by procmail. I've spent about an hour now trying to make a macro (\ea) to set the signature to ~/.signature-admin and to change the From: line with my_hdr but I can't get it to work. I also tried the send-hook command to match me replying to all messages in the freezerburn mailbox but I think I might just be confused on that part (should I put in send-hook "[EMAIL PROTECTED]" instead of the folder name? ie. someone sends a message to admin@... and I want to reply with that same email address). This is what I currently have in my .muttrc: macro index \ea 'set signature=~/.signature-admin; \ my_hdr From: Freezer Burn Admin <[EMAIL PROTECTED]>' send-hook =freezerburn 'set signature=~/.signature-admin; \ my_hdr From: Freezer Burn Admin <[EMAIL PROTECTED]>' I think I know where I went wrong with the send-hook, but why won't the macro work properly? Do I need to put a compose command in there somehow? I'm a little lost on how to write the macros properly... Thanks a million in advance. -- [EMAIL PROTECTED], OpenPGP key available on www.keyserver.net Freezer Burn BBS: telnet://bbs.freezer-burn.org . ICQ: 54924721 Webmaster for the Linux Portal Site Freezer Burn: http://www.freezer-burn.org Current Linux uptime: 13 days 2 hrs and 24 mins.
Re: Macro to change role
Vincent Danen proclaimed on mutt-users that: >macro index \ea 'set signature=~/.signature-admin; \ > my_hdr From: Freezer Burn Admin <[EMAIL PROTECTED]>' > >send-hook =freezerburn 'set signature=~/.signature-admin; \ > my_hdr From: Freezer Burn Admin <[EMAIL PROTECTED]>' set reverse_name set alternates (see the sample.muttrc for this) or try folder hooks - mailboxes `echo $HOME/mail/*` subscribe linux subscribe mutt save-hook '~f linux-india' =linux save-hook '~f mutt' =mutt folder-hook . set sort=threads folder-hook . set signature=/tmp/sig.sureshr folder-hook . 'set attribution="On %d, %n typed:"' folder-hook . my_hdr From: [EMAIL PROTECTED] (Suresh Ramasubramanian) folder-hook . my_hdr Reply-To: [EMAIL PROTECTED] (Suresh Ramasubramanian) folder-hook . my_hdr Organization: Juno Abuse Desk folder-hook . "push \"l!(~s 'FOLDER INTERNAL DATA')\n*\"" folder-hook mutt set sort=threads folder-hook mutt set signature=/tmp/sig.sureshr folder-hook mutt 'set attribution="%n proclaimed on mutt-users that: "' folder-hook mutt my_hdr From: [EMAIL PROTECTED] (Suresh Ramasubramanian) folder-hook mutt my_hdr Reply-To: [EMAIL PROTECTED] (Suresh Ramasubramanian) folder-hook mutt my_hdr Organization: Juno Abuse Desk folder-hook mallet set sort=threads folder-hook mallet set signature=~/sig.mallet folder-hook mallet 'set attribution = "Using a large mallet, %n whacked out:"' folder-hook mallet my_hdr From: [EMAIL PROTECTED] (Suresh Ramasubramanian) folder-hook mallet my_hdr Reply-To: [EMAIL PROTECTED] (Suresh Ramasubramanian) folder-hook mallet my_hdr Organization: The Lumber Cartel, India (tinlcI) -- Suresh Ramasubramanian + [EMAIL PROTECTED] Love cannot be much younger than the lust for murder. -- Sigmund Freud
Re: Why mutt is the best mail program?
Martynas Kriauciunas muttered: > he asked me to tell some things what mutt can do that other mail > programs can't (Pine or Mailx). Now I'm asking You. The _real_ answere to your question is: 'Cause it sucks less ;-) Michael -- What this country needs is a good five cent microcomputer. PGP-fingerprint: DECA E9D2 EBDD 0FE0 0A65 40FA 5967 ACA1 0B57 7C13
Re: Macro to change role
Vincent Danen muttered: > Just because I was bored today I switched to mutt (don't ask why, I'm > not sure myself) and so far I'm somewhat impressed. You will find better reasons once to get used to mutt, I'm sure :-) > I search the archive and couldn't find a satisfactory answer to this > question... Search for profile and you'll find everything you need. > I used the Pine roles somewhat exclusively. I've got this, my > default email address, but I also send out "admin" messages at times > that need a different email address. These messages are also put > into a folder by the name of "freezerburn" by procmail. It is far easier use different rcfiles for different roles. You could write macros to change between them. # ~/.profile-admin signature=~/.signature-admin my_hdr From: Freezer Burn Admin <[EMAIL PROTECTED]> ... #~/.profile-xyz ... # ~/.muttrc [your normal setting] macro index \ea ':source ~/.profile-admin' "Change profile to admin" macro index \eo ':source ~/.muttrc' "Reset profile to default" ... Or you could use folder- / send-hooks to change profiles automaticly. > I've spent about an hour now trying to make a macro (\ea) to set the > signature to ~/.signature-admin and to change the From: line with > my_hdr but I can't get it to work. > macro index \ea 'set signature=~/.signature-admin; \ > my_hdr From: Freezer Burn Admin <[EMAIL PROTECTED]>' You forgot to set the ':' since you want to execute commands. macro index \ea ':set signature=~/.signature-admin; \ my_hdr From: Freezer Burn Admin <[EMAIL PROTECTED]>' This should work, unless you have any default sent-hook which overwrites these settings. > I also tried the send-hook command to match me replying to all > messages in the freezerburn mailbox > send-hook =freezerburn 'set signature=~/.signature-admin; \ > my_hdr From: Freezer Burn Admin <[EMAIL PROTECTED]>' > but I think I might just be confused on that part (should I put in > send-hook "[EMAIL PROTECTED]" instead of the folder name? Yes, this is how send-hooks work :) See the manual. If you want to change something based on the folder you're in use the folder-hook command. > ie. someone sends a message to admin@... and I want to reply with > that same email address). Unfortunatly it's not possible to match any header of a message to be replied. Since you sort mail addressed to admin@... in the =freezerburn folder use: folder-hook =freezerburn 'set signature...' > I think I know where I went wrong with the send-hook, but why won't > the macro work properly? Do I need to put a compose command in there > somehow? I'm a little lost on how to write the macros properly... You don't need no compose command. s.o. HTH, Michael -- Behind every great computer sits a skinny little geek. PGP-fingerprint: DECA E9D2 EBDD 0FE0 0A65 40FA 5967 ACA1 0B57 7C13
Re: Re:
Hello, When I thread mailing list messages, often the thread will be broken up because of differing versions and placement of ``Re:'' in the subject line, compounded by different mail clients' handling of the subject line. For example, if the original message's Subject: line is ``[BOB] What's the frequency, Kenneth?''where ``[BOB]'' is the mailing list name that gets prepended to the subject, the replies will wind up like: ``Re: [BOB] What's the frequency, Kenneth?'' ``re: [BOB] What's the frequency, Kenneth?'' ``Re: [BOB] re: What's the frequency, Kenneth?'' ``RE: [BOB] What's the frequency, Kenneth?'' ``Re: re: [BOB] What's the frequency, Kenneth?'' usw. I searched on ``Re:'' and ``Subject:'' in the manual and didn't find anything useful looking. Is there a built-in solution to this? Does anybody else have this problem? I imagine something stripping out all variations of ``Re:'' before the threads are arranged in the list. This would be child's play in Perl, the world is not Perl. :-) Or should I start putting together a patch, right after I relearn C? Thanks, Andy Eichmann
Re: Re:
Andrew -- I don't have an easy answer for your question, though procmail springs to mind for starters. You mentioned searching the manual; did you find $reply_regexp and see what you can do with it? It's pretty fancy... :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.bigfoot.com/~davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg! The "new millennium" starts at the beginning of 2001. There was no year 0. Note: If bigfoot.com gives you fits, try sector13.org in its place. *sigh* PGP signature
Re: Re:
Threads are usually broken because someone's mailer doeesn't generate any useful trackable header like Message-ID, References, or In-Reply-To. I would rather get the person to use a better client, or smack her/his ISP to add this support to their mail system. As for threading by subject, it'd be nice to do what you suggested. But this is an open-source world where code speaks volumes. So writing and submitting a patch would be better. :) On Sat, Jun 17, 2000 at 07:33:16PM -0500, Andrew Eichmann wrote: : :When I thread mailing list messages, often the thread will be broken :up because of differing versions and placement of ``Re:'' in the :subject line, compounded by different mail clients' handling of :the subject line. For example, if the original message's Subject: :line is ``[BOB] What's the frequency, Kenneth?''where ``[BOB]'' is :the mailing list name that gets prepended to the subject, the replies :will :wind up like: : :``Re: [BOB] What's the frequency, Kenneth?'' :``re: [BOB] What's the frequency, Kenneth?'' :``Re: [BOB] re: What's the frequency, Kenneth?'' :``RE: [BOB] What's the frequency, Kenneth?'' :``Re: re: [BOB] What's the frequency, Kenneth?'' :usw. : :I searched on ``Re:'' and ``Subject:'' in the manual and didn't :find anything useful looking. : :Is there a built-in solution to this? Does anybody else have this :problem? I imagine something stripping out all variations of ``Re:'' :before the threads are arranged in the list. This would be child's :play in Perl, the world is not Perl. :-) : :Or should I start putting together a patch, right after I relearn C? -- Eugene Lee [EMAIL PROTECTED]