Re: Manual use of different account to send e-mails

2015-10-16 Thread Alan Leoni
On 15 Oct 16:04, Patrick Shanahan wrote:
> * Alan Leoni  [10-15-15 14:08]:
>  [...]
> > The question is: How do I choose the correct e-mail address? Is there a
> > macro to do that?
> 
> So you are not worried about the tranmission but the "From:" address? 

[...]
Hi,
sorry for the misunderstanding. I'm not an English speaker ;)
Yes, this is exactly my problem.
I would like to choose the identity of the from.

I found this:
http://dione.no-ip.org/wordpress/computing/rotating-identities-with-mutt/

with this macro:

macro compose v ":source ~/.mutt/identity_\`echo $(($(date +%s) % \
$(ls ~/.mutt/identity_[0-9]* | wc -l) + 1))\`\n"

but I don't understand how to set up "the source" of the macro with my
configuration:
I have 3 accounts:
~/.mutt/account/gmailrc
~/.mutt/account/edurc
~/.mutt/account/autisticirc

Thanks a lot,
cheers,
Alan

-- 
Alan Leoni


Re: Manual use of different account to send e-mails

2015-10-15 Thread Patrick Shanahan
* Alan Leoni  [10-15-15 14:08]:
 [...]
> The question is: How do I choose the correct e-mail address? Is there a
> macro to do that?

So you are not worried about the tranmission but the "From:" address? 
Somewhat confusing the way you asked.

In .muttrc you can set a "default" from with:
  set from="email addr"

You can also set the from addr based on a condition using send-hook:
 send-hook  'my_hdr From: Alan Leoni '  
 send-hook mutt-users 'my_hdr From: Alan Leoni '  

Is this what you are asking or are you wanting to specify the ip for smtp? 

If you are wanting to direct the smtp, that's not mutt's job, but that of
your smtp client, ie: postfix.

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


Manual use of different account to send e-mails

2015-10-15 Thread Alan Leoni
Hi everybody, 

I'm bettering my mutt configuration and I've a problem. I can't choose
manually which e-mail account I want to use to send e-mails.

In my muttrc I've the following configuration:

folder-hook ~/Mail/gmail/* source ~/.mutt/account/gmailrc 
folder-hook ~/Mail/edu/* source ~/.mutt/account/edurc

To be clear, this configuration runs. When I want to send an e-mail with
gmail I go into gmail folders, and the same for the other account.

What now I wan to do is:
- Adding a new account only for smtp and than be able to choose with
  which account send e-mails (with a macro?). 

Or:
- Adding a new account, saving the e-mails I get and I send in the gmail
  account, always being able to choose with which account send the
  message.

Thanks for your help:)

Cheers :)

-- 
Alan Leoni


Re: Manual use of different account to send e-mails

2015-10-15 Thread Patrick Shanahan
* Alan Leoni  [10-15-15 13:03]:
> Hi everybody, 
> 
> I'm bettering my mutt configuration and I've a problem. I can't choose
> manually which e-mail account I want to use to send e-mails.
> 
> In my muttrc I've the following configuration:
> 
> folder-hook ~/Mail/gmail/* source ~/.mutt/account/gmailrc 
> folder-hook ~/Mail/edu/* source ~/.mutt/account/edurc
> 
> To be clear, this configuration runs. When I want to send an e-mail with
> gmail I go into gmail folders, and the same for the other account.
> 
> What now I wan to do is:
> - Adding a new account only for smtp and than be able to choose with
>   which account send e-mails (with a macro?). 
> 
> Or:
> - Adding a new account, saving the e-mails I get and I send in the gmail
>   account, always being able to choose with which account send the
>   message.

You fail to mention what you are using for smtp?  Which is where you would
normally designate the "account" for transmission.

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


Re: Manual use of different account to send e-mails

2015-10-15 Thread Alan Leoni
On 15 Oct 13:20, Patrick Shanahan wrote:
> You fail to mention what you are using for smtp?  Which is where you would
> normally designate the "account" for transmission.

Right. I use mutt as the sender.
In my  ~/.mutt/account/gmailrc I've this configuration:

set folder = ~/Mail/gmail
set spoolfile = +GMAIL_inbox
set mbox = +GMAIL_inbox
set postponed = +GMAIL_postponed
set record = +GMAIL_sent
set my_pass="my password"
set my_user=a...@alanleoni.ch
set smtp_url=smtps://$my_user:$my_p...@smtp.gmail.com
set realname="Alan Leoni"
set from=a...@alanleoni.ch

Now I want to create another account like this:

set folder = ~/Mail/gmail
set spoolfile = +GMAIL_inbox
set mbox = +GMAIL_inbox
set move=no
set postponed = +GMAIL_postponed
set record = +GMAIL_sent
## Send options.
set my_pass="my password2"
set my_user=alanle...@gmail.com
set smtp_url=smtps://$my_user:$my_p...@smtp.gmail.com
set realname="Alan Leoni"
set from=alanle...@gmail.com

I want that the folders where I save the messages (inbox, postponed and sent
) remain the same (I use POP to get email), but they are sent from different
addresses.
The question is: How do I choose the correct e-mail address? Is there a
macro to do that?

Thanks a lot,
Alan

-- 
Alan Leoni