Mercurial > dovecot > original-hg > dovecot-1.2
annotate src/deliver/deliver.h @ 9490:fd84592e817b HEAD
dovecot-example.conf: Updated dict comments.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 23 Nov 2009 13:08:47 -0500 |
parents | b39175349d08 |
children |
rev | line source |
---|---|
6410
e4eb71ae8e96
Changed .h ifdef/defines to use <NAME>_H format.
Timo Sirainen <tss@iki.fi>
parents:
5661
diff
changeset
|
1 #ifndef DELIVER_H |
e4eb71ae8e96
Changed .h ifdef/defines to use <NAME>_H format.
Timo Sirainen <tss@iki.fi>
parents:
5661
diff
changeset
|
2 #define DELIVER_H |
4347
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
3 |
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
4 #include <sysexits.h> |
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
5 |
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
6 #include "lib.h" |
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
7 #include "mail-storage.h" |
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
8 |
8622
2fa464fd3aab
Added rejection_subject setting to deliver, which is used for rejected mails.
Timo Sirainen <tss@iki.fi>
parents:
8587
diff
changeset
|
9 #define DEFAULT_MAIL_REJECTION_SUBJECT \ |
8630
ee7c5ec212bb
deliver: Changed the default rejection_subject.
Timo Sirainen <tss@iki.fi>
parents:
8622
diff
changeset
|
10 "Rejected: %s" |
5661
f18a7fd8ac9a
Added rejection_reason setting for deliver.
Timo Sirainen <tss@iki.fi>
parents:
5500
diff
changeset
|
11 #define DEFAULT_MAIL_REJECTION_HUMAN_REASON \ |
f18a7fd8ac9a
Added rejection_reason setting for deliver.
Timo Sirainen <tss@iki.fi>
parents:
5500
diff
changeset
|
12 "Your message to <%t> was automatically rejected:%n%r" |
6948
6b5f89c41de5
Added deliver_log_format setting to control what's logged when a mail is
Timo Sirainen <tss@iki.fi>
parents:
6515
diff
changeset
|
13 #define DEFAULT_LOG_FORMAT "msgid=%m: %$" |
5661
f18a7fd8ac9a
Added rejection_reason setting for deliver.
Timo Sirainen <tss@iki.fi>
parents:
5500
diff
changeset
|
14 |
4347
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
15 struct deliver_settings { |
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
16 const char *hostname; |
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
17 const char *postmaster_address; |
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
18 const char *sendmail_path; |
8622
2fa464fd3aab
Added rejection_subject setting to deliver, which is used for rejected mails.
Timo Sirainen <tss@iki.fi>
parents:
8587
diff
changeset
|
19 const char *rejection_subject; |
5661
f18a7fd8ac9a
Added rejection_reason setting for deliver.
Timo Sirainen <tss@iki.fi>
parents:
5500
diff
changeset
|
20 const char *rejection_reason; |
6948
6b5f89c41de5
Added deliver_log_format setting to control what's logged when a mail is
Timo Sirainen <tss@iki.fi>
parents:
6515
diff
changeset
|
21 const char *log_format; |
8220
8e5c93f37e48
deliver: Moved mailbox autocreate/autosubscribe settings to struct deliver_settings.
Timo Sirainen <tss@iki.fi>
parents:
7825
diff
changeset
|
22 bool mailbox_autosubscribe; |
8e5c93f37e48
deliver: Moved mailbox autocreate/autosubscribe settings to struct deliver_settings.
Timo Sirainen <tss@iki.fi>
parents:
7825
diff
changeset
|
23 bool mailbox_autocreate; |
4347
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
24 }; |
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
25 |
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
26 extern struct deliver_settings *deliver_set; |
8221
f6ef01a25db9
deliver: tried_default_save variable is now global.
Timo Sirainen <tss@iki.fi>
parents:
8220
diff
changeset
|
27 extern bool tried_default_save; |
4347
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
28 |
5500
4862cb37106c
Moved namespace handling to lib-storage. Beginnings of namespace support for
Timo Sirainen <tss@iki.fi>
parents:
5220
diff
changeset
|
29 typedef int deliver_mail_func_t(struct mail_namespace *namespaces, |
4862cb37106c
Moved namespace handling to lib-storage. Beginnings of namespace support for
Timo Sirainen <tss@iki.fi>
parents:
5220
diff
changeset
|
30 struct mail_storage **storage_r, |
4862cb37106c
Moved namespace handling to lib-storage. Beginnings of namespace support for
Timo Sirainen <tss@iki.fi>
parents:
5220
diff
changeset
|
31 struct mail *mail, |
6515
95eb92b49d9c
Added -a parameter to specify authentication username. It can be used to
Timo Sirainen <tss@iki.fi>
parents:
6410
diff
changeset
|
32 const char *destaddr, const char *mailbox); |
4347
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
33 |
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
34 extern deliver_mail_func_t *deliver_mail; |
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
35 |
8587
db0d0d7385fd
deliver: Don't preserve HOME environment when using -d parameter.
Timo Sirainen <tss@iki.fi>
parents:
8221
diff
changeset
|
36 void deliver_env_clean(bool preserve_home); |
5220
7fbdcce95982
Keep only TZ and HOME environments when calling sendmail.
Timo Sirainen <tss@iki.fi>
parents:
4347
diff
changeset
|
37 |
4347
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
38 /* Save a mail into given mailbox with given flags and keywords. */ |
5500
4862cb37106c
Moved namespace handling to lib-storage. Beginnings of namespace support for
Timo Sirainen <tss@iki.fi>
parents:
5220
diff
changeset
|
39 int deliver_save(struct mail_namespace *namespaces, |
4862cb37106c
Moved namespace handling to lib-storage. Beginnings of namespace support for
Timo Sirainen <tss@iki.fi>
parents:
5220
diff
changeset
|
40 struct mail_storage **storage_r, const char *mailbox, |
4347
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
41 struct mail *mail, enum mail_flags flags, |
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
42 const char *const *keywords); |
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
43 |
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
44 /* Extracts user@domain from Return-Path header. Returns NULL if not found. */ |
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
45 const char *deliver_get_return_address(struct mail *mail); |
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
46 |
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
47 /* Returns a new unique Message-ID */ |
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
48 const char *deliver_get_new_message_id(void); |
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
49 |
a73d2867f6e1
Moved all the non-Sieve code from dovecot-lda in here and rewrote parts of
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
50 #endif |