Commit Graph

61 Commits

Author SHA1 Message Date
Clemens Zeidler
9967dfd924 - Extend MarkMailAsRead to take a flag not only a bool value. Write an additional MAIL:read attribute.
- Remove some hard coded paths.
- Catch failure of FindMessage correctly. Thanks Axel.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-21 07:24:29 +00:00
Clemens Zeidler
ba11c28b6b Fix crash in imap config view. Remove hard coded path.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-21 07:19:24 +00:00
Clemens Zeidler
ee1568cb41 Also add IMAP body fetch status message.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40576 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-20 08:15:24 +00:00
Clemens Zeidler
65598ac67b Fix POP3 fetch header status view.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-20 07:53:57 +00:00
Clemens Zeidler
55db88b7f4 Fix POP3 mail status #7216.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40482 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-13 23:15:14 +00:00
Clemens Zeidler
ad5bef4500 Use quotation marks around mailbox names. Maybe fix #7214.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40481 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-13 22:23:08 +00:00
Clemens Zeidler
7c03514cad Initalize array for reading the uid string attribute. More cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40437 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-10 23:42:27 +00:00
Clemens Zeidler
a24bc8d9a3 Remove debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40435 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-10 21:48:18 +00:00
Clemens Zeidler
3d2622c790 Fix partial download limit. Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40434 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-10 21:46:41 +00:00
Clemens Zeidler
079e5c8bc9 Use declarations form MailAddon.h.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40416 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-09 23:26:38 +00:00
Clemens Zeidler
a68750c1ac Fix spelling and potential deadlock.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40414 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-09 22:22:26 +00:00
Clemens Zeidler
b985151b34 At least in vmware it takes longer to read the local files then the remote list. Add a status message for that.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40413 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-09 22:17:54 +00:00
Clemens Zeidler
81d1d0e504 To sync the mailbox a thread is started which reads the local files while in the parent thread the id list from the server is fetched. To sync both threads a BLocker was used. BLocker does not block when locked from the same thread so use a semaphore now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40412 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-09 22:11:50 +00:00
Clemens Zeidler
294da6bff9 Belongs to the last commit, sorry.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40408 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-09 19:44:59 +00:00
Clemens Zeidler
37d898f0b6 Fix coding style. Thanks Jérôme!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40406 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-09 19:18:13 +00:00
Clemens Zeidler
dc2577cf2d Map one or more server mailboxes two a local directory. All subscribed mailboxes are fetched automatically and populated under the root account folder. On startup the local copy is synced with the server, means all local changes are rejected. (We should think about store offline changes and apply them when online)
Also the read flags are synced with the server. This makes it easy to have the same mailbox state on different machines.

Messages could be deleted by delete them form the folder (not when moving them to trash) This maybe needs some more thoughts but its a save solution. One problem with moving it to trash is that you also want to have the option to restore it again. If it is a header only messages and you delete it from the server you lose the body part. Complete messages could theoretically be append to the mailbox again when restoring the mail form trash. Append is commented out though...

An solution for the delete problem would be to move the message to a trash folder on the server. Moving mails on the server is not implemented yet, though.

You can subscribe or unsubscribe to a mailbox using the imap pref panel. The settings are written to the server and are not stored locally.

Add some helper classes which could also be used for POP and SMTP:
ServerConnection: abstract ssl or socket connection
ConnectionReader (still a bit IMAP specific but could be easily separated IMHO): read complete lines or a bunch of data more efficient. Old implementation did it byte by byte, this class read data in bunches and buffer the left over for the next request...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-09 01:54:18 +00:00
Clemens Zeidler
d26fee1afb Switch to the new MailProtocol and account API. Lot of other smaller adaption to the new mail server.
Remove button in the pref app removes the complete account because we don't have separate chains any more. The pref app stays a mess, needs some layout love! (I did it even look worse...)

The new account/mail settings classes know if they have been changed but the current pref panel does not use this feature very well. It always mark the settings as modified when the settings view is displayed or more precise when the settings view is detached from the pref window, this could be optimized. The according mail protocol is completely restarted when their settings changed.

