Re: Help with multiple emails

2011-10-29 Thread Mandar Mitra
   3) I have set up several configuration files and made a maildir
 structure but feel uncomfortable leaving my emails settings, e.g.
 passwords, and messages in plain text files that anyone could read. I
 have nothing to hide but feel this is insecure.

If you're on Linux, you might find the msmtp-gnome package useful. It
allows you to store your password in the gnome-keyring. It's better
than storing passwords in clear text in config files, but I don't know
enough to tell if it'll satisfy folks who are serious about security.

I use offlineimap for incoming mail, and that uses the gnome keyring
too, but that is probably irrelevant to your needs.

HTH,
mandar.


Re: Help with multiple emails

2011-10-29 Thread Gregor Zattler
Hi Robert,
* Robert Dyer 42possibletr...@googlemail.com [28. Oct. 2011]:

   I have now successfully set up mutt as my email client, but have three
 issues remaining. They are listed below in order of increasing
 seriousness.
   1) I have successfully set up macros for limiting the number of emails
 I see, but would like to be able to have a default limiting expression
 for when I first start mutt.

how about (untested)
push limit~Aenter see all
in your muttrc?

   2) I have placed all my emails in one maildir structure but would like
 to back them up independently. I.e. 'cp'ing them only if the sender or
 receiver had a particular address. This would have to be
 scriptable.

Uhhh.  That's problematic since it's not easy to catch all cases.
I'd do this on the level of the MDA (procmail).  Therefore I'd
match on the Delivered-To: header.

   3) I have set up several configuration files and made a maildir
 structure but feel uncomfortable leaving my emails settings, e.g.
 passwords, and messages in plain text files that anyone could read. I
 have nothing to hide but feel this is insecure.

See other answer, I don't have experience with this.
Ciao, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-


Re: Help with multiple emails

2011-10-28 Thread Robert Dyer
I have now successfully set up mutt as my email client, but have three
issues remaining. They are listed below in order of increasing
seriousness.
  1) I have successfully set up macros for limiting the number of emails
I see, but would like to be able to have a default limiting expression
for when I first start mutt.
  2) I have placed all my emails in one maildir structure but would like
to back them up independently. I.e. 'cp'ing them only if the sender or
receiver had a particular address. This would have to be scriptable.
  3) I have set up several configuration files and made a maildir
structure but feel uncomfortable leaving my emails settings, e.g.
passwords, and messages in plain text files that anyone could read. I
have nothing to hide but feel this is insecure.
  To clarify the programs I have installed to manage my mail are: mutt
(obviously), getmail, procmail, and msmtp. I would very much appreciate
any help possible, as the last issue especially is a BIG problem.
 For the benefit of those reading this I will attach a copy of my .muttrc
rather than uploading it. Also for those wondering, explicitly setting my
from address to an empty string did not work as expected, instead mutt
very incorrectly guessed my address based on my login name and the name
of the computer I was working at. However this did not matter as by not
specifying a default account for msmtp I receive an error whenever
trying to send an email without explicitly setting the from address. 
  Finally a thank you in advance to anyone who can help :-).
# character set on messages that we send
set send_charset=utf-8
# if there is no character set given on incoming messages, it is probably 
windows
set assumed_charset=iso-8859-1

# make sure Vim knows mutt is a mail client and that we compose an UTF-8 
encoded message
set editor=vim -c 'set syntax=mail ft=mail enc=utf-8'

# Tell mutt to use maildir format
set mbox_type=Maildir

# just scroll one line instead of full page
set menu_scroll=yes

# enable mailcap file
set mailcap_path=~/.mutt/mailcap

# we want to see some MIME types inline, see below this code listing for 
explanation
auto_view text/html
auto_view application/msword
auto_view application/pdf

# make default search pattern to search in To, Cc and Subject
set simple_search=~f %s | ~C %s | ~s %s

# threading preferences, sort by threads
set sort=threads
set strict_threads=yes

# show spam score (from SpamAssassin only) when reading a message
spam X-Spam-Score: ([0-9\\.]+).* SA: %1
set pager_format =  %C - %[%H:%M] %.20v, %s%* %?H? [%H] ?

