LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-25-2007, 05:40 AM   #1
zyrixnet
LQ Newbie
 
Registered: Sep 2007
Posts: 4

Rep: Reputation: 0
Can a mailbox be stored in a database?


Hello All,

I have been thinking about this for many years, and could not find a good way to do this. I wonder now, if any software already exists for this purpose.

Okay, basically a POP3/IMAP/SMTP server which fully uses a database, for example MySQL. When mail is send to the server via SMTP, the user is checked via MySQL, and the mail is then stored in a database table following a strict configuration layout the user chooses when he/she sets up the server. Now this is where is gets fun... The POP3/IMAP server would fetch the mail from the database table. A configuration can be set for this as well. Now, the mail can also be accessed by a MySQL-enabled language. For example Perl or PHP, to create a webmail interface which communicates directly with the database instead of through a network protocol. Ultimately creating a fully customized mail server/webmail system.

As in customization, the server owner can add flags into the database for special purposes, such as letting a user flag specific Email for download, or flag specific Email as webmail only, or even download only, making a type of next-gen mail server.

Does anyone know of any software which can do this natively or even through a plug-in system? Would anyone know how I can create this type of system through either from scratch or by modifying an existing mail server?

Thank you, any information on this would be most helpful.
Kevin.
 
Old 09-25-2007, 06:15 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
yeah there are plenty of ways to do this, fairly common too....

http://gentoo-wiki.com/HOWTO_Secure_..._using_Dovecot

for example

Last edited by acid_kewpie; 09-25-2007 at 06:17 AM.
 
Old 09-25-2007, 07:01 AM   #3
zyrixnet
LQ Newbie
 
Registered: Sep 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Hmm, close but not quite

I want the mail spool to be stored in a database. The link you provided explains how enable username/password lookups via a database, but it does not store the mail itself in the database. I already have my mail server set-up to retrieve username/passwords from a database.

For example, when mail is sent to SMTP, it would do a query like this:
insert into mailspool values ($UID,$Headers,$Message,$etc,$etc)

When mail is retrieved using POP3/IMAP, it would do a query like this:
select * from mailspool where uid=$UID

I hope this provides a better understand of what I would like to attempt.

Thanks.
 
Old 09-25-2007, 09:49 PM   #4
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Here is something.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
(my)sql: drop database doesn't remove database kpachopoulos Programming 3 09-19-2007 01:32 PM
Database Programming (database to database transaction) johncsl82 Programming 7 02-02-2007 08:20 AM
LXer: A database solution is more than database software LXer Syndicated Linux News 0 09-25-2006 08:54 AM
DHCP database stored in ldap marvin00001 Linux - Networking 2 10-18-2005 10:51 AM
(!) can a root password be stored on server database? leduytien Linux - Software 3 10-28-2004 04:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration