History log of /haiku-fatelf/src/servers/mail/MailDaemon.cpp
Revision Date Author Comments
# aed35104 05-Aug-2012 Humdinger <humdingerb@gmail.com>

Close alerts with ESCAPE key.

Added SetFlags(B_CLOSE_ON_ESCAPE) or SetShortcut(index, B_ESCAPE) to BAlerts
depending if the result gets used later in the code, or if it's a one-button
BAlert.


# 546208a5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# 3692fd58 14-Dec-2011 Axel Dörfler <axeld@pinc-software.de>

Minor cleanup, no functional change.


# 4ec6c3a0 02-Nov-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Merge patch by plfiorini :

Some changes to the API for notifications.
* Don't go through be_roster to send a notification, but use Notification->Send() instead.
* Rename App to Group to make the purpose clearer

And some changes to the notification code itself:
* Use the Notification class as the way to convey informations about a notification. Allows easier extension of this class
* Code cleanup
* Use of the layout kit for the notify window

Unfortunately, the latter part clashes quite a bit with the changes I already did to the notification window, so it's now quite broken. Working on that next, but I wanted to separate that work from the patch ...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43114 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 244a5450 01-Nov-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Mail daemon notifications, round 2:
* Use the proper identifier for each notification window : 2 per account for sending/receiving, and a global one to show the "n message received" message.
* Use the mail daemon icon on the windows instead of the default ones
* Shuffle the text in the windows a bit so it makes more sense
* Use the settings from the mail preflet for showing or not the window.
The meaning of "always" changes a bit, since it is not possible to have a "forever" timeout with the notification server (and that would be rather annoying).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43077 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 701d9285 01-Nov-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Mail daemon now uses standard notification windows.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43053 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e9e53773 29-Oct-2011 François Revol <revol@free.fr>

Erase the removed account from the accounts map. This avoids a crash when an account was removed when we shutdown the daemon, due to double free().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42974 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e039afe8 29-Oct-2011 François Revol <revol@free.fr>

Define B_MAIL_DAEMON_SIGNATURE and use it instead of hardcoding the signature everywhere.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42966 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cd32d81c 28-Oct-2011 Rene Gollent <anevilyak@gmail.com>

Build fix.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42948 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d396412d 29-Oct-2011 Axel Dörfler <axeld@pinc-software.de>

* Ordered methods in the order of their declaration.
* Minor coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42945 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 83c3aba2 29-Jun-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

More localization support by taos, thanks!



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42344 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8a26696c 23-Jun-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Patch by mt who also puts the Japanese mail translation into HTA. Thanks! Closes #7689.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42293 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c26c18e4 20-Jun-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Apply a nice patch from Taos, thanks!
Localize the mail server and preferences. Get rid of MDRLanguage.h.
The Japanese translation is attached to #7689. Please give a notice when it is in the translation system and the ticket can be closed.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42268 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 08606d49 22-Mar-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Add settings to enable and disable in and outgoing mail accounts.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41077 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a1f765fb 21-Mar-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Create an index for MAIL:account_id. If you using POP3 update to this revision! POP3 queries for this attribute and if no mails are found with this id it will delete the missing mails on the server (if the option is ticked).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41071 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a64bd564 21-Mar-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Write MAIL:name, MAIL:thread and MAIL:account attribute. The account id is now stored in MAIL:account_id. This requires to re-download all mails to write the correct attribute (sorry).
Fixes #7375.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41062 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 37f85698 11-Mar-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

- Fix race condition when start watching a mailbox and directly afterwards stop watching it. A BLooper was not suitable to synchronise start and stop watching. Wait till the IDLE command is send before returning the SyncAndStartWatchingMailbox method now. That ensures that a later StopWatchingMailbox call find the maibox in an expected watching state.

There is one thread (BLooper) to handle new commands and one watcher thread which is just listening at the server port for updates. The race condition occurred for example when a sync/watching and a fetch body message are send to the looper. The sync message just triggered the IDLE command in the watcher thread. In the meantime the fetch body command send a DONE command, because the IDLE command has not be send at this time the watcher keeps watching.

- fix int32 -> ssize_t thanks Axel and Stippi
- clean up



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40919 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b0acdd15 03-Mar-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Remove some code that pretty much looks like some legacy code to add additional attributes to a running system.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40797 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b8d2bbd6 03-Mar-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

- Partial downloaded messages are now opened by Mail and not by the mail daemon. Mail request the body fetch and get notified when the daemon is done. During this time the Mail window title is showing "Downloading: subject". This fixes #7256.
- Some cleanup in Mail.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40789 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7398688a 21-Feb-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

IMAP commands are serialized using the BLooper message queue. MarkMessageAsRead used the direct way to access the protocol and so interfered with ongoing requests.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40606 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9967dfd9 21-Feb-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

- 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


