Mail is a bit strange

Hello, I have a newly-built Haiku setup and can’t see how to use the mail application. I would like to connect to an IMAP server and browse the mail items that are stored thereon. However, when I open the mail application, it starts with a ‘new message’ window rather than the expected list of mailboxes, through which one can browse, search, select etc.

I have set up a new account, accessing the IMAP server, specifying server IP name, account name, password etc. but there doesn’t seem to be any way of accessing the server’s mailboxes. How does one do this ?

I don’t use the mail app, So I can’t help you. But if no one replies you could have a look at a userdoc that might give some light to the situation.

http://svn.berlios.de/svnroot/repos/haiku/haiku/trunk/docs/userguide/en/preferences/prefs-e-mail.html#settings

edit by admin: fixed link.
edit by admin2: added missing closing quote :wink:

I have no IMAP account, so I can’t check, but I’d be interested in your findings.

I could imagine that the folder hierarchy of your IMAP server is mirrored in ~/home/mail/. At least that would make sense…
Double-clicking on the mail_daemon’s mailbox icon in the deskbar will open that folder by default.

Most things are file based in Haiku, as the file system is already a database; IOW there is no separate mail database. You just use Tracker (the file manager), and can either open the directory where you want to get your mail (usually /boot/home/mail), or use queries to only see those you currently want to see.

For example, I have usually three mail windows open (saved as queries, reachable via the mail icon in the Deskbar): one shows me new mails, one mails that I should answer, and one that I might want to have another look at, at a later time.

If I need to find an older mail, I can either browse the mail directory directly (hardly ever, though, due to the amount of mails), or use Tracker’s find panel (attribute search).

Thanks for those responses. I get the idea of the mail archive just being part of the file system. I suppose if I’d left Haiku running long enough, mail_daemon would have started copying messages from my IMAP server in ~/mail … and therein lies my objection. The design means that the messages are a copy of what’s on the IMAP server, not a live view as with a more conventional mail client. With 2 GiB of messages, that’s quite a copy.

I used Mail for a while, and I have a question: how do you manage to follow the mailing lists without threading or GMail style conversations? I quickly got lost in the deluge of messages.

BTW, I love the idea of the FS being a database. I realized how nice it could be after reading this: http://svn.berlios.de/svnroot/repos/haiku/haiku/trunk/docs/userguide/en/workshop-filetypes+attributes.html

[quote=General Maximus]I used Mail for a while, and I have a question: how do you manage to follow the mailing lists without threading or GMail style conversations? I quickly got lost in the deluge of messages.

BTW, I love the idea of the FS being a database. I realized how nice it could be after reading this: http://svn.berlios.de/svnroot/repos/haiku/haiku/trunk/docs/userguide/en/workshop-filetypes+attributes.html[/quote]

If I am not mistaken, the mail file type has a thread attribute that would allow you to do queries by thread.

/me thinks it would be nice to be able to easily open a query containing all message with a given subject – perhaps from the mail client or even Tracker – thus simplifying reading through email threads.

@Michael: As I said, I don’t have an IMAP account to check, but I guess that not whole messages are downloaded but only the headers. This could still be a lot at the first time you connect, but how else are you going to display that information?
Maybe a webmail account to access via browser would be better suited.

@koki: There’s still ticket #1208 waiting on its completion. :slight_smile:

OK, worked it out now.

Still no mail because my server won’t accept plaintext authentication. Usually I use SSL but that doesn’t seem to be an option with mail_daemon.

Also, how does one establish a local IP to name mapping, equivalent to Unix /etc/hosts ? I’d prefer to address my server by name, not dotted IP address.

The hosts stuff currently works just as user unfriendly as under Unix. See this Tip Server classic.
The path has to be updated to /boot/system/etc/hosts.

For SSL you need the OptionalPackage. I hope these work when installing after the fact, I always compile it into my images.

I was thinking more along the lines of queries programatically created by the application that help follow up on any given email that you are displaying in Tracker or viewing in Haiku’s mail app. Imagine this scenario…

You are looking at an email sent in by John to the Haiku mailing list with a subject “How to use email”. What I think would be very useful is if the mail client would provide a point-and-click way to allow me to open queries for “all emails from John”, “all emails to the Haiku mailing list” and “all emails with the subject [How to use Email] (all emails from this thread)”. This capability could be available in the Mail app, as well as a Tracker add-on.

Maybe I am asking too much, so for now I could live with the functionality proposed in the above-mentioned ticket though. :slight_smile:

OK, thanks for that. My UserBuildConfig now looks like this:

AddUserToHaikuImage mounty : 573 : 100 : /boot/home/mounty : /bin/bash : “Michael Mounteney” ;

AddOptionalHaikuImagePackages Beam ;

AddOptionalHaikuImagePackages BeHappy ;

AddOptionalHaikuImagePackages BePDF ;

AddOptionalHaikuImagePackages Firefox ;

AddOptionalHaikuImagePackages NetSurf ;

AddOptionalHaikuImagePackages OpenSSL ;

AddOptionalHaikuImagePackages OpenSSH ;

AddOptionalHaikuImagePackages Pe ;

AddOptionalHaikuImagePackages Vision ;

AddOptionalHaikuImagePackages Welcome ;

AddOptionalHaikuImagePackages WonderBrush ;

