Re: Windows Host + Linux Guest + Mutt + shared maildir (Samba?)

2013-11-19 Thread Edward Toroshchin
On Mon, Nov 18, 2013 at 08:51:15PM -0500, Mark Filipak wrote:
 Thank you, Edward, but I want to be able to read email in the Windows Host 
 which has no Internet access. I don't see how IMAP would help?

I meant setting it up on your virtual Linux machine. You do have network
between host and guest system, don't you?

 I agree. But I was told that it substitutes somehow... like one would escape 
 certain characters in a URL, thereby making the maildir available to Windows 
 without having to make any changes in Linux.

Are you sure mutt will work correctly then?

 Do you know of anyone who has a setup like mine who would be willing to give 
 me 
 some guidance?

I didn't even know there was mutt on Windows, sorry.

Probably another approach would be to patch both mutts (in host and
guest system) to use a separator other than ':'.

-- 
Edward Hades Toroshchin
dr_lepper on irc.freenode.org


Re: Windows Host + Linux Guest + Mutt + shared maildir (Samba?)

2013-11-19 Thread Edward Toroshchin
On Tue, Nov 19, 2013 at 06:51:18AM +, Mick wrote:
 However, I have never used SAMBA in this operating context and don't
 know what would happen if both OS tried to write to a file
 concurrently - Linux at fs level and MSWindows at an application
 level.  I would think that application level locks would manage access
 to it.  Better try it out first before you trust your data to it.

This should not be an issue with Maildirs, because they were designed so
that no one ever writes to the same file simultaneously.

-- 
Edward Hades Toroshchin
dr_lepper on irc.freenode.org


Re: Attachment signal

2013-11-19 Thread LEVAI Daniel
On k, nov 19, 2013 at 09:55:40 +0100, Alexandre wrote:
 Hello,
 using mutt every day with many mails, I sometimes do not see that some
 mails have attachment(s).

Same here; sometimes it is too late, I've already opened the mail and
now it tries to download the 10+ megabytes, just to read the two lines
of text, along with the big attachment...

The more annoying thing is there is no way to stop/break the
downloading.

 In practice, do you have any tips to signal there is any attachment to
 emails ?
 
 Some ergonomic options:
 - adding tag in Index
 - adding tag in headers (to show in mutt)
 - others ?
 
 Many thanks for sharing your ideas.

I've setup the index_format to indicate the size of the mail in a column
where my eyes usually hover while tending to my mails. So if it strikes
me (and sometimes I still skip over it...) that it's unusually large,
then I'll open it with view-attachment first.

That is the closest thing I could get to warn myself about large emails
and attachments.


Daniel

-- 
LÉVAI Dániel
PGP key ID = 0x83B63A8F
Key fingerprint = DBEC C66B A47A DFA2 792D  650C C69B BE4C 83B6 3A8F


Re: Attachment signal

2013-11-19 Thread Suvayu Ali
On Tue, Nov 19, 2013 at 10:05:10AM +0100, LEVAI Daniel wrote:
 On k, nov 19, 2013 at 09:55:40 +0100, Alexandre wrote:
 
  In practice, do you have any tips to signal there is any attachment to
  emails ?
  
  Some ergonomic options:
  - adding tag in Index
  - adding tag in headers (to show in mutt)
  - others ?
  
  Many thanks for sharing your ideas.
 
 I've setup the index_format to indicate the size of the mail in a column
 where my eyes usually hover while tending to my mails. So if it strikes
 me (and sometimes I still skip over it...) that it's unusually large,
 then I'll open it with view-attachment first.
 
 That is the closest thing I could get to warn myself about large emails
 and attachments.

I use the following as my index_format:

  %4C %Z %?X?@ ? %{%b %d} %-15.15n (%?M?»%3M%4c?) %s

The @ tells me there is an attachement, and the 4c tells me the size of
the email.  I find this works mostly, except from some emails from Apple
Mail.  It does not work when the Apple Mail user embeds the attachment
in the email (e.g. pictures).  I think the MIME information set by Apple
Mail in this case is just plain wrong.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.


Re: Attachment signal

