eml messages

33 views
Skip to first unread message

William Lytton

unread,
Jan 27, 2018, 4:49:35 PM1/27/18
to mu-discuss
More and more emails seem to be coming in as .eml

These can be detached with 'e' and then split out with shell command `munpack`

Alternatively the entire message can be viewed with '.' mu4e-view-raw-message but that provides a long mime-mess -- multipart/alternative ... within which any message is hard to find

I started writing a routine that would call munpack but didn't get it finished:

(defun mu4e-local-extract-eml (msg)
  "Get eml contents"
  (interactive "P")
  (let* ((mad mu4e-attachment-dir) (msg (mu4e-message-at-point)) name type tmp)
    (setq mu4e-attachment-dir "/tmp/"
          tmp (mu4e-local-save-attachment-single msg 1) name (nth 0 tmp) type (nth 1 tmp)) ;; modified to return name of attach and type
    (call-process "/usr/bin/munpack" nil "*Messages*" nil "-f" "-t" "-C" "/tmp" name)
    (pop-to-buffer (get-buffer-create "*EML*"))
    (setq aa tmp)
    (setq mu4e-attachment-dir mad)))

Dirk-Jan C. Binnema

unread,
Jan 28, 2018, 7:23:00 AM1/28/18
to mu-di...@googlegroups.com
Hi William,
Hmm, I know 'eml' only as a save-as format for Outlook, which is just
the raw message.

But there's something else also called "eml"? Best file an issue a
github, and please include an example message -- thanks.

Kind regards,
Dirk.

--
Dirk-Jan C. Binnema Helsinki, Finland
e:dj...@djcbsoftware.nl w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C

Simon Smailus

unread,
Jun 19, 2018, 8:46:08 AM6/19/18
to mu-discuss
I added some .eml messages to my "new" folder in my Maildir. These messages seem to appear properly in mu4e.

Does that mean I can just drag .eml messages into my Maildir and all is well, or am I missing something?

Many thanks

Simon 

Dirk-Jan C. Binnema

unread,
Jun 20, 2018, 3:10:27 AM6/20/18
to mu-di...@googlegroups.com
Yeah, I think `.eml` files are just the "raw messages", so exactly what
we expect in Maildirs.

mu doesn't care how messages get into your maildir tree -- through
offlineimap, mbsync, copying, local mail server or any other method; as
long as we can index them, we're fine.

Note that some of the sync (offlineimap, mbsync,..._) tools might try
to, well, sync those messages with remote servers; but that's outside
the control of mu.

Thomas Schneider

unread,
Jun 20, 2018, 5:24:14 AM6/20/18
to mu-di...@googlegroups.com
"Dirk-Jan C. Binnema" <dj...@djcbsoftware.nl> writes:

> On Tuesday Jun 19 2018, Simon Smailus wrote:
>
>> I added some .eml messages to my "new" folder in my Maildir. These messages
>> seem to appear properly in mu4e.
>>
>> Does that mean I can just drag .eml messages into my Maildir and all is
>> well, or am I missing something?
>
> Yeah, I think `.eml` files are just the "raw messages", so exactly what
> we expect in Maildirs.

They should be. I would however recommend to name them according to
Maildir standards[0].

mrefile(1) from mblaze[1] could do this easily (I’ve found mblaze to be
useful for hacking around with maildirs, or when I need to access mails
but have only a very limited system at hand).

If you don’t want to install it, `date +%s.N%N.$(hostname):2,` also
produces a usable, though slightly off-standard Maildir filename (with
GNU date). I’d recommend to use `mv -n` or so as not to overwrite
existing files in the unlikely event of a name clash.

--qsx

[0]: https://cr.yp.to/proto/maildir.html
[1]: https://github.com/chneukirchen/mblaze
Reply all
Reply to author
Forward
0 new messages