Commit d0f66bb2 d0f66bb25c3e4b58d91f3c8dcfb73abe7764302b by Sergey Poznyakoff

Added maildir support

1 parent 28d63fd9
...@@ -62,6 +62,7 @@ struct format_record { ...@@ -62,6 +62,7 @@ struct format_record {
62 static struct format_record format_table[] = { 62 static struct format_record format_table[] = {
63 { "mbox", &mbox_record }, 63 { "mbox", &mbox_record },
64 { "mh", &mh_record }, 64 { "mh", &mh_record },
65 { "maildir", &maildir_record },
65 { "pop", &pop_record }, 66 { "pop", &pop_record },
66 { "imap", &imap_record }, 67 { "imap", &imap_record },
67 { "sendmail", &sendmail_record }, 68 { "sendmail", &sendmail_record },
......
...@@ -36,52 +36,58 @@ extern "C" { ...@@ -36,52 +36,58 @@ extern "C" {
36 */ 36 */
37 #define MU_POP_PORT 110 37 #define MU_POP_PORT 110
38 #define MU_POP_SCHEME "pop://" 38 #define MU_POP_SCHEME "pop://"
39 #define MU_POP_SCHEME_LEN 6 39 #define MU_POP_SCHEME_LEN (sizeof (MU_POP_SCHEME) - 1)
40 extern int _url_pop_init __P ((url_t)); 40 extern int _url_pop_init __P ((url_t));
41 extern int _mailbox_pop_init __P ((mailbox_t)); 41 extern int _mailbox_pop_init __P ((mailbox_t));
42 extern int _folder_pop_init __P ((folder_t)); 42 extern int _folder_pop_init __P ((folder_t));
43 43
44 #define MU_IMAP_PORT 143 44 #define MU_IMAP_PORT 143
45 #define MU_IMAP_SCHEME "imap://" 45 #define MU_IMAP_SCHEME "imap://"
46 #define MU_IMAP_SCHEME_LEN 7 46 #define MU_IMAP_SCHEME_LEN (sizeof (MU_IMAP_SCHEME) - 1)
47 extern int _url_imap_init __P ((url_t)); 47 extern int _url_imap_init __P ((url_t));
48 extern int _mailbox_imap_init __P ((mailbox_t)); 48 extern int _mailbox_imap_init __P ((mailbox_t));
49 extern int _folder_imap_init __P ((folder_t)); 49 extern int _folder_imap_init __P ((folder_t));
50 50
51 #define MU_MBOX_SCHEME "mbox:" 51 #define MU_MBOX_SCHEME "mbox:"
52 #define MU_MBOX_SCHEME_LEN 5 52 #define MU_MBOX_SCHEME_LEN (sizeof (MU_MBOX_SCHEME) - 1)
53 extern int _url_mbox_init __P ((url_t)); 53 extern int _url_mbox_init __P ((url_t));
54 extern int _mailbox_mbox_init __P ((mailbox_t)); 54 extern int _mailbox_mbox_init __P ((mailbox_t));
55 extern int _folder_mbox_init __P ((folder_t)); 55 extern int _folder_mbox_init __P ((folder_t));
56 56
57 #define MU_FILE_SCHEME "file:" 57 #define MU_FILE_SCHEME "file:"
58 #define MU_FILE_SCHEME_LEN 5 58 #define MU_FILE_SCHEME_LEN (sizeof (MU_FILE_SCHEME) - 1)
59 extern int _url_file_init __P ((url_t)); 59 extern int _url_file_init __P ((url_t));
60 extern int _mailbox_file_init __P ((mailbox_t)); 60 extern int _mailbox_file_init __P ((mailbox_t));
61 extern int _folder_file_init __P ((folder_t)); 61 extern int _folder_file_init __P ((folder_t));
62 62
63 #define MU_PATH_SCHEME "/" 63 #define MU_PATH_SCHEME "/"
64 #define MU_PATH_SCHEME_LEN 1 64 #define MU_PATH_SCHEME_LEN (sizeof (MU_PATH_SCHEME) - 1)
65 extern int _url_path_init __P ((url_t)); 65 extern int _url_path_init __P ((url_t));
66 extern int _mailbox_path_init __P ((mailbox_t)); 66 extern int _mailbox_path_init __P ((mailbox_t));
67 extern int _folder_path_init __P ((folder_t)); 67 extern int _folder_path_init __P ((folder_t));
68 68
69 #define MU_SMTP_SCHEME "smtp://" 69 #define MU_SMTP_SCHEME "smtp://"
70 #define MU_SMTP_SCHEME_LEN 7 70 #define MU_SMTP_SCHEME_LEN (sizeof (MU_SMTP_SCHEME) - 1)
71 #define MU_SMTP_PORT 25 71 #define MU_SMTP_PORT 25
72 extern int _url_smtp_init __P ((url_t)); 72 extern int _url_smtp_init __P ((url_t));
73 extern int _mailer_smtp_init __P ((mailer_t)); 73 extern int _mailer_smtp_init __P ((mailer_t));
74 74
75 #define MU_SENDMAIL_SCHEME "sendmail:" 75 #define MU_SENDMAIL_SCHEME "sendmail:"
76 #define MU_SENDMAIL_SCHEME_LEN 9 76 #define MU_SENDMAIL_SCHEME_LEN (sizeof (MU_SENDMAIL_SCHEME) - 1)
77 extern int _url_sendmail_init __P ((url_t)); 77 extern int _url_sendmail_init __P ((url_t));
78 extern int _mailer_sendmail_init __P ((mailer_t)); 78 extern int _mailer_sendmail_init __P ((mailer_t));
79 79
80 #define MU_MH_SCHEME "mh:" 80 #define MU_MH_SCHEME "mh:"
81 #define MU_MH_SCHEME_LEN 3 81 #define MU_MH_SCHEME_LEN (sizeof (MU_MH_SCHEME) - 1)
82 extern int _url_mh_init __P ((url_t)); 82 extern int _url_mh_init __P ((url_t));
83 extern int _mailbox_mh_init __P((mailbox_t mailbox)); 83 extern int _mailbox_mh_init __P((mailbox_t mailbox));
84 extern int _folder_mh_init __P ((folder_t)); 84 extern int _folder_mh_init __P ((folder_t));
85
86 #define MU_MAILDIR_SCHEME "maildir:"
87 #define MU_MAILDIR_SCHEME_LEN (sizeof (MU_MAILDIR_SCHEME) - 1)
88 extern int _url_maildir_init __P ((url_t));
89 extern int _mailbox_maildir_init __P((mailbox_t mailbox));
90 extern int _folder_maildir_init __P ((folder_t));
85 91
86 #ifdef __cplusplus 92 #ifdef __cplusplus
87 } 93 }
......
...@@ -318,6 +318,9 @@ static char *mu_conf_option[] = { ...@@ -318,6 +318,9 @@ static char *mu_conf_option[] = {
318 #ifdef ENABLE_MH 318 #ifdef ENABLE_MH
319 "ENABLE_MH", 319 "ENABLE_MH",
320 #endif 320 #endif
321 #ifdef ENABLE_MAILDIR
322 "ENABLE_MAILDIR",
323 #endif
321 #ifdef ENABLE_SMTP 324 #ifdef ENABLE_SMTP
322 "ENABLE_SMTP", 325 "ENABLE_SMTP",
323 #endif 326 #endif
......