Moeen Alinaghian wrote:
> I think because of these reasons :
> 1- you must start a Database engine in your server, too.

Why do you think that I can't use one that's already available??

> 2- if MySQL goes down, you have problem ! (it's more possible to MySQL 
> goes down, but not postfix) even though it's not a good reason for not 
> to use MySQL :D

I'm not planning to use this in a running mail server:

I'm pasting my earlier mail below:

"
I've got more then 150000 old mails in a single account which is taking
up almost 10GB on my mail server.

What I'm planning to do is - setup a sql server on another machine, get
a program to download those mails from the mailsever using pop3 and feed
it to the sql database and store it there.

Whenever there's a requirement to dig some mails out of those 150000
mails, I can simply run a query on the sql server and get the results,
so it doesn't put any load on my mail server. Once the setup is done, I
can also delete all the mails from the mailserver to save space.
"

So what I'm planning to feed to the database is - old mails - lots of 
them. The program won't be running every time. I'll run it only when I 
want to feed the mails from IMAP/POP3 server to the database.

The current mail server will continue to use the Maildir format.


> 3- Security Reasons ! It's easier to crack the MySQL, specially when use 
> MySQL for another things, too ! and some times you can get all the Data 
> of MySQL with one user access ... you see most of the website (and 
> Portals) uses MySQL for store some of datas, and you want store mails in 
> MySQL too, that is not a good security practice !

As I've already mentioned above, I'll be hosting the database on another 
machine - which doesn't have public ip, or any other services running.

> 4- Currently MailDir is compatible with the most of softwares, and I 
> think no body tried to chage this standard :P

You think Maildir is perfect - until you try searching for a mail from 
an account which holds 150000+ mails!! :)

If it's in a database, it's as simple as :

SELECT * FROM mails WHERE from = "[EMAIL PROTECTED]";

Or, is it that simple?? I'm yet to find out.

>  
> Also it's not hard to get backup from mails and could easily done by a 
> script, but if you really like to store in MySQL, I guess you must 
> coding by yourself.

Yes. I think so. This time it's not as easy as searching the google and 
downloading a script and editing it as per my requirement. :(

After the 'pressure' from DLUG yesterday, I took sometime out and did 
what I do the most - googling! As per the results I got, I think perl 
will be the perfect language(for me) to get my work done. Perl can speak 
to pop3 servers and can feed data into mysql database. I'm sure almost 
all programming languages does that, but perl code looks easy to understand.

This looks interesting:

How to use POP3 in Perl scripts
A Perl script showing how to use Net::POP3

http://perl.about.com/od/emailandperlscripts/l/aa022700f.htm

I was able to modify the program and do some test runs(no database 
connectivity yet - I guess that's no big deal). But was wondering how to 
handle mails with attachments. :(

Seems like it's going to take a lot of time for me to get this 'simple' 
task done.


Any inputs??


Mejo


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/0XFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/dubailug/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to