3b53492755
If Exim checks the default "localuser" router before our custom "cyrus" router, then the lpmqtt account's messages will get delivered to its system mbox rather than its Cyrus IMAP inbox. To fix this ordering problem, disable the default localuser router and define our own after cyrus. Change-Id: I08b024f1b4097bf651b4c3ed97a319f579869ce4 Depends-On: https://review.openstack.org/577893
119 lines
3.2 KiB
Puppet
119 lines
3.2 KiB
Puppet
# Copyright 2016 Hewlett-Packard Development Company, L.P.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
#
|
|
# firehose glue class.
|
|
#
|
|
class openstack_project::firehose (
|
|
$sysadmins = [],
|
|
$gerrit_username = 'germqtt',
|
|
$gerrit_public_key,
|
|
$gerrit_private_key,
|
|
$gerrit_ssh_host_key,
|
|
$imap_username,
|
|
$imap_hostname,
|
|
$imap_password,
|
|
$mqtt_hostname = 'firehose.openstack.org',
|
|
$mqtt_password,
|
|
$mqtt_username = 'infra',
|
|
$statsd_host,
|
|
$ca_file,
|
|
$cert_file,
|
|
$key_file,
|
|
) {
|
|
include mosquitto
|
|
class {'mosquitto::server':
|
|
infra_service_username => $mqtt_username,
|
|
infra_service_password => $mqtt_password,
|
|
enable_tls => true,
|
|
enable_tls_websocket => true,
|
|
ca_file => $ca_file,
|
|
cert_file => $cert_file,
|
|
key_file => $key_file,
|
|
websocket_tls_port => 443,
|
|
}
|
|
|
|
include germqtt
|
|
class {'germqtt::server':
|
|
gerrit_username => $gerrit_username,
|
|
gerrit_public_key => $gerrit_public_key,
|
|
gerrit_private_key => $gerrit_private_key,
|
|
gerrit_ssh_host_key => $gerrit_ssh_host_key,
|
|
mqtt_username => $mqtt_username,
|
|
mqtt_password => $mqtt_password,
|
|
}
|
|
|
|
package {'cyrus-imapd':
|
|
ensure => latest,
|
|
}
|
|
|
|
package {'sasl2-bin':
|
|
ensure => latest,
|
|
}
|
|
|
|
package {'cyrus-admin':
|
|
ensure => latest,
|
|
}
|
|
|
|
service {'cyrus-imapd':
|
|
ensure => running,
|
|
}
|
|
|
|
class {'::exim':
|
|
sysadmins => $sysadmins,
|
|
local_domains => "@:firehose.openstack.org",
|
|
default_localuser_router => false,
|
|
routers => [
|
|
{'cyrus' => {
|
|
'driver' => 'accept',
|
|
'domains' => '+local_domains',
|
|
'local_part_suffix' => '+*',
|
|
'local_part_suffix_optional' => true,
|
|
'transport' => 'cyrus',
|
|
}},
|
|
{'localuser' => {
|
|
'driver' => 'accept',
|
|
'check_local_user' => true,
|
|
'transport' => 'local_delivery',
|
|
'cannot_route_message' => 'Unknown user',
|
|
}}
|
|
],
|
|
transports => [
|
|
{'cyrus' => {
|
|
'driver' => 'lmtp',
|
|
'socket' => '/var/run/cyrus/socket/lmtp',
|
|
'user' => 'cyrus',
|
|
'batch_max' => '35',
|
|
}}
|
|
],
|
|
require => Package['cyrus-imapd'],
|
|
}
|
|
|
|
include lpmqtt
|
|
class {'lpmqtt::server':
|
|
mqtt_username => $mqtt_username,
|
|
mqtt_password => $mqtt_password,
|
|
imap_hostname => $imap_hostname,
|
|
imap_username => $imap_username,
|
|
imap_password => $imap_password,
|
|
imap_use_ssl => false,
|
|
imap_delete_old => true,
|
|
}
|
|
|
|
include mqtt_statsd
|
|
class {'mqtt_statsd::server':
|
|
mqtt_hostname => $mqtt_hostname,
|
|
statsd_hostname => $statsd_host,
|
|
}
|
|
}
|