# do not show all headers, just a few
ignore  *
unignoreFrom To Cc Bcc Date Subject
# and in this order
unhdr_order *
hdr_order   From: To: Cc: Bcc: Date: Subject:

# brighten up stuff with colours, for more colouring examples see:
# http://aperiodic.net/phil/configs/mutt/colors
color normal  white  black
color hdrdefault  green  default
color quoted  green  default
color quoted1 yellow default
color quoted2 reddefault
color signature   cyan   default
color indicator   brightyellow   red
color error   brightred  default
color status  brightwhiteblue
color treebrightmagenta  black
color tilde   blue   default
color attachment  brightyellow   default
color markers brightred  default
color message white  black
color search  brightwhitemagenta
color boldbrightyellow   default
# if you don't like the black progress bar at the bottom of the screen,
# comment out the following line
color progresswhite  black

# spell-checking
set ispell=aspell -e -c

# personality settings
set sendmail='/usr/bin/msmtp'
set reverse_name
set realname = [CENSORED]
unset from
set use_envelope_from
alternates ^[CENSORED]$
alternates ^[CENSORED]$
alternates ^[CENSORED]$
alternates -group [CENSORED] ^[CENSORED]$ ^[CENSORED]$
# this file must exist, and contains your signature, comment it out if
# you don't want a signature to be used
## set signature = ~/.signature

# aliases (sort of address book)
set alias_file=/data/mail/aliases
set sort_alias=alias
set reverse_alias=yes
source $alias_file

# account settings
set folder=/data/mail
set spoolfile=+.Inbox
set mask=!^\\.[^.]
set record=+.Sent
set postponed=+.Drafts

# use headercache for IMAP (make sure this is a directory for performance!)
set header_cache=/tmp/.mutt

# mailboxes we want to monitor for new mail
  mailboxes ! `\
  for file in /data/mail/.*; do \
box=$(basename $file); \
if [ ! $box = '.' -a ! $box = '..' -a ! $box = '.customflags' \
  -a ! $box = '.subscriptions' ]; then \
  echo -n \+$box\ ; \
fi; \
  done`
# mailboxes =
# mailboxes =Lists

# mailing lists we are on (these are regexps!)
## subscribe gentoo-.*@gentoo\\.org

# Macros
macro index,pager c change-folder?toggle-mailboxes open a different 
folder
# macro pager c change-folder?toggle-mailboxes open a 

Re: Help with multiple emails

2011-10-25 Thread Gregor Zattler
Hi 42possibletrash,
* 42possibletr...@googlemail.com 42possibletr...@googlemail.com [23. Oct. 
2011]:
 Thank you for your replies Gregor Zattler and Jostein Gogstad. I have
 followed Gregor's advice and moved all my emails into one folder,
 /data/mail. This is my current .muttrc:
 http://ompldr.org/vYXh6ZQ]http://ompldr.org/vYXh6ZQ. 

ATM I cannot access this website.  

 The current problem I am having is setting up mutt to my liking
 in terms of composing emails. This may not be a crucial
 problem, but I hope you don't mind helping me out all the
 same. On eudora and previous email clients I was able, albeit
 with some work, to get them to let me compose new emails with
 no 'From' information by default. This helped as it meant that
 I had to consider which account I should be sending emails from
 on an individual basis, hence less mistakes. However as you can
 probably see from my .muttrc I have been having trouble
 configuring this. Ideally I would like mutt to prompt for a
 from address every time I compose a new email, rather than
 having to use a macro which can properly function only once
 (subsequent attempts brings up a list of every alias
 entry). 

3.299. use_from

Type: boolean
Default: yes

When set, Mutt will generate the “From:” header field when
sending messages. If unset, no “From:” header field will be
generated unless the user explicitly sets one using the “my_hdr”
command.

So set use_from.  And:

3.74. from

Type: e-mail address
Default: (empty)

When set, this variable contains a default from address. It can
be overridden using “my_hdr” (including from a “send-hook”) and
$reverse_name. This variable is ignored if $use_from is unset.

This setting defaults to the contents of the environment variable
$EMAIL.

And explicitly set from to an empty string.

I don't have the time to test this, but I assume it gives you an
empty from header.  If you also set

3.57. edit_headers

Type: boolean
Default: no

This option allows you to edit the header of your outgoing
messages along with the body of your message.

