Re: change profile on the fly

2012-08-19 Thread Marcelo Luiz de Laia
Arghs!

I did a misspelling!

On 18/08/12 at 08:41pm, Marcelo Laia wrote:
 2012/8/15 Marcelo Laia marcelol...@gmail.com:
 # Send hooks to make replies get the appropriate From field
 unhook send-hook
 #send-hook . source ~/.mutt/profile.gmail\n
 send-hook 
 ^(offlineimap-proj...@lists.alioth.debian.org|debian-u...@lists.debian.org)
 'set mime_forward signature=~/.mutt/sig.list'
 send-hook ^('(.*)@ufvjm\.edu\.br') source ~/.mutt/profile.ufvjm\n
 (...)
 
 I see that save-hook and folder-hook not work together. If I set a
 default save-hook, it override folder-hook.

I means send-hook, not save-hook!

Any suggestion here is welcome!

-- 
Marcelo
Brasil (Brazil, for English Speakers)
Linux user number 487797


Re: change profile on the fly

2012-08-18 Thread Marcelo Laia
2012/8/15 Marcelo Laia marcelol...@gmail.com:
 Hi,

 How I would change the current profile on the fly?


I solved the problem!

I use folder-hook

~/.mutt/folder-hooks
folder-hook .   source ~/.mutt/defaults
folder-hook GMail/* source ~/.mutt/gmail.muttrc
folder-hook Yahoo/* source ~/.mutt/yahoo.muttrc
folder-hook UFVJM/* source ~/.mutt/ufvjm.muttrc

~/.mutt/gmail.muttrc
color status red default

set from  = myaddr...@gmail.com
set sendmail  = /home/me/bin/scripts/mymsmpt.gmail
set mbox  = +GMail/Inbox
unset record
set postponed = +GMail/Rascunhos

# Reset any headers that may have been set in other folder-hooks
unmy_hdr From:
unmy_hdr Reply-To:
unmy_hdr Fcc:
unmy_hdr Return-Receipt-To:
unmy_hdr Organization:
unmy_hdr X-URL:

# Now set the headers.
my_hdr From: My Name myaddr...@gmail.com
my_hdr Reply-To: My Name myaddr...@gmail.com
my_hdr Organization: (My ' Org)
my_hdr X-URL: http://www.nononono.com/

macro index E change-folder+GMail/Inboxenterlimit~B  search everything
macro index,pager D save-message+GMail/Lixeiraentermove
message to the trash

~/.mutt/muttrc
(...)
source ~/.mutt/folder-hooks
(...)
# Send hooks to make replies get the appropriate From field
unhook send-hook
#send-hook . source ~/.mutt/profile.gmail\n
send-hook 
^(offlineimap-proj...@lists.alioth.debian.org|debian-u...@lists.debian.org)
'set mime_forward signature=~/.mutt/sig.list'
send-hook ^('(.*)@ufvjm\.edu\.br') source ~/.mutt/profile.ufvjm\n
(...)


I see that save-hook and folder-hook not work together. If I set a
default save-hook, it override folder-hook.

Any suggestion is very welcome!

--
  O__   --- Marcelo


Re: change profile on the fly

2012-08-16 Thread Marco Giusti
On Wed, Aug 15, 2012 at 09:50:15AM -0300, Marcelo Laia wrote:
 Hi,
 
 How I would change the current profile on the fly?
 
 I have 3 account and I would like to send mails with my username
 according to current account.

maybe this approach is a bit rude, but:

macro compose H 'enter-commandset sendmail=~/bin/msmtpQ -a 
hotmailenteredit-fromMarco Giusti 
marco.giu...@hotmail.comenteredit-reply-tomarco.giu...@hotmail.comenter'
 Send email with hotmail account
macro compose G 'enter-commandset sendmail=~/bin/msmtpQ -a 
gmailenteredit-fromMarco Giusti 
marco.giu...@gmail.comenteredit-reply-tomarco.giu...@gmail.comenter' 
Send email with gmail account

in addiction to some send-hooks.

m.


change profile on the fly

2012-08-15 Thread Marcelo Laia
Hi,

How I would change the current profile on the fly?

I have 3 account and I would like to send mails with my username
according to current account.

Thank you very much.

-- 
  O__   --- Marcelo


Re: change profile on the fly

2012-08-15 Thread Rado Q
=- Marcelo Laia wrote on Wed 15.Aug'12 at  9:50:15 -0300 -=

 I have 3 account and I would like to send mails with my username
 according to current account.

By will: macros.
If you're forgetful, use specific folder per account, then use
folder-hook to adjust if you operate in this folder.

-- 
© Rado S. -- You must provide YOUR effort for your goal!
EVERY effort counts: at least to show your attitude.
You're responsible for ALL you do: you get what you give.


Re: change profile on the fly

2012-08-15 Thread Andreas Kneib
* Marcelo Laia schrieb am 15.08.2012 um  9:50 Uhr:

 How I would change the current profile on the fly?

for example (without macros) type IN mutt

:set sendmail=/usr/local/bin/msmtp-enqueue.sh -a account1
:my_hdr From: Tux Penguin account1@any_provider.tld


Andreas


Re: change profile on the fly

2012-08-15 Thread Marcelo Laia
I have this code in my:

.mutt/muttrc

# Send hooks to make replies get the appropriate From field
unhook send-hook
send-hook . source ~/.mutt/profile.gmail\n# attribution='Hi
%v!\n\nOn %{%a, %d %b %Y}, %n wrote:\n'
send-hook ^(offlineimap-proj...@lists.alioth.debian.org|mutt-users@mutt.org)
'set mime_forward signature=~/.mutt/sig.list'
send-hook ^('(.*)@ufvjm\.edu\.br') source ~/.mutt/profile.ufvjm\n


.mutt/profile.ufvjm

# NAME: UFVJM
# DESC: UFVJM

set locale=   # system default locale (C)
set signature='~/.mutt/sig.ufvjm'   # signature file
set indent_string=   # Quoting mails with this string.
set attribution='On %{%a, %d %b %Y}, %n wrote:\n'
set post_indent_string=   # Footer (after quotes, before 
signature).
set status_format=-%r-Mutt: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o?
Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?
%?l? %l?]---(%s/%S)-default-%-(%P)---

# Pretty Good Privacy (PGP):
set pgp_sign_as=0x# UserID/KeyID for signing
set nopgp_autoencrypt   # Default (no enc)
set nopgp_autosign  # Default (sign)

# Customized headers
unmy_hdr *  # remove all extra headers first.

my_hdr From: My name myusern...@ufvjm.edu.br
my_hdr Reply-To: My name myusern...@ufvjm.edu.br
#my_hdr Bcc: usern...@domain.com
my_hdr Organization: My Organization

fcc-hook . +UFVJM/Sent# the file to copy sent messages

If I send mail to some...@ufvjm.edu.br, my hdr From and Replay is
changed on the fly. However, If I send a mail to
some...@otherserver.com, it doesen't.

Have you some insights about this?

Thank you very much

--
  O__   --- Marcelo


Re: How to change profile on the fly?

2012-02-08 Thread Jamie Paul Griffin
On Mon, Feb 06, 2012 at 03:52:08PM +0100, nb wrote:
 Le 2012-02-06 08:50, Patrick Shanahan a ?crit :
  * Marcelo Luiz de Laia marcelol...@gmail.com [02-06-12 07:26]:
   
   When I was in my Gmail mbox, I need that all replaies is sent by gmail
   smtp. So, I need to set, on the fly, gmail profile and sig.
  
  :source gmail.profile
   
   When I was in my Yahoo mbox,  I need that all replaies is sent by yahoo
   smtp. So, I need to set, on the fly, yahoo profile and sig.
  
  :source yahoo.profile
   
   When I was in my Work mbox,  I need that all replaies is sent by work
   smtp. So, I need to set, on the fly, work profile and sig.
  
  :source work.profile
 
 That's right
 But it's better in conjunction with folder-hook.
 Thus, when you change folder, you also change the profile. It's
 automatic. That's what I do because I use 3 different accounts with 3
 associated smtp servers.
 In the profile file you can put : set hostname, from, use_envelope_from,
 envelope_from_address, postponed, record, trash, and of course smtp_url
 
 account-hook is also usefull for changing imap_user...
 
 !DSPAM:4f2fe9bb2251855819418!
 
 
so what happens if you are in your yahoo folder, for example, but then need to 
write and send an email using your gmail account settings? You would have to 
change into that folder just so the necessary settings become usable. I found 
that to be a PITA. send-hook can be used to overcome that. You may not find 
having to change folders for that purpose a problem so it wouldn't matter but 
it's something else to think about. 

Jamie


Re: How to change profile on the fly?

2012-02-08 Thread Marcelo Luiz de Laia
On Wed, 08 Feb 2012, Jamie Paul Griffin wrote:
 
 so what happens if you are in your yahoo folder,


When I am in yahoo folder and hit M, my gmail address appear on From:
field and in Replay to: field. I would like to overrride this. I would
like to see in my From: and Replay to: fields, when in yahoo folder, my
yahoo settings.

-- 
Marcelo
Brasil (Brazil, for English Speakers)
Linux user number 487797


Re: How to change profile on the fly?

2012-02-08 Thread Marcelo Laia
2012/2/6 Patrick Shanahan ptilopt...@gmail.com:
 * Marcelo Luiz de Laia marcelol...@gmail.com [02-06-12 07:26]:

 When I was in my Yahoo mbox,  I need that all replaies is sent by yahoo
 smtp. So, I need to set, on the fly, yahoo profile and sig.

 :source yahoo.profile

If I do that, I got the same settings than gmail.profiles. It is tha
same and not solve my mistakes!


-- 
  O__   --- Marcelo


Re: How to change profile on the fly?

2012-02-08 Thread Marcelo Laia
On Mon, Feb 06, 2012 at 03:52:08PM +0100, nb wrote:

 That's right
 But it's better in conjunction with folder-hook.
 Thus, when you change folder, you also change the profile. It's
 automatic. That's what I do because I use 3 different accounts with 3
 associated smtp servers.


Is it possible to share your specific configuration files sections?


 !DSPAM:4f2fe9bb2251855819418!

Your message was tagged. I don't why.

Thank you very much!

-- 
  O__   --- Marcelo


How to change profile on the fly?

2012-02-06 Thread Marcelo Luiz de Laia
Hi,

I have 3 profiles, like this: http://pastebin.com/kJWwPGYT

and 3 muttrc, like this: http://pastebin.com/1k1cHShC

This is my /home/user/bin/scripts/mymsmpt.gmail 

### script start here ###
#!/bin/bash
tee (lbdb-fetchaddr -a)|/usr/bin/msmtp -a gmail $@
### script end here ###

In my muttrc I have:

source ~/.mutt/profile.gmail # Profile default

unhook send-hook

send-hook . source ~/.mutt/profile.gmail\n# attribution='Hi %v!\n\nOn 
%{%a, %d %b %Y}, %n wrote:\n'

send-hook ^(a...@server1.org|a...@server2.org|a...@servern.org)
'set mime_forward signature=~/.mutt/sig.list'

send-hook
^(a...@server1.org|a...@server2.org|a...@servern.org)|('(.*)@ufvjm\.edu\.br')
source ~/.mutt/profile.ufvjm\n

What I need?

When I was in my Gmail mbox, I need that all replaies is sent by gmail
smtp. So, I need to set, on the fly, gmail profile and sig.

When I was in my Yahoo mbox,  I need that all replaies is sent by yahoo
smtp. So, I need to set, on the fly, yahoo profile and sig.

When I was in my Work mbox,  I need that all replaies is sent by work
smtp. So, I need to set, on the fly, work profile and sig.

How I could do that?

Thank you very much!

-- 
Marcelo
Brasil (Brazil, for English Speakers)
Linux user number 487797


Re: How to change profile on the fly?

2012-02-06 Thread Patrick Shanahan
* Marcelo Luiz de Laia marcelol...@gmail.com [02-06-12 07:26]:
 
 When I was in my Gmail mbox, I need that all replaies is sent by gmail
 smtp. So, I need to set, on the fly, gmail profile and sig.

:source gmail.profile
 
 When I was in my Yahoo mbox,  I need that all replaies is sent by yahoo
 smtp. So, I need to set, on the fly, yahoo profile and sig.

:source yahoo.profile
 
 When I was in my Work mbox,  I need that all replaies is sent by work
 smtp. So, I need to set, on the fly, work profile and sig.

:source work.profile

-- 
(paka)Patrick Shanahan   Plainfield, Indiana, USA  HOG # US1244711
http://wahoo.no-ip.orgPhoto Album: http://wahoo.no-ip.org/gallery2
http://en.opensuse.org   openSUSE Community Member
Registered Linux User #207535@ http://linuxcounter.net


Re: How to change profile on the fly?

2012-02-06 Thread nb
Le 2012-02-06 08:50, Patrick Shanahan a écrit :
 * Marcelo Luiz de Laia marcelol...@gmail.com [02-06-12 07:26]:
  
  When I was in my Gmail mbox, I need that all replaies is sent by gmail
  smtp. So, I need to set, on the fly, gmail profile and sig.
 
 :source gmail.profile
  
  When I was in my Yahoo mbox,  I need that all replaies is sent by yahoo
  smtp. So, I need to set, on the fly, yahoo profile and sig.
 
 :source yahoo.profile
  
  When I was in my Work mbox,  I need that all replaies is sent by work
  smtp. So, I need to set, on the fly, work profile and sig.
 
 :source work.profile

That's right
But it's better in conjunction with folder-hook.
Thus, when you change folder, you also change the profile. It's
automatic. That's what I do because I use 3 different accounts with 3
associated smtp servers.
In the profile file you can put : set hostname, from, use_envelope_from,
envelope_from_address, postponed, record, trash, and of course smtp_url

account-hook is also usefull for changing imap_user...


Re: How to change profile on the fly?

2012-02-06 Thread Gary Johnson
On 2012-02-06, Patrick Shanahan wrote:
 * Marcelo Luiz de Laia [02-06-12 07:26]:
  
  When I was in my Gmail mbox, I need that all replaies is sent by gmail
  smtp. So, I need to set, on the fly, gmail profile and sig.
 
 :source gmail.profile
  
  When I was in my Yahoo mbox,  I need that all replaies is sent by yahoo
  smtp. So, I need to set, on the fly, yahoo profile and sig.
 
 :source yahoo.profile
  
  When I was in my Work mbox,  I need that all replaies is sent by work
  smtp. So, I need to set, on the fly, work profile and sig.
 
 :source work.profile

Just remember that if you do that--and there's nothing wrong with
doing that--any setting made in any of those files will have to be
set or unset in all of them.

Regards,
Gary