473,472 Members | 2,257 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Search your email using SQL!

Dear PostgreSQL people,

I thought that some of you might be interested to know about Decimail, a
new IMAP mail server that I've written that uses PostgreSQL to implement
its message store.

Decimail's unique feature is that mailboxes are defined using SQL
queries. So for example you can match all messages to this list with
this query:

select msg_id from to_addrs where ad*****************@postgresql.org'

But it's better than that. You can have a table of mailing lists that
stores the list name and its address:

list_name | submit_addr
--------------------+------------------------------
PostgreSQL SQL | pg*******@postgresql.org
Wget | wg**@sunsite.dk
PostgreSQL General | pg***********@postgresql.org

Then you can create a view that generates a query like the one above for
each of these lists:

-[ RECORD 1 ] --------------------------------------------------------
mailbox | Lists/PostgreSQL SQL
query | select msg_id from to_addrs where addr='pgsql-sql@postgresql
-[ RECORD 2 ]---------------------------------------------------------
mailbox | Lists/Wget
query | select msg_id from to_addrs where addr='wg**@sunsite.dk'
-[ RECORD 3 ]---------------------------------------------------------
mailbox | Lists/PostgreSQL General
query | select msg_id from to_addrs where addr='pgsql-general@postgr

Now combine (UNION) this with similar views generated from your address
book (you keep that in a PostgreSQL table as well don't you?), for
chronological filtering, and so on. Each of the queries that you define
is visible as a mailbox within your IMAP email clients (note the level
of hierarchy defined in the mailbox names above).

Decimail is GPLed and has just been announced to the world at large in
the last few days; I'm probably still the only person who's using it.
So it's not exactly suitable for use in a "production" environment. But
if you're an experimenter and you like the idea of searching and
categorising your email using SQL, it could be just what you're looking
for. I've been using it for several months and it has never lost any
email. The hard and boring part is the IMAP server code but that's
done; the fun bit is getting the database to present clever and useful
views of the messages.

Have a look at the web page: http://decimail.org/

Thanks to all you PostgreSQL people for making this possible.

Regards,

--Phil.
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #1
0 1169

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: middletree | last post by:
Intranet tech support system using ASP/VBScript running on W2000 Server, IIS, and using SQL Server 2000. I need to add a search engine. The problem with using a regular SQL query is that if you...
6
by: Rizyak | last post by:
******************** alt.php.sql,comp databases.ms-sqlserver microsoft.public.sqlserver.programming *********************************** Why doesn't this work: SELECT * FROM 'Events'
3
by: RiceGuy | last post by:
Hi! I'm looking for ideas on what would the best approach to design a search system for a RSS feeds. I will have some 50 RSS feeds (all RSS 2.0 compliant) stored locally on the web server. Now I'm...
3
by: huzz | last post by:
I've a table filed holds keywords seperated by comma, and a web search form where a user can type one of multiple keywords in the search text field seperated by comma aswell. How do i create a sql...
83
by: D. Dante Lorenso | last post by:
Trying to use the 'search' in the docs section of PostgreSQL.org is extremely SLOW. Considering this is a website for a database and databases are supposed to be good for indexing content, I'd...
2
by: misschristalee | last post by:
I'm having a brain blockage day.... Scenario: Search Form with 6 text boxes Query has same six fields Each has this IIF: IIf(IsNull(!!),"",!!) with each dictating the correct text box of...
6
by: DC | last post by:
Hi, I am programming a search catalogue with 200000 items (and growing). I am currently using the SQL Server 2000 fulltext engine for this task but it does not fit the requirements anymore. ...
2
by: correo | last post by:
Hello, I've built a search engine that queries a MySQL database. However, if I enter "foo bar", the engine will search for that phrase exactly, and will not find "bar foo" nor "foo something...
4
by: EvoEight | last post by:
I'm writing a search for our site and I'm running into a few problems. When I run the query like this, it runs just fine: Declare @Keywords varchar(2000) Select @Keywords = 'modern trial...
12
by: iahamed | last post by:
Hi Everyone, I got two parts of my advance search to work, I am running out of Logic to connect the third. My mind is in swing! Pleaseeeeeeeee Help me. I have 3 Fiels to search, the First two...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.