# 0e657c0b 20-Feb-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Remember tracker message when downloading a partial message and open it with Mail. This is needed to get the next/previous message after downloading the body.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40575 a95241bf-73f2-0310-859d-f6bbb57e9c96


# df0ad9c1 14-Feb-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Fix account name in mail.
Work in progress: fetch next partial downloaded message.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40504 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1af4fa4b 08-Feb-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Major restructuring of the mail server:

Accounts are now stored in a separate file. Previously they where somehow magically assembled from the chain ids. Now its possible to remove a account temporary by removing the account file form the account folder.

Each account could have an inbound protocol, an outbound protocol and some filters.

Mails are now associated with an account and not with a chain. This required to replace the chain id attribute by an account attribute.

Replace BMailFilter and BMailChain by a less general approach. Basically the chain had a list of filters and call the ProcessMailMessage for each filter. This made it sometime difficult to understand what is going on, e.g. sometimes a filter used information gathered by another filters. The new MailProtocol and MailFilter classes are calling more dedicated hook functions, e.g. HeaderFetched or MessageReadyToSend.

As before all MailProtocol's (plus their filters) are running in their own thread.

Cleaned up the error and status window a bit. Abstracted the interface to these windows. Should be easy to write a BNotification api back-end now.

Parsing of mail headers is much faster now. Fetching the headers of a large mailbox takes ~min and not ~hour now! Initial checkout time is in the same order like Opera. The problem was the massive use of fgets in parse_header (mail_util.cpp) now the complete header is read in one go. Furthermore, only interesting fields are extracted.

Remove some unused files, BeOS relicts... Feel free to translate the mail server and remove the own language system (headers/private/mail/MDRLanguage.h).