2013-11-19 Thread Chris Down
On 2013-11-19 10:23:42 +0100, Suvayu Ali wrote:
 I use the following as my index_format:
 
   %4C %Z %?X?@ ? %{%b %d} %-15.15n (%?M?»%3M%4c?) %s
 
 The @ tells me there is an attachement, and the 4c tells me the size of
 the email.  I find this works mostly, except from some emails from Apple
 Mail.  It does not work when the Apple Mail user embeds the attachment
 in the email (e.g. pictures).  I think the MIME information set by Apple
 Mail in this case is just plain wrong.

I tried this, and it caused Mutt to start having to download all message
bodies in the index. Is this expected, or did I do something wrong? If
so, it seems to defeat the point of knowing.


pgpaqvzEIQnB1.pgp
Description: PGP signature


Re: Attachment signal

2013-11-19 Thread LEVAI Daniel
On k, nov 19, 2013 at 17:38:27 +0800, Chris Down wrote:
 On 2013-11-19 10:23:42 +0100, Suvayu Ali wrote:
  I use the following as my index_format:
  
%4C %Z %?X?@ ? %{%b %d} %-15.15n (%?M?»%3M%4c?) %s
  
  The @ tells me there is an attachement, and the 4c tells me the size of
  the email.  I find this works mostly, except from some emails from Apple
  Mail.  It does not work when the Apple Mail user embeds the attachment
  in the email (e.g. pictures).  I think the MIME information set by Apple
  Mail in this case is just plain wrong.
 
 I tried this, and it caused Mutt to start having to download all message
 bodies in the index. Is this expected, or did I do something wrong? If
 so, it seems to defeat the point of knowing.

That is correct.
muttrc(5):
[...]
 index_format
  %X number of attachments (please see the attachments section for possible 
speed effects)

ATTACHMENTS
In order to provide this information, Mutt needs to fully MIME-parse
all messages affected first. This can slow down operation especially for
remote mail folders such as IMAP ...


But not to worry! Body caching[1] is might be just what you need :)



[1] - http://www.mutt.org/doc/devel/manual.html#body-caching

-- 
LÉVAI Dániel
PGP key ID = 0x83B63A8F
Key fingerprint = DBEC C66B A47A DFA2 792D  650C C69B BE4C 83B6 3A8F


Re: Attachment signal

2013-11-19 Thread Chris Down
On 2013-11-19 11:18:28 +0100, LEVAI Daniel wrote:
 But not to worry! Body caching[1] is might be just what you need :)

I cache bodies, but this is a bit irritating since it takes ages to
download my non-inbox folders that I haven't viewed for a while over
IMAP :-)


pgpTbMbuXNsaC.pgp
Description: PGP signature


Re: Attachment signal

2013-11-19 Thread Alexandre
Hello all,
many thanks for your replies/comments.


Année 2013, mardi 19 novembre, vers 10:23, Suvayu Ali écrivait:
 I use the following as my index_format:
   %4C %Z %?X?@ ? %{%b %d} %-15.15n (%?M?»%3M%4c?) %s

This solution is fine for me.

 Hope this helps,

Sure!

Have a nice day.

-- 
Alexandre Delanoë


Re: Attachment signal

2013-11-19 Thread Suvayu Ali
On Tue, Nov 19, 2013 at 06:23:19PM +0800, Chris Down wrote:
 On 2013-11-19 11:18:28 +0100, LEVAI Daniel wrote:
  But not to worry! Body caching[1] is might be just what you need :)
 
 I cache bodies, but this is a bit irritating since it takes ages to
 download my non-inbox folders that I haven't viewed for a while over
 IMAP :-)

Sorry about that.  I forgot about that caveat.  I use Maildirs, so it is
a non-issue for me.  In your case, I guess you have to live with the
message size (%c) information.

-- 
Suvayu

Open source is the future. It sets us free.


Message size varying during mailbox sync and directory change

2013-11-19 Thread LEVAI Daniel
Hi!

One thing I have been wondering about for quite a while now, is why are
the message character counts (%c) gets modified (eg.: in index_format=)
after I do a mailbox sync, or display the message with the built-in
pager.