Add symlink/file (timezone and keymap settings) to the image.

AddSymlinkToHaikuImage home config settings
: /boot/system/etc/timezones/Australia/Adelaide : timezone ;

AddFilesToHaikuImage home config settings : “US-International” : Key_map ;

DefineBuildProfile disk : disk : “/dev/hda14” ;

switch $(HAIKU_BUILD_PROFILE) {
case “disk” : {

VLC WonderBrush P7zip LibLayout Links NetSurf Beam BeHappy BePDF

	AddOptionalHaikuImagePackages BeBook Bluetooth CVS
		Development Firefox OpenSound OpenSSH
		OpenSSL Pe Perl Subversion UserlandFS Vision Welcome
		Yasm ;
}

case "vmware" : {
	HAIKU_IMAGE_SIZE = 900 ;
}

}

HAIKU_IMAGE_HOST_NAME = pimple ;
HAIKU_BUILD_FEATURE_SSL = 1 ;

but when I build, there are various messages like

generated/download/subversion-1.6.2-x86-gcc2-2009-05-20.zip.zip, and cannot find generated/download/subversion-1.6.2-x86-gcc2-2009-05-20.zip.ZIP, period.
[generated/download/yasm-0.8.0-x86-gcc2-2009-07-06.zip]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of generated/download/yasm-0.8.0-x86-gcc2-2009-07-06.zip or
generated/download/yasm-0.8.0-x86-gcc2-2009-07-06.zip.zip, and cannot find generated/download/yasm-0.8.0-x86-gcc2-2009-07-06.zip.ZIP, period.
[generated/download/Vision-0.9.7-H-090423.zip]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of generated/download/Vision-0.9.7-H-090423.zip or
generated/download/Vision-0.9.7-H-090423.zip.zip, and cannot find generated/download/Vision-0.9.7-H-090423.zip.ZIP, period.

so what’s happening here ?

Yes you’re right the BeOS mail model is unusual, but it arises from that original BeOS concept of filesystem as database. That invites the user to embrace queries as the main method of navigating his data, whether it’s emails, jpegs, MP3s, or whatever. You’re supposed to go hog-wild with custom queries, taking the place of mailboxes, music libraries and so on.

Now, stuck as I am at the far end of the world, I have never seen a live BeOS or Haiku installation that was not my own. So what I am suggesting may be reinventing the wheel, but read on…

The big problem, IMO, is that all those queries are created by default in the ~/Queries folder and that becomes just a big mess of every type of query. They need sorting. (And the suggestion in Ticket #1208 mentioned above is recognition of that. But it requires users to do some work, manually identifying mail-related queries and moving them to a special folder.)

Here’s my modest solution. Call it superqueries, if you like:
First, index _trk/qrystr (in a terminal: >mkindex _trk/qrystr) thus making queries themselves searchable according to whatever they’re searching for.

Now you can set about making superqueries for whatever broad categories you are interested in.
eg, in a Terminal:

touch MailBox
settype -t “application/x-vnd.Be-query” MailBox
addattr _trk/qrystr “((_trk/qrystr==“text/x-email”)&&(BEOS:TYPE==application/x-vnd.Be-query)&&
(name!=”[mM][aA][iI][lL][bB][oO][xX]"))" MailQueries
(That last expression all on one line, of course. No space after the ampersands.)

And there you’ve made a query that doesn’t find itself but returns all other queries which are looking for emails, whether it’s “unread” “to and from Aunty Em” “Haiku devs” or whatever.

I’ve been using this happily on BeOS for a few years now, with four (so far) superqueries in use; Mailbox, People, Mitunes (ultimate target MP3s) and PhotoAlbums (ultimate target jpegs; particularly useful because I have custom “caption” “copyright” and “keywords” attributes attached to jpegs, and indexed. You just have to do a bit of work adding that data every time you import a batch of photos from the camera.)

I also have a query called “World” which looks for only those four queries, so when it’s clicked on, it cascades into them. That sits on my Desktop as an alternative way-in to the data I access most. That’s as far as I’ve gone, but ISTM this is highly extensible,

Meanwile, I see that Ticket #1208 has already been acted on, with a ~/config/settings/Mail/Queries folder in current builds, and a link to it in the mail menu. But as I say, you have to manually put mail-related queries in there. I’ve replaced that folder in my mail menu with my Mailbox superquery. No further work needed.

Finally, I think the default Find window could lose the expander - if the name box and “temporary” checkbox were visible by default (and perhaps unchecked by default), more users might get the idea. The bottom line is: once you have a sorted way-in to your Queries folder it becomes much more practical to make lots of permanent sensibly-named queries, and start using them.

how can I manually start the mail_daemon?
For checking my email I need to send myself a blank email so the program propose me to start this mail_daemon, and I can’t find a way to do it myself, either by an icon, or from the command line. (I can’t updatedb, so I didn’t manage to find the mail_daemon with the locate command)

(edit: I found in the email settings the option: start mail services on startup, so I guess it should do the job…)

Mail has been one of the strengths of the BeOS system. Even now MS could learn from it although with Windows Live Mail they have at least stopped using the large single database storage element from old and now store each email as a separate file.

Very intuitive and with a file system as with BeOS/Haiku - easy to search your messages and manipulate your store.