Note that changes made to the References: and Date: headers are
ignored for interoperability reasons.

You are able to edit all email header within your editor.


 Also I note that currently my alternate addresses seem
 to have no function, as the index limiting macros have the
 addresses input as literal strings anyway. Any help would be
 appreciated :-) .

Still no access to your settings.  I described in my previous
email how to set alternate email addresses.  What happens if you
hit `l' (for limit) when you are seeing your folder index (the
emails in your folder) and give `~P' as the limiting pattern?

Should show all emails from all your email addresses.

Ciao, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-


Re: Help with multiple emails

2011-10-23 Thread Jostein Gogstad
On Sat, Oct 22, 2011 at 01:59:44PM +0200, Gregor Zattler wrote:
 Hi 42possibletrash, mutt users,
 * 42possibletr...@googlemail.com 42possibletr...@googlemail.com [22. Oct. 
 2011]:
I have looked for an answer online but failed. To clarify what I
  want is to be able to swap email accounts within one session of mutt,
  possibly using a set of macro bound keys. I was using mbox format
  within Eudora, but have decided to move to maildir, the conversion
  seems to work perfectly. I have also started this thread online, but
  unfortunately did not get a lot of help:
  http://forums.gentoo.org/viewtopic-t-898276.html. 
  Once I have mutt viewing each account properly I will then configure it to
  receive and send emails. Thank you in advance to anyone who can help me.
  :-)
 
 For this to achieve it's best to use folder-hooks.  you enter a
 folder and your settings are set up accordingly.

I currently manage three accounts with mutt, and folder- and send-hooks does it
for me. If you want macros, you might want to check out muttprofile [1].

  Once I have mutt viewing each account properly I will then configure it to
  receive and send emails. Thank you in advance to anyone who can help me.
  :-)

I'd recommend fetchmail and some custom MTA for choosing the correct
SMTP-server based on the To-field for this. For instance msmtp.

[1] http://www.acoustics.hut.fi/~mara/mutt/profiles.html

-- 
Jostein


Re: Help with multiple emails

2011-10-23 Thread 42possibletrash
Thank you for your replies Gregor Zattler and Jostein Gogstad. I have 
followed Gregor's advice and moved all my emails into one folder, 
/data/mail. This is my current .muttrc: 
http://ompldr.org/vYXh6ZQ]http://ompldr.org/vYXh6ZQ. The current problem 
I am having is setting up mutt to my liking in terms of composing 
emails. This may not be a crucial problem, but I hope you don't mind 
helping me out all the same. On eudora and previous email clients I was 
able, albeit with some work, to get them to let me compose new emails 
with no 'From' information by default. This helped as it meant that I 
had to consider which account I should be sending emails from on an 
individual basis, hence less mistakes. However as you can probably see 
from my .muttrc I have been having trouble configuring this. Ideally I 
would like mutt to prompt for a from address every time I compose a new 
email, rather than having to use a macro which can properly function 
only once (subsequent attempts brings up a list of every alias entry). 
Also I note that currently my alternate addresses seem to have no 
function, as the index limiting macros have the addresses input as 
literal strings anyway. Any help would be appreciated :-) .


Help with multiple emails

2011-10-22 Thread 42possibletrash
Hello, I'm new to mutt and in the early stages of migrating over from 
Eudora OSE. My problem is the lack of obvious support for someone with 
several email addresses. I have four email accounts, for which mutt will 
work well with one at a time, but I have no method of swaping. Please 
note that at this time I have not configured any program to receive my 
emails and am only concerned with moving my emails over to be viewed on 
mutt. My .muttrc: http://ompldr.org/vYXUxZQ. When researching this 
problem I came to the conclusion it should be possible to write a macro 
to swap from one email to another, e.g. F1-4. However I am not 
convinced this would be possible now as I am aware each email has it's 
own mailbox, e.g. '/Main', with it's own subdirectories, e.g. '/Inbox'. 
This complicates matters as the script used to find mailboxes is static 
and does not rely on mutts own internal vars, e.g. '$folder'. I am at a 
lose, and would desperately appreciate any help possible.
  I have looked for an answer online but failed. To clarify what I want 