Sorry for the remaining old (and new) coding style issues, sometime just ignore them, to many :(



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40397 a95241bf-73f2-0310-859d-f6bbb57e9c96


# aed35104852941f0f6f3d1dcc5338b5f337d0a3c 05-Aug-2012 Humdinger <humdingerb@gmail.com>

Close alerts with ESCAPE key.

Added SetFlags(B_CLOSE_ON_ESCAPE) or SetShortcut(index, B_ESCAPE) to BAlerts
depending if the result gets used later in the code, or if it's a one-button
BAlert.


# 546208a53940a26c6379c48a7854ade1a8250fc5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# 3692fd58c55d6abc7da78f2667c8cd0730dfe0ad 14-Dec-2011 Axel Dörfler <axeld@pinc-software.de>

Minor cleanup, no functional change.


# 4ec6c3a042bbc8e2e94b2ccd19c1e9289232d1e4 02-Nov-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Merge patch by plfiorini :

Some changes to the API for notifications.
* Don't go through be_roster to send a notification, but use Notification->Send() instead.
* Rename App to Group to make the purpose clearer

And some changes to the notification code itself:
* Use the Notification class as the way to convey informations about a notification. Allows easier extension of this class
* Code cleanup
* Use of the layout kit for the notify window

Unfortunately, the latter part clashes quite a bit with the changes I already did to the notification window, so it's now quite broken. Working on that next, but I wanted to separate that work from the patch ...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43114 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 244a545018686eccc1cc9ccf9bb8880a5426accf 01-Nov-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Mail daemon notifications, round 2:
* Use the proper identifier for each notification window : 2 per account for sending/receiving, and a global one to show the "n message received" message.
* Use the mail daemon icon on the windows instead of the default ones
* Shuffle the text in the windows a bit so it makes more sense
* Use the settings from the mail preflet for showing or not the window.
The meaning of "always" changes a bit, since it is not possible to have a "forever" timeout with the notification server (and that would be rather annoying).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43077 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 701d92850ee31c77a78041d3563662c45e688574 01-Nov-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Mail daemon now uses standard notification windows.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43053 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e9e53773c9cbe9d42abedffba86e307fb046f089 29-Oct-2011 François Revol <revol@free.fr>

Erase the removed account from the accounts map. This avoids a crash when an account was removed when we shutdown the daemon, due to double free().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42974 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e039afe87e28d786408d3d9b4c802221481691b5 29-Oct-2011 François Revol <revol@free.fr>

Define B_MAIL_DAEMON_SIGNATURE and use it instead of hardcoding the signature everywhere.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42966 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cd32d81c40743d1f46961821aef15b01dd4924ae 28-Oct-2011 Rene Gollent <anevilyak@gmail.com>

Build fix.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42948 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d396412d0bb696240986110a4dc8f1cdda562ced 29-Oct-2011 Axel Dörfler <axeld@pinc-software.de>

* Ordered methods in the order of their declaration.
* Minor coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42945 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 83c3aba207cb04bd8443c48481b5c8d3f27bde27 29-Jun-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

More localization support by taos, thanks!



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42344 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8a26696cbfd5c7ec650c580ceb7fbff02d3dfbb9 23-Jun-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Patch by mt who also puts the Japanese mail translation into HTA. Thanks! Closes #7689.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42293 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c26c18e489f59b88362c984ca2b3355e8e0d34e4 20-Jun-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Apply a nice patch from Taos, thanks!
Localize the mail server and preferences. Get rid of MDRLanguage.h.
The Japanese translation is attached to #7689. Please give a notice when it is in the translation system and the ticket can be closed.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42268 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 08606d49da9f64269e34f0ea28091a5737d4e2cc 22-Mar-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Add settings to enable and disable in and outgoing mail accounts.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41077 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a1f765fb1a57dbf49afda18e1d997a0443ccb78d 21-Mar-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Create an index for MAIL:account_id. If you using POP3 update to this revision! POP3 queries for this attribute and if no mails are found with this id it will delete the missing mails on the server (if the option is ticked).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41071 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a64bd5649d3aa752ef4672e72a2415861546997d 21-Mar-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Write MAIL:name, MAIL:thread and MAIL:account attribute. The account id is now stored in MAIL:account_id. This requires to re-download all mails to write the correct attribute (sorry).
Fixes #7375.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41062 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 37f85698cf1a799e6f8857928b61ef7fb2de3eba 11-Mar-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

- Fix race condition when start watching a mailbox and directly afterwards stop watching it. A BLooper was not suitable to synchronise start and stop watching. Wait till the IDLE command is send before returning the SyncAndStartWatchingMailbox method now. That ensures that a later StopWatchingMailbox call find the maibox in an expected watching state.

There is one thread (BLooper) to handle new commands and one watcher thread which is just listening at the server port for updates. The race condition occurred for example when a sync/watching and a fetch body message are send to the looper. The sync message just triggered the IDLE command in the watcher thread. In the meantime the fetch body command send a DONE command, because the IDLE command has not be send at this time the watcher keeps watching.

- fix int32 -> ssize_t thanks Axel and Stippi
- clean up



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40919 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b0acdd1578a5ed63b53c9427ec7a6083fc62d650 03-Mar-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Remove some code that pretty much looks like some legacy code to add additional attributes to a running system.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40797 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b8d2bbd6167a4b751f67b2a171d770695f5055ca 03-Mar-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

- Partial downloaded messages are now opened by Mail and not by the mail daemon. Mail request the body fetch and get notified when the daemon is done. During this time the Mail window title is showing "Downloading: subject". This fixes #7256.
- Some cleanup in Mail.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40789 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7398688a5ef687f4d8a5c1ec92dca9731fd53667 21-Feb-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

IMAP commands are serialized using the BLooper message queue. MarkMessageAsRead used the direct way to access the protocol and so interfered with ongoing requests.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40606 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9967dfd9243396f9bed5f7b357451cda8cd48f26 21-Feb-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

- 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


# 0e657c0b6c38084d9aa684515ec505a212b96bc9 20-Feb-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Remember tracker message when downloading a partial message and open it with Mail. This is needed to get the next/previous message after downloading the body.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40575 a95241bf-73f2-0310-859d-f6bbb57e9c96


# df0ad9c12a92a83718b4442e87034a8a2951efff 14-Feb-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Fix account name in mail.
Work in progress: fetch next partial downloaded message.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40504 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1af4fa4ba62ba7e49fc47d60a3a89083b6f51c6f 08-Feb-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Major restructuring of the mail server:

Accounts are now stored in a separate file. Previously they where somehow magically assembled from the chain ids. Now its possible to remove a account temporary by removing the account file form the account folder.

Each account could have an inbound protocol, an outbound protocol and some filters.

Mails are now associated with an account and not with a chain. This required to replace the chain id attribute by an account attribute.

Replace BMailFilter and BMailChain by a less general approach. Basically the chain had a list of filters and call the ProcessMailMessage for each filter. This made it sometime difficult to understand what is going on, e.g. sometimes a filter used information gathered by another filters. The new MailProtocol and MailFilter classes are calling more dedicated hook functions, e.g. HeaderFetched or MessageReadyToSend.

As before all MailProtocol's (plus their filters) are running in their own thread.

Cleaned up the error and status window a bit. Abstracted the interface to these windows. Should be easy to write a BNotification api back-end now.

Parsing of mail headers is much faster now. Fetching the headers of a large mailbox takes ~min and not ~hour now! Initial checkout time is in the same order like Opera. The problem was the massive use of fgets in parse_header (mail_util.cpp) now the complete header is read in one go. Furthermore, only interesting fields are extracted.

Remove some unused files, BeOS relicts... Feel free to translate the mail server and remove the own language system (headers/private/mail/MDRLanguage.h).

Sorry for the remaining old (and new) coding style issues, sometime just ignore them, to many :(



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40397 a95241bf-73f2-0310-859d-f6bbb57e9c96