Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How can one create their own web-based email server, under these constraints:
- Emails are stored in a MySQL database
- Emails are accessed through PHP scripts
- Emails are received from pop servers and sent through smtp servers every 10 minutes acting as if it was an email client to yahoo or hotmail or other pop/smtp servers
Squirrelmail is a good PHP based web client for a POP / IMAP server. Based on your criteria, I might suggest Postfix + Dovecot, except for having the mail stored in MySQL. The combination would work very well to support virtual users for the mail system, as opposed to system account users, in a MySQL database. The mails themselves would still be stored in plain text files typically in a subdirectory of /var. The main reason for this is that there are still two primary formats: mailbox and maildir which are common amongst the SMTP servers and POP/IMAP servers. To be honest, I haven't heard of one storing the mail in SQL, though they may exist.
I know you highlighted the part about 'acting as an email client' but from your description it sounds like you need what is called an MTA, mail transfer agent - in other words an SMTP server. Postfix is an SMTP server and the Dovecot would be your POP/IMAP server. The two functions are distinct from each other and also differnt than an MUA (mail user agent) like Outlook or Thunderbird.
The Postfix server would be able to receive mail from almost any source and pass it on to another mail host, such as Yahoo, hotmail, or any other SMTP server. I read your post as this being your meaning. If I am misunderstanding you, please try to clarify.
Thanks a lot everyone. Would any of these work decently on a server with 128 MB of memory or less? And which distro is suitable for such a low spec but can still run the recommended software decently?
Quote:
Originally Posted by Noway2
The Postfix server would be able to receive mail from almost any source and pass it on to another mail host, such as Yahoo, hotmail, or any other SMTP server. I read your post as this being your meaning. If I am misunderstanding you, please try to clarify.
No I meant that I have accounts at hotmail and yahoo but want to collect all my emails from their pop servers to a local server of mine. And that server to be accessible through a web interface.
Do the products you mentioned simply interrogate hotmail and yahoo every 10 minutes like a client would? It would be nice if they were as simple to congifure as thunderbird.
Thank you for clarifying, yes, I really misunderstood what you were asking. Unfortunately, I don't these programs will do that. I am not aware of an existing package to do this, but that certainly doesn't mean that there isn't one. However, as an initial thought, it might not be too difficult to write a small script that uses existing Linux utilities to do the "heavy lifting" and accomplish this.
Here is what I am thinking: you could set up a cron task to call your script every 10 minutes. Your script would either telnet into your yahoo or hotmail and perform the canned actions to retrieve the messages. I say canned procedure because the command set is fairly simple and can be turned into an automated process. The data would be plain text. Your script could then make a connection to SQL, and add the text as an INSERT statement to a table with fields for the header information.
You might be able to do this with simple shell script, but it might be a little easier with a programming language of choice, like PERL or PHP. I would look at possibly using elm or pine as mail clients if the telnet approach doesn't work. Optionally, you could use CURL to perform the send - receive between the servers.
As far as small memory machine, 128MB is rather small these days. The good news is that if there is an OS that will support it, it will be Linux. I am pretty sure that there have been a couple of recent threads and articles on Linux for small systems which would have more information, but from what I remember Puppy Linux and Damn Small Linux were two contenders in this regard. I suspect that a full blown email server, like I was thinking you were after would be a bit much for that size of memory.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.