is to be able to swap email accounts within one session of mutt, 
possibly using a set of macro bound keys. I was using mbox format within 
Eudora, but have decided to move to maildir, the conversion seems to 
work perfectly. I have also started this thread online, but 
unfortunately did not get a lot of help: 
http://forums.gentoo.org/viewtopic-t-898276.html. Once I have mutt 
viewing each account properly I will then configure it to receive and 
send emails. Thank you in advance to anyone who can help me. :-)


Re: Help with multiple emails

2011-10-22 Thread Gregor Zattler
Hi 42possibletrash, mutt users,
* 42possibletr...@googlemail.com 42possibletr...@googlemail.com [22. Oct. 
2011]:
 My problem is the lack of obvious support for someone
 with several email addresses. I have four email accounts, for which
 mutt will work well with one at a time, but I have no method of
 swaping. 

Mutt supports various using several email addresses in a generic
way.  It is for instance not necessary to separate emails from
different accounts in different mail folders.

First you have to tell mutt about the email addresses you
use -- as opposed to every other email address in emails you
receive. Read 3.11 Alternative Addresses in the fine manual.

The minimum configuration is like this:
alternates ^m...@home.info$
alternates ^m...@work.com$
alternates ^roleacco...@organisation.org$

Then you may for instance limit the index of a mail folder to
only show emails which originate from you with the search pattern
~P or to only show mails which are from you or addressed to you.  

While in the one-email-folder-per-account organisation you for
instance will not find an email from a working colleague because
it's not in the work related mail folder since s/he emailed your
private address...  If you keep all your emails in one folder
then you can limit the index to only show emails from you to
em...@example.com ore from em...@example.com to you respectively
with ~L em...@example.com.

Then there are a few variables to control how mutt reacts in case
you reply to an email.  If for instance reverse_name is set
(default is not set) and the email you are replying to originates
or is addressed to one of your email addresses, mutt uses this
email address in replies, otherwise it will use your email
address as indicated by your OS.

Normally, if you reply to an email the resulting new
email is addressed to the address in the From: header field.  But
if mutt knows which addresses are yours it will arrange to
address the new email to the address in the To: header field if
the original email originated from you (if you for instance want
to ask a person why s/he did not respond to your earlier email).  

If you separate specific emails in specific mail folders then you
can trigger certain settings specific to this mail folders via
folder-hooks.

You may also specify settings for sending and replying via
send-hooks and reply-hooks and mix them.

And last not least you may bind macros to keys.  The macros may
set settings according to what you now are used to as account
settings.

For me a dynamic configuration which automatically chooses
certain settings based on the mail folder I'm viewing and/or the
email I'm replying to is much more comfortable than always having
to remember to press a key first.  But none the less I also have
macros like this:
macro generic \e8 enter-command source 
$HOME/.mutt/profiles/telegr...@gmx.net/settings\n be Gregor Zattler 
telegr...@gmx.net


which stitches all dynamic configuration off and sets things for
a specific role of mine.

 Please note that at this time I have not configured any
 program to receive my emails and am only concerned with moving my
 emails over to be viewed on mutt. My .muttrc:
 http://ompldr.org/vYXUxZQ. When researching this problem I came to
 the conclusion it should be possible to write a macro to swap from
 one email to another, e.g. F1-4. However I am not convinced this
 would be possible now as I am aware each email has it's own mailbox,
 e.g. '/Main', with it's own subdirectories, e.g. '/Inbox'. This
 complicates matters as the script used to find mailboxes is static
 and does not rely on mutts own internal vars, e.g. '$folder'. I am at
 a lose, and would desperately appreciate any help possible.
   I have looked for an answer online but failed. To clarify what I
 want is to be able to swap email accounts within one session of mutt,
 possibly using a set of macro bound keys. I was using mbox format
 within Eudora, but have decided to move to maildir, the conversion
 seems to work perfectly. I have also started this thread online, but
 unfortunately did not get a lot of help:
 http://forums.gentoo.org/viewtopic-t-898276.html. Once I have mutt
 viewing each account properly I will then configure it to receive and
 send emails. Thank you in advance to anyone who can help me. :-)

For this to achieve it's best to use folder-hooks.  you enter a
folder and your settings are set up accordingly.


Mutt is extremely flexible and customisable but you will have to
read the fine manual.

HTH, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-