Some system filters are now directly integrated in the mail protocols. Hopefully make things easier to understand.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40398 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-09 01:52:30 +00:00
Adrien Destugues
b9eef2a018 CID 704 : Off-by-one error.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38043 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-12 11:59:51 +00:00
François Revol
0c538753e2 Attempt to fix several flaws that prevented me from backing up my 650MB of mails from my BeOS partition:
- Select() didn't actually reselect even when asked to force things from AddMessage(), making the uploaded mail get an off-by-one unique id assigned and a second copy downloaded on subsequent fetching, though this would really need proofreading as I'm not really sure how it all works,
- the allocated buffer wasn't freed, making mail_daemon allocate 650MB, which obviously crashed when out of physical ram, now it only uses 15MB :p,
- try to find workable IMAP flags for sent and pending mails, or use custom ones when the server allows arbitrary flags,
- the LIST command wasn't checked for correct response, making subsequent commands like CREATE mailbox fail from the OK answer of previous ones when syncing on a new accound,
- try to read the creating time (actually modification time since creation time is reset when copying files around) and pass it to APPEND command so I won't get the whole 10000 mails all received as of today.
Now I can put all my old mails on an imap server (tested on dovecot) to read it from other OSes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36995 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-01 19:04:00 +00:00
Stephan Aßmus
fcc3e627e1 Patch by Humdiner:
Changed strings in add-ons to sentence case. This is case-add-ons.diff
from #5169.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35046 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-13 11:48:15 +00:00
Oliver Tappe
16d5c24e53 * merged 32bit-wchar_t branches of buildtools and haiku back into
the respective trunk

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31443 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-07 10:30:09 +00:00
Bruno G. Albuquerque
8562115dd7 - Fix fetching new emails with IMAP. This closes ticket #3512.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30479 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-29 00:58:30 +00:00
Ingo Weinhold
ff81d306d4 * Moved the optional package dependency definitions into the new
build/jam/OptionalPackageDependencies and include it earlier (before the
  Jamfiles).
* Introduced build/jam/OptionalBuildFeatures which is supposed to do the setup
  for optional build features that need it.
* Renamed USE_SSL to HAIKU_BUILD_FEATURE_SSL and made it more intelligent.
  The OpenSSL optional package is downloaded and unzipped automatically when
  enabled. Switching between enabled/disabled HAIKU_BUILD_FEATURE_SSL is
  handled gracefully -- the concerned components are built in separate
  subdirectories. Adding the OpenSSL optional package to the image also enables
  HAIKU_BUILD_FEATURE_SSL.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30021 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-08 10:07:17 +00:00
Bruno G. Albuquerque
a440ab6ef1 - Small update.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29294 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-23 18:05:36 +00:00
Rene Gollent
10bc1510be Update OpenSSL package to 0.9.8j and relocate it to /boot/common. Thanks to Matt Madia and Scott McCreary for the patches! This closes ticket #2640.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29100 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-31 16:04:12 +00:00
Stefano Ceccherini
76ef98dd3f don't leak the BMessageRunner. CID 8
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27570 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-15 14:51:21 +00:00
Stefano Ceccherini
437ecc65ae delete -> delete[]. CID 141
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27523 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-15 12:19:31 +00:00
Axel Dörfler
ad12e71861 * If USE_SSL is set when compiling the MDR add-ons, SSL will be used.
* By default, it will use a directory generated/cross-ssl where you need to
  unzip the optional openssl package into before. If you're on Haiku, you can
  use the SSL_DIR environment variable to point it to /boot/home/config
  instead.
* Fixed build with USE_SSL defined.
* Renamed USESSL to USE_SSL.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26971 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-14 12:28:44 +00:00
Ingo Weinhold
7e8ac2903b * Prefixed the variables NETWORK_LIBS, NETAPI_LIB, and
SELECT_UNAME_ETC_LIB with TARGET_ and introduced HAIKU_* and HOST_*
  counterparts.
