summaryrefslogtreecommitdiff
path: root/mysql
AgeCommit message (Collapse)AuthorFilesLines
2005-11-27consolidating loadable modules in /modules/ directorypaul2-360/+0
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1925 7b491191-dbf0-0310-aff6-d879d4d69008
2005-11-27Authentication can now be loaded at run time, too.aaron1-3/+1
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1923 7b491191-dbf0-0310-aff6-d879d4d69008
2005-11-26 * acinclude.m4: removed the restriction against having both mysql andaaron1-3/+3
postgresql libraries built together, as loadable modules allow this. * config.c: handle the trace_syslog and trace_stderr options. * dbmail.conf: new options 'driver', 'trace_syslog', 'trace_stderr'. * dbmailtypes.h: new structure db_func_t for the db driver layer. * dbmodule.c: added function db_load_driver and lots of wrapper calls. * Makefile.am, mysql/Makefile.am, pgsql/Makefile.am, sqlite/Makefile.am: switch back to separate libraries for each database driver. * sqlite/dbsqlite.c: added the sqlite3.h header, though it might break things for sqlite 2.x users; need to check on that. git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1920 7b491191-dbf0-0310-aff6-d879d4d69008
2005-11-18update svn treepaul1-0/+5
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1911 7b491191-dbf0-0310-aff6-d879d4d69008
2005-10-03resync svn treepaul1-8/+1
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1891 7b491191-dbf0-0310-aff6-d879d4d69008
2005-08-08reorginize locking code a little in pool.cpaul1-4/+2
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1835 7b491191-dbf0-0310-aff6-d879d4d69008
2005-06-21minor cleanupspaul1-2/+0
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1813 7b491191-dbf0-0310-aff6-d879d4d69008
2005-06-17auto-reply cleanuppaul1-0/+1
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1806 7b491191-dbf0-0310-aff6-d879d4d69008
2005-05-24misc fixespaul1-27/+20
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1785 7b491191-dbf0-0310-aff6-d879d4d69008
2005-03-30updates on the header-cache codepaul1-20/+15
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1719 7b491191-dbf0-0310-aff6-d879d4d69008
2005-03-01rework the shared libs setuppaul1-3/+3
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1621 7b491191-dbf0-0310-aff6-d879d4d69008
2005-02-23cleaned out autotools generated filespaul1-405/+0
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1609 7b491191-dbf0-0310-aff6-d879d4d69008
2005-02-18current_timestamp fixpaul1-0/+1
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1594 7b491191-dbf0-0310-aff6-d879d4d69008
2005-02-18changed package names for debianpaul2-1/+6
added initial sqlite support by Geo Carncross git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1592 7b491191-dbf0-0310-aff6-d879d4d69008
2005-01-14search speedup, dead-wood removal, out-of-sync fix, sigpipe fixpaul2-8/+4
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1562 7b491191-dbf0-0310-aff6-d879d4d69008
2004-12-032004-12-03 Ilja Booij <ilja@ic-s.nl>ilja1-0/+2
* lib/iniparser-2.14: directory added. Added Makefile.am in lib/ lib/iniparser-2.14 and lib/iniparser-2.14/src to include it in the build process. * config.c: changed ReadConfig() to config_read() and GetConfigValue() to config_get_value(). These functions now use the code in the iniparser library to do their job, which simplifies parsing of the ini-file a *lot*. * dbmail.h: changed prototypes for config_read() (was ReadConfig()) and config_get_value() (was GetConfigValue()). * forward.c, imapd.c, lmtpd.c, main.c, maintenance.c, pipe.c, pop3d.c, rfcmsg.c, sievecmd.c, timsieved.c, user.c, auth/authldap.c, sort/sort.c: changed calls to config_read() and config_get_value(). * auth/authsql.c(auth_get_deliver_from_alias): fixed a return value (-1 was returned instead of NULL). * README: updated * AUTHORS: updated git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1494 7b491191-dbf0-0310-aff6-d879d4d69008
2004-11-04minor fix in dbmysql.cpaul1-0/+2
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1431 7b491191-dbf0-0310-aff6-d879d4d69008
2004-10-25 db_get_result speedup by Mikhailpaul1-2/+33
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1415 7b491191-dbf0-0310-aff6-d879d4d69008
2004-10-21applied the imap_session patchpaul1-0/+1
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1412 7b491191-dbf0-0310-aff6-d879d4d69008
2004-10-14checking in todays workpaul1-0/+1
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1408 7b491191-dbf0-0310-aff6-d879d4d69008
2004-10-12_ic_list cleanuppaul1-0/+1
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1398 7b491191-dbf0-0310-aff6-d879d4d69008
2004-09-15adding Leif's dynamic table prefix patchpaul1-4/+4
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1343 7b491191-dbf0-0310-aff6-d879d4d69008
2004-09-09adding glib-2.0 support. This is now a build requirementpaul1-0/+1
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1319 7b491191-dbf0-0310-aff6-d879d4d69008
2004-09-09 merging changes from dbmail_2_0_branch into the trunkpaul1-3/+14
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1318 7b491191-dbf0-0310-aff6-d879d4d69008
2004-06-03*** empty log message ***ilja1-20/+20
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1159 7b491191-dbf0-0310-aff6-d879d4d69008
2004-05-28Dan Weber's libtool patches committed. This means that we're no usingilja2-56/+89
libtool to create libraries. Yeah! git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1147 7b491191-dbf0-0310-aff6-d879d4d69008
2004-05-21db_disconnect() now checks if the result set is free before callingilja1-1/+2
db_free_result() git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1138 7b491191-dbf0-0310-aff6-d879d4d69008
2004-04-21(very) small fixesilja1-5/+5
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1094 7b491191-dbf0-0310-aff6-d879d4d69008
2004-04-14test-scripts/testimap.py update by Paul J Stevensilja1-2/+1
db_get_result() (dbpgsql.c, dbmysql.c) now returns an const char*. To make this work, quite some stuff had to be changed (also in mime_readheader()) git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1070 7b491191-dbf0-0310-aff6-d879d4d69008
2004-04-08removed all db_use_auth_result() and db_store_auth_result() calls fromilja1-12/+3
authsql.c after having removed some to fix a memory leak. removed a db_free_result() statement from db_copymsg that should not be used. This was only evident after adding a trace message in db_free_result() to fire when the result set is already NULL. git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1062 7b491191-dbf0-0310-aff6-d879d4d69008
2004-04-01some changes to mysql functions:ilja1-34/+19
the last_row cache is taken out. It gave us problems, and is not necessary anymore, because we now only use MySQL >= 4.0.14, which caches this for itself (this is stuff that should always be done in the library anyway!) after a query, mysql_store_result() is always called, to simplify this function. If we had a function without a result set, the resulting result set from mysql_store_result() will be NULL, which it would be anyway. git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1049 7b491191-dbf0-0310-aff6-d879d4d69008
2004-03-19updated last copyright notices.ilja2-2/+4
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1033 7b491191-dbf0-0310-aff6-d879d4d69008
2004-03-19updated copyright warnings and GPL notices to files missing themilja1-1/+1
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1032 7b491191-dbf0-0310-aff6-d879d4d69008
2004-03-19indent -i8 -kr has now been used on all dbmail source files (*.c and *.h).ilja1-112/+115
All files are now indented as K&R. git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1028 7b491191-dbf0-0310-aff6-d879d4d69008
2004-03-15fixed TO_DATE string handling. MySQL needs quotes around the date stringilja1-1/+1
(of course), but PostgreSQL should not have them around the TO_TIMESTAMP() function. Fixed by putting the quotes in TO_DATE in dbmysql.c git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@1012 7b491191-dbf0-0310-aff6-d879d4d69008
2004-03-03make sure all datetime output functions output the same format.ilja1-0/+7
Also makes new physmessage entries use the CURRENT_TIMESTAMP. git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@982 7b491191-dbf0-0310-aff6-d879d4d69008
2004-03-03Lots of small changes.ilja1-1/+1
The arguments to trace() are now checked. This has resulted in a lot of compiler warnings. These were all fixed by Aaron Stone. Delivery of messages is still faulty. Every message sent through lmtp is delivered twice. git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@981 7b491191-dbf0-0310-aff6-d879d4d69008
2004-03-01lots of changesilja2-2/+2
* insertion of messages is now followed by a status code, which is sent to the calling MTA * small bug fixes. * -fomit-frame-pointer added to CFLAGS. git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@975 7b491191-dbf0-0310-aff6-d879d4d69008
2004-02-10fixed link errors when linking with static librariesilja1-3/+3
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@952 7b491191-dbf0-0310-aff6-d879d4d69008
2004-01-30Added LMTP + Sieve patch by Aaron Stone.ilja1-0/+4
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@907 7b491191-dbf0-0310-aff6-d879d4d69008
2004-01-29Fixed some memory leaks.ilja1-3/+11
MySQL code now reconnects on a lost connection. Thanks to Leif Jackson <ljackson@jjcons.com> for finding these leaks and patching them. git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@903 7b491191-dbf0-0310-aff6-d879d4d69008
2004-01-20Added IMAP ACL commands (RFC 2086) to dbmaililja1-158/+174
acl commands are handled by imapcommand.s, which in turn uses acl.[ch] for handling acl commands. db.[ch] has been augmented with a few functions for handling the acl table. add_acl.mysql and add_acl.pgsql are scripts to add the acl table to the database. The create_tables scripts need to be updated still. the normal IMAP functions do not use the ACL functions yet. Only the ACL functions themselves are implemented. git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@892 7b491191-dbf0-0310-aff6-d879d4d69008
2004-01-07merged all 2.0 branch sources with the trunk. 2.0 is now HEAD and 1.2 isilja6-6026/+317
in a branch. This makes for an unstable TRUNK, and release (only bugfix) branches. Quite a lot of effort was needed for this merger. By mistake, I forgot to add a tag before the branch point for dbmail 2.0 in August, which caused the fact that a simple branch to trunk merge did not work.. So, I had to revert to the act of merging file-by-file. Very boring and error-prone work. Everything seems to be working, but there might be some errors left. git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@884 7b491191-dbf0-0310-aff6-d879d4d69008
2004-01-04Fixed wrong times in date entries in database. Now usesilja2-5/+5
strftime(timestr, sizeof(timestr), "%Y-%m-%d %H:%M:%S", &tm); instead of strftime(timestr, sizeof(timestr), "%G-%m-%d %H:%M:%S", &tm); which would give a wrong year number in the last days of the year when there were more days of the week in the next than in the current year. Thanks to Bred Baptist for finding this error. git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@875 7b491191-dbf0-0310-aff6-d879d4d69008
2003-10-24misc updates/fixes by Jesse Norellilja3-248/+241
This patch moves the create_unique_id() function to misc.c and makes every place that saves a unique_id use it (which was previously done inconsistently in various places). It also changes all the use of the status field in messages table to be through the following #defines: #define STATUS_NEW 0 #define STATUS_SEEN 1 #define STATUS_DELETE 2 #define STATUS_PURGE 3 #define STATUS_UNUSED 4 #define STATUS_INSERT 5 #define STATUS_ERROR 6 There are a couple other misc. changes also, namely changes the APOP "timestamp" in the pop3 greeting to not include the system time and pid (though srand() is still seeded with those, but better than giving them away in the clear), put getopt() support in pop3d (and added -h help flag), and changed a few places to remove messageblks before removing the message row, so people adding constraints don't get errors (ie. if they don't use ON DELETE CASCADE and remove the messages entry first). Should apply clean to cvs code around 6/17/03 (probably a little earlier) to current, 7/18/03. We've been using it w/o incident for almost a month now. git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@802 7b491191-dbf0-0310-aff6-d879d4d69008
2003-10-13mysql/dbmysql.c (db_send_message_lines): changed from using sprinf statementsilja1-13/+22
to fill the buffer, to using buffer[buffer_pos]. This could ledd to a considerable speed for large messages pgsql/dbpgsql.c (db_send_message_lines): changed from using sprinf statements to fill the buffer, to using buffer[buffer_pos]. This could ledd to a considerable speed for large messages git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@780 7b491191-dbf0-0310-aff6-d879d4d69008
2003-10-07 Modified Files:ilja1-5/+7
mysql/dbmysql.c pgsql/dbpgsql.c ---------------------------------------------------------------------- mysql/dbmysql.c and pgsql/dbpgsql.c (db_send_message_lines) addition of Jesse Norell's patch making db_send_message_lines a lot faster by using a much smaller buffer git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@767 7b491191-dbf0-0310-aff6-d879d4d69008
2003-07-25fixed login security issueroel1-1/+13
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@731 7b491191-dbf0-0310-aff6-d879d4d69008
2003-07-03 Modified Files:ilja1-8/+18
db.h mysql/dbmysql.c pgsql/dbpgsql.c fixed bug in PostgreSQL code. db_setselectable() (dbpgsql.c) took a "int val" as as second paramater. This value was unused and instead, a global "int value" was used, which had nothing to do with it. fixed by changing "int val" to "int select_value", and using it in the query. Same change made to dbmysql.c and db.h (only header) db_getmailbox() and db_removemailbox() now check the owner_idnr. added the unused attribute ( = __attribute__((__unused__)) ) to some function parameters, to prevent compiler warnings. This is defined as UNUSED. This only works in GNU C, so UNUSED is defined empty if another compiler is used. git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@728 7b491191-dbf0-0310-aff6-d879d4d69008
2003-04-01*** empty log message ***roel1-2/+2
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@717 7b491191-dbf0-0310-aff6-d879d4d69008