-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathconfig.xml.sample
110 lines (110 loc) · 3.7 KB
/
config.xml.sample
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?xml version="1.0" encoding="ISO-8859-1"?>
<smtp_config>
<!-- The port the server will listen on. 1024 and below will require root. -->
<port>2601</port>
<!-- The generic message that is used when an email is rejected -->
<email_rejection_message>An unexpected error has occurred and your email has not been received. Please try again later.</email_rejection_message>
<!-- The max size the message body can be in megabytes -->
<message_size_limit_mb>15</message_size_limit_mb>
<!-- AV can be disabled by setting the mode to 'none' -->
<anti_virus>
<mode>clamd</mode>
<server>clamd_server</server>
<port>3310</port>
<timeout_ms>300000</timeout_ms>
</anti_virus>
<!--
Enable or disable http based health check endpoints (default disabled). These can be used to monitor the health of this application instance.
If enabled, the following endpoints are available:
/smtp-status - Checks that the SMTP server is running.
/db-status - Checks that a valid connection can be made to each database in the database_list.
/av-status - Checks that a valid connection can be made to the virus scanner.
Note that a security token must be included as a query parameter to requests to the db-status endpoint.
These endpoints should only be exposed locally to monitoring tools such as Monitis, Zabbix, Nagios etc. or within Docker
containers as healthchecks.
-->
<health_checks>
<enable_http_health_checks>false</enable_http_health_checks>
<port>8080</port>
<security_token>changeMe</security_token>
</health_checks>
<!-- The list of databases. Databases have a many to 1 relationship with recipients. -->
<database_list>
<database>
<name>database_name</name>
<!-- This is the same URL that clobber uses -->
<jdbc_url>jdbc:oracle:thin:@database_host:1521:service_name</jdbc_url>
<username>user</username>
<password>password</password>
<!--
This is the query the database will use to store the email in the database. The bind params are "mail_id"
, "repository", "from_address", "recipient", "remote_hostname", "remote_address", "message_body", "subject"
, "sent_date" and "header_xml_clob"
-->
<store_query>
INSERT INTO inbox(
message_name
, repository_name
, message_state
, sender
, recipients
, remote_host
, remote_addr
, message_body
, last_updated
, message_subject
) VALUES (
:mail_id
, :repository
, 'root'
, :from_address
, :recipient
, :remote_hostname
, :remote_address
, :message_body
, sysdate
, :subject
)
</store_query>
<!-- This query is used to store the attachments that have been stripped from the email individually. -->
<attachment_store_query>
INSERT INTO jamesmgr.attachments(
message_name
, content_type
, content_disposition
, file_name
, data
, text_data
, datetime
) VALUES (
:mail_id
, :content_type
, :content_disposition
, :file_name
, :content_data
, :text_content
, sysdate
)
</attachment_store_query>
</database>
</database_list>
<!-- The recipient list has a many to 1 relationship with the databases above. -->
<recipient_list>
<recipient>
<!--
this is the domain part of an email address user@domain and any email sent to this domain will be stored as
defined by the store query of that database
-->
<domain>localhost</domain>
<database>database_name</database>
</recipient>
<recipient>
<!--
here the domain will be matched using a regular expression. Recipient domains will be matched against recipients
in the order they are defined here. The first match will be used.
-->
<domain_regex>.*\..*\.co.uk</domain_regex>
<database>database_name</database>
</recipient>
</recipient_list>
</smtp_config>