* Use HOST_NETWORK_LIBS for building remote_disk_server.
* Also got rid of {R5,BONE,DANO,HAIKU}_COMPATIBLE.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21912 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-12 22:15:10 +00:00
Axel Dörfler
25c969f5a8 * Fixed filling the log in ReceiveLine() - ie. it's not done anymore there.
* Fixed error message in Open() when the server didn't return anything.
* Made the pop3.h header self contained.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21804 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 23:05:53 +00:00
Axel Dörfler
5d12f64c57 I have no idea why it would be a good idea to call ReceiveLine() 200000 times if it didn't
deliver a line back, but I've changed it such that it only does this for R5.
I've enlarged the timeout back to 60 seconds, as I guess that could have been the culprit.
Tested here, and it at least still works.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21772 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-31 16:41:06 +00:00
Axel Dörfler
b1c07d8165 * Fixed dumb uses of select() with a hardcoded number of file descriptors.
* Decreased the timeout from 60 to 30 seconds; somehow it seems it waits more
  than just once this time in case something fails over here.
* Cleaned up the messy SSL patch.
* Made the whole thing a bit more compliant to our coding style.
* Got rid of the useless pop3_error() macro.
* Fixed error reporting in ReceiveLine().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21765 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-31 16:00:26 +00:00
Hugo Santos
7015d5deaa couple fixes to make MDR addons build with gcc 4.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20965 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-02 10:57:27 +00:00
Ingo Weinhold
1acbe440b8 Removed the obsolete second argument ("relpath") of the Addon rule and
shuffled "isExecutable" to the end. The new order favors the common use
cases. Adjusted all Addon invocations and while at it also removed
separate LinkAgainst invocations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20604 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-07 01:27:19 +00:00
DarkWyrm
a50c8842ae Accidentally introduced a bug for non-SSL POP accounts, which this fixes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-18 23:24:47 +00:00
DarkWyrm
6c05781006 This *should* squish the SSL bug which would crash the mail daemon on connection timeouts
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-18 20:14:08 +00:00
DarkWyrm
ccf795b406 Another small label tweak
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19447 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-08 01:48:33 +00:00
DarkWyrm
595f30a33f Small label tweak
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19446 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-08 01:45:31 +00:00
Alexander G.M. Smith
9c91a5f9d6 Now compiles for both Haiku and R5 targets. Also bumped the version
number to 3.0.3, just in case we want to do a new release soon with
this slightly better working version.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14718 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-05 22:51:31 +00:00
Alexander G.M. Smith
7f9c73dbd5 Updated mail libmail.so compile and IMAP add-on to use the new build system
and work under both R5 and Haiku (didn't test Bone/Dano but they should work
too).  Still have SMTP, POP3 and a few other things to fix up, but ran out
of time again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-02 03:46:50 +00:00
Ingo Weinhold
0755123f83 Fixed most of the problems when building the MDR package for target R5.
Some add-ons don't build, since they include non-R5 networking headers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14598 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-31 14:51:46 +00:00
Ingo Weinhold
338b8dc301 Merged changes from branch build_system_redesign at revision 14573.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-29 16:27:43 +00:00
Nathan Whitehorn
bac0321de0 Eliminated some unnecessary code.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10467 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-15 20:45:13 +00:00
Nathan Whitehorn
90ccec14e5 Fixed net_server compilation
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10364 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-07 03:41:38 +00:00
shatty
a16c055cb0 address compiler warnings
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10095 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-21 08:27:35 +00:00
shatty
7c069d221a address compiler warnings
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10079 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-21 05:09:18 +00:00
shatty
6040be9931 use NETWORK_LIBS for linking, define BUILDING_R5_LIBNET if necessary
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10059 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-20 21:10:54 +00:00
shatty
3df3da2ccc use BONE_COMPATIBLE variable instead of TARGET_PLATFORM to control linking
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9914 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-11 10:13:34 +00:00
Nathan Whitehorn
fcdc48f1a7 Fixed a nasty bug I introduced when I fixed IMAP that made it impossible to send mail. Apparently I don't send that much.... it's been in there for a good week or so.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9663 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-30 17:19:06 +00:00
Nathan Whitehorn
f12d422d6a Fixed POP3 SSL build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9548 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-27 21:55:16 +00:00