When I enter an IMAP folder (change-folder) there are the %c values in
the index. And for some messages (not the case with all of them), that
value changes when I display the message, or do a sync (sync-mailbox).
Usually the size value decreases, eg. the %c value was 3.9K initially
when I entered the folder, then after displaying it morphed into 1.5K.
Why would that be?


Daniel

-- 
LÉVAI Dániel
PGP key ID = 0x83B63A8F
Key fingerprint = DBEC C66B A47A DFA2 792D  650C C69B BE4C 83B6 3A8F


Re: Attachment signal

2013-11-19 Thread Martin Vegter


   %4C %Z %?X?@ ? %{%b %d} %-15.15n (%?M?»%3M%4c?) %s



This is fantastic. This answers my question, before I had time to ask 
it. Could you please describe how this works: %?X?@ ?


thanks,
Martin


Re: Attachment signal

2013-11-19 Thread rlharris

%4C %Z %?X?@ ? %{%b %d} %-15.15n (%?M?»%3M%4c?) %s

 This is fantastic. This answers my question, before I had time to ask
 it. Could you please describe how this works: %?X?@ ?

Those are string formatting directives.

First of all, you need to be searching the Mutt manual as a matter of
routine.  Open a browser such as Firefox or Iceweasel, and use the browser
to open the file /usr/share/doc/mutt/html/index.html .  Then from the EDIT
menu of the browser click FIND to open the string search window.

Now you can search for strings such as format and string.  If you
search, you shall find sections on topics such as status format and
index format which sections explain formatting  and the symbols.

You also shall find the comment: Format strings are similar to the
strings used in the C function printf to format output (see the man page
for more detail).

So now you open a terminal window and type man printf.

RLH

==
Give a man a fish, and tomorrow he shall return expecting another.
Teach a man to fish, and tomorrow he shall return to give you thanks.
=



Re: Attachment signal

2013-11-19 Thread Suvayu Ali
Hello,

On Tue, Nov 19, 2013 at 04:57:22PM -0600, rlhar...@oplink.net wrote:
 
 %4C %Z %?X?@ ? %{%b %d} %-15.15n (%?M?»%3M%4c?) %s
 
  This is fantastic. This answers my question, before I had time to ask
  it. Could you please describe how this works: %?X?@ ?
 
 Those are string formatting directives.

To be more verbose, it is a conditional expando.  ? and  are the
delimiters: %?condition?if-trueelse?  I want it to be conditional
on X, so it goes first; if there is an attachment show @, a blank space
otherwise.  Without the blank space, my subject lines in the index would
be misalligned depending on if there are attachments or not.

 
 First of all, you need to be searching the Mutt manual as a matter of
 routine.  Open a browser such as Firefox or Iceweasel, and use the browser
 to open the file /usr/share/doc/mutt/html/index.html .  Then from the EDIT
 menu of the browser click FIND to open the string search window.

Or do it from mutt!  I use the following:

macro index,pager,postpone,compose,query,browser F1 shell-escapeless 
/usr/share/doc/mutt-kz-1.5.22/manual.txtenter Show Mutt documentation
macro index,pager,postpone,compose,query,browser F2 shell-escapeless 
/usr/share/doc/mutt-kz-1.5.22/README.notmuchenter Secondary help

PS: I use the mutt fork mutt-kz.

-- 
Suvayu

Open source is the future. It sets us free.


Re: Attachment signal

2013-11-19 Thread Derek Martin
On Tue, Nov 19, 2013 at 10:05:10AM +0100, LEVAI Daniel wrote:
 On k, nov 19, 2013 at 09:55:40 +0100, Alexandre wrote:
  Hello,
  using mutt every day with many mails, I sometimes do not see that some
  mails have attachment(s).
 
 Same here; sometimes it is too late, I've already opened the mail and
 now it tries to download the 10+ megabytes, just to read the two lines
 of text, along with the big attachment...
 
 The more annoying thing is there is no way to stop/break the
 downloading.

There certainly is, even if it's not exactly what you meant...

  $ kill -KILL `pidof mutt`

SIGTERM instead of SIGKILL may or may not work, but would be more
gentle if it does.


