Commit Graph

16 Commits

Author SHA1 Message Date
Lefteris Chatzimparmpas
3690506986 Ignore errors and retry later when in daemon mode
A persistent failure that could lead to a session not being able to be
recovered, or a failure during the login process (which is not covered
by the recovery function), would normally cause the process to
terminate.  This is expected when the configuration is run once, but not
desirable when running in daemon mode.

And thus just after the process has become a daemon, a session that
could not be restored, either because the connection to the server could
not be established or the login and its related negotiations failed, is
now disabled temporarily, and a recoqnection is attempted at the
beginning of the next daemon loop iteration.

There is one exception to that, and that is when there is an
authentication error, for example when a wrong username or password has
been supplied, and in this case the process terminates and a relevant
error is printed.
2012-02-29 21:01:11 +01:00
Lefteris Chatzimparmpas
239435ba9e Use the same quotation for all the strings. 2012-02-22 18:57:54 +01:00
Lefteris Chatzimparmpas
befefb55a1 Name better the public shortcut function. 2012-02-22 18:56:45 +01:00
Lefteris Chatzimparmpas
dda48edbab Replace simple function with a static string. 2012-02-22 18:55:38 +01:00
Lefteris Chatzimparmpas
3f1059b355 Use newly added helper functions for common checks
Some of the functionality that was repeated in many places, regarding checks
and printing of informational messages, was replaced with common functions.
2012-02-22 08:18:38 +01:00
Lefteris Chatzimparmpas
95ce717bcf Add shortcuts to some possibly useful functions. 2012-02-21 20:13:55 +01:00
Lefteris Chatzimparmpas
18940cc9f2 Make all the calls that pass the session safe
The session and selected variables should be reset if there has been a
connection problem or other failure.

The ifcore module methods that rely on the session should only be called
if there is a valid session variable defined.
2012-02-21 01:04:24 +01:00
Lefteris Chatzimparmpas
f78ed3c3d7 Add forgotten mailbox close command. 2012-02-21 00:12:23 +01:00
Lefteris Chatzimparmpas
81b09d1f01 Print some details on append and fetch actions. 2012-02-19 23:56:54 +01:00
Lefteris Chatzimparmpas
2cafede975 Use session pointer to denote accounts
Instead of the account details, a pointer to the C structure is used in
Lua, stored as light userdata.

The 1.x deprecated configuration format has been removed, partly due to
the above change, and partly because it has been included for long
enough now.
2012-02-14 22:13:15 +01:00
Lefteris Chatzimparmpas
2c70382775 Remove control structures' optional parentheses. 2012-02-11 22:55:03 +01:00
Lefteris Chatzimparmpas
18b012c2a2 Improve robustness and recoverability
Many extensive changes were made to better handle network errors, while
on some cases it is now possible to recover from previously fatal
failures.
2012-02-11 22:47:08 +01:00
Lefteris Chatzimparmpas
2599efc94e Match only on the header field body
The match_field() method should match on the header field body and not
the whole header field, thus the field name part is ignored.
2011-08-16 22:51:01 +02:00
Lefteris Chatzimparmpas
a3021cca36 Add support for appending messages to mailboxes
Add a new function append_message(), update man page and add new example
in the sample configurations.
2011-08-06 14:16:07 +02:00
Lefteris Chatzimparmpas
d7f2910212 Correct current selected mailbox functionality
Correct the functionality that provides monitoring of the current
selected mailbox in each account, where the wrong variable was written.

Simplify and clarify the code around this functionality.
2011-04-04 23:48:23 +02:00
Lefteris Chatzimparmpas
4fe1a3d649 Change file and directory structure
Move the source code to the src dir, the man pages to the doc dir, and
the example configuration files to the samples dir, and update all
relevant files to reflect the changes.
2011-03-06 13:34:44 +01:00