-- 
Derek D. Martinhttp://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.



pgpqerHoq4rvw.pgp
Description: PGP signature


Re: Windows Host + Linux Guest + Mutt + shared maildir (Samba?)

2013-11-19 Thread Mark Filipak

On 2013/11/19 3:02 AM, Edward Toroshchin wrote:

On Mon, Nov 18, 2013 at 08:51:15PM -0500, Mark Filipak wrote:

Thank you, Edward, but I want to be able to read email in the Windows Host
which has no Internet access. I don't see how IMAP would help?


I meant setting it up on your virtual Linux machine. You do have network
between host and guest system, don't you?


No. The Windows Host has no network.


I agree. But I was told that it substitutes somehow... like one would escape
certain characters in a URL, thereby making the maildir available to Windows
without having to make any changes in Linux.


Are you sure mutt will work correctly then?


Mutt would be running in the Linux Guest. It's Linux.


Do you know of anyone who has a setup like mine who would be willing to give me
some guidance?


I didn't even know there was mutt on Windows, sorry.


No Mutt in Windows. The Windows Host has no Internet.


Probably another approach would be to patch both mutts (in host and
guest system) to use a separator other than ':'.


Next...

(How's the movie so far?)


Re: Windows Host + Linux Guest + Mutt + shared maildir (Samba?)

2013-11-19 Thread Mark Filipak

On 2013/11/19 1:51 AM, Mick wrote:

On Monday 18 Nov 2013 05:29:04 Mark Filipak wrote:


My setup is a virtual machine environment.
Host OS: Windows-7, 64bit, without an Internet connection.
Guest OS: Linux Mint 14, with an Internet connection.
Shared folder #1: The download directory (Net  Guest  Host).
Shared folder #2: The maildir directories.

Problem: Maildir filenames use characters that are illegal in Windows.
Solution: Samba? How? I'm ignorant of Samba.


There isn't much to it and the Samba documentation is excellent.  Just to try
things out quickly you can enable guest users.



Problem: Windows permissions can create problems for Linux.
Solution: Make the shared folders a separate, ext3 partition - I think that
Samba comes into play here also.


I don't know what permissions problems you are talking about...


Windows kept saying Hey! That came from an alien system. I'm not going to let 
you install it. It would lock stuff and laugh at me.



...but you have three main options that I can think of:

1. A Linux fs, which MSWindows can read.  There are MSWindows drivers for
ext2, but I don't know if they work for 64bit systems, how ACLs translate
across OS' etc.;

2. A Linux only fs that MSWindows cannot read, e.g. ext4 and use something
like SAMBA to serve the files across the OS boundary.

3. A MSWindows fs like NTFS and use ntfs-3g to mount it from Linux.  The same
would apply with VFAT, although NTFS is more robust.


However, although 1 and 3 above will work nicely when dual booting, with
concurrent access to the same fs from two different OS' you are asking for
trouble.  File locks may be violated if you try to write to the same file and
data become corrupted.


That will never happen. Windows will never write to either the shared download 
directory or the shared maildir. Why? Because the Windows Host has no Internet. 
No Internet, no download. No Internet, no email. Get it? Download and Email 
only from Linux, but accessible to Windows - just not writable in Windows.



You may be able to set up special file or directory
locking through some shell script in Linux, or EMCO MoveOnBoot on MSWindows,
but I would leave this as an exercise for a rainy day.


Not needed.


This leaves option 2, SAMBA as a plausible solution - application rather than
fs level access from MSWindows.  However, I have never used SAMBA in this
operating context...


Errmmm... I thought that Samba WAS the file system interface to Windows. Isn't 
Samba an SMB compatible interface for Linux filesystems? You know: Looks like a 
Linux user to the Linux filesystem, looks like an SMB server to the Windows OS.



...and don't know what would happen if both OS tried to write
to a file concurrently


Again, that will never happen. Don't worry about it. To Windows, the shared 
stuff might as well be read-only.



- Linux at fs level and MSWindows at an application
level.  I would think that application level locks would manage access to it.
Better try it out first before you trust your data to it.