Commit graph

140 commits

Author SHA1 Message Date
Michal Konecny
61330941e4 [base/postfix] Set the missing required configuration value
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-06-27 14:55:31 +02:00
Michal Konecny
40c0408acd [base/postfix] Redirect back to mx1.redhat.com relay
The firewall rules are now updated.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-06-20 13:20:42 +02:00
Michal Konecny
c775045ede [base/postfix] Change the relay to something that is still in RDU 2
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-06-18 17:06:39 +02:00
Michal Konecny
2ff451ae80 [base/postfix] Use smtp.corp.redhat.com instead mxX.redhat.com servers
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-06-18 16:53:12 +02:00
Michal Konecny
649ede2f89 [base/postfix] Change the Red Hat relay to mx1.redhat.com
The relay changed the IP it points to, let's try this and see if that helps.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-06-18 16:17:15 +02:00
Michal Konecny
c3a169c08e [postfix] Move destinations to staging mailman configuration
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-06-10 14:26:38 +02:00
Michal Konecny
438979a996 [postfix] Add mailman staging lists
I followed the instruction from
https://pagure.io/fedora-infrastructure/issue/8455#comment-913675, but this is
my first time I actually doing anything in postfix configuration, so I'm not
sure if everything I did is correct.

The SMTP port on the machine seems to be open according to group_vars for the
mailman_stg.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-06-10 14:25:30 +02:00
Kevin Fenzi
5fd49a0b20 smtp-mm: reject unauth pipelining.
This should reject broken pipelining attempts.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-12-24 10:15:27 -08:00
Kevin Fenzi
ddd0913262 smtp-auth: rename this to explicit hostname
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-11-15 17:48:24 -08:00
Michael Scherer
bdd76ae138 Add master.cf with submission enabled
Copied from base master.cf, fix #11623
2023-11-16 01:38:59 +00:00
Kevin Fenzi
b7cecd3deb gateway: do not try and specify a local_recipient_maps
This map wasn't there, causing bastion02 to basically reject emails.
So, instead just comment it out because we aren't using it anyhow.
We are luckly bastion01's postfix hasn't been restarted and breaking it
there.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-07-17 11:19:28 -07:00
Stephen Smoogen
19b500a5fd Remove chunking error messages in gateway systems
RHEL turned off chunking in postfix for various reasons. This causes a
lot of logs from spam and other servers. Turning off logging this as
it is not supported.

Signed-off-by: Stephen Smoogen <ssmoogen@redhat.com>
2023-06-29 20:09:57 +00:00
Pavel Raiskup
bee7b64fe5 main.cf files need to be moved before we claim they are templates
Revert "postfix: install main.cf as template"

This reverts commit 57f75cbcab.
2023-06-19 10:39:39 +02:00
Pavel Raiskup
82205131b7 smtp_auth_relay: new role, use by copr-dist-git-dev for now 2023-06-19 10:10:43 +02:00
Kevin Fenzi
abd52941ef smtp-mm: tweak tls options for rhel9
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-06-13 16:52:30 -07:00
Kevin Fenzi
14a3a6a2c1 smtp-mm / base / postfix: use gateway-chain cert
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-06-13 16:32:54 -07:00
Kevin Fenzi
ffbc4a001c base / smtp-auth: setup main.cf for smtp-auth host
This host needs to have it's own self signed certs and needs some more
config to allow the auth and allow authenticated users to relay.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-05-22 10:58:18 -07:00
Kevin Fenzi
ddfd50de03 smtp-auth-cc-rdu01: create new smtp auth relay
We need this to try and relay in emails.
It turns out to be bordering on impossible to do this sanely with our
current setup, so make a fedora vm that lets us use saslauthdb to have a
specific (small) list of users that can authenticate and relay emails
via bastion and out. We can't do this on rhel, because they don't build
the saslauthdb backend. We can't use any of the other backends because
they either don't work or would allow any fedora user to relay, which we
do not want.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-05-18 14:35:49 -07:00
Kevin Fenzi
9ddd3e2e6d postfix / gateway: add bysender map
This is a hack to work around SPF screwing us for @fedoraproject.org
aliases. It only fixes email from @redhat.com, but due to bugzilla thats
a lot of email.

Without this:
bugzilla@redhat.com -> user@fedoraproject.org (expands) ->
user@gmail.com sent out directly to gmail and gets rejected because
we aren't in the redhat.com SPF record.

With this:

bugzilla@redhat.com -> user@fedoraproject.org (expands) ->
user@gmail.com but sent to mx2.redhat.com to deliver. Since
mx2.redhat.com definitely is in the redhat.com SPF record the email is
delivered fine and SPF checks pass.

This won't help for other domains with -all SPF records, but at least it
helps for all the redhat.com emails, of which there are a lot going to
fedoraproject.org aliases. :)

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-07-26 15:58:43 -07:00
Kevin Fenzi
24088dfe9b postfix: put CA file back, needed to verify other certs
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-07-21 16:42:22 -07:00
Kevin Fenzi
a3c96c4032 postfix: gateway: consolidate tls settings and use chain-file.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-07-21 16:33:25 -07:00
Kevin Fenzi
c31c99a252 pagure: enable tls for smtp in prod too
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-06-13 18:07:22 -07:00
Kevin Fenzi
352ac4d6fd pagure / staging: correct path to certs, install tls_policy map
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-06-13 18:01:00 -07:00
Kevin Fenzi
0df1496ae6 pagure / staging: enable tls for postfix.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-06-13 17:54:07 -07:00
Kevin Fenzi
33403e750e bastion: readd may tls for all non rh sites
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-05-24 17:46:04 -07:00
Kevin Fenzi
caf5f130c8 bastion / postfix: clean up tls_policy duplicates
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-05-24 12:33:26 -07:00
Kevin Fenzi
a1af68173d bastion / postfix: disable tls_resue for now
Something is broken with smtp_tls_connection_reuse = yes, so disable it
for now. Also, setup a tls_policy map file and tell it to not use tls
for mx2.redhat.com. The normal smtp connection reuse works just fine, so
this will keep mail flowing until we can one day figure out why tls
connection reuse is busted.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-05-24 12:24:30 -07:00
Kevin Fenzi
81771937c2 bastion / postfix: need to set session cache for tls connections and timeout
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-05-24 09:13:08 -07:00
Kevin Fenzi
105cad26dc postfix / main.cf: fix releng and vpn config and drop phx2
We fixed the config in a PR from aheath1992 for most of the machines,
but we need to fix vpn (proxies in particular) and releng boxes now.
Also, while we are here, lets drop the phx2 file since it's not used
anymore.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-05-23 16:43:01 -07:00
Kevin Fenzi
b1395e9088 bastion / postfix: re-add missing smtp_connection_cache_destinations
Without this it wasn't caching tls connections and was going over the
small limit redhat.com mx had. Hopefully this gets mail flowing again.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-05-23 08:44:36 -07:00
Andrew Heath
32764a7f3a Testing https://access.redhat.com/solutions/5420401 on postfix systems 2022-05-17 00:29:25 +00:00
Kevin Fenzi
ba294ed5c6 postfix / gateway: fix tlsproxy to actually work
So, without this tlsproxy wasn't working and no connection reuse was
happening. With it, it seems to be processing away nicely and reusing
connections.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-04-26 12:31:48 -07:00
Kevin Fenzi
6d3114e3bd base / postfix / bastion/gateway: fix up email flow to @redhat.com
Recently, redhat.com changed internal MX servers. The new servers are
have rate limits on incoming emails from one ip and admins there don't
want to add a bunch of exceptions, so we need to adjust our end to not
flood connections to them. Currently, connections burst up to 100 (the
smtp postfix default) which goes over their limits and causes the
internal MX to reject emails from us for a while.

So, this change:

* Adds some domains to fast_flush. This allows us to use postqueue -s
  domain to flush emails to a particular domain.

* Changes the smtp limit to 40. This is under the redhat.com limit.

* Has ansible actually install the master.cf.gateway on bastion servers.
  Currently they were using the stock/default one.

* Enables the tlsproxy service, which is actually needed to get that tls
  reuse working.

After these changes, we keep few connections to the redhat.com mx open,
but we reuse them and send more emails over existing connections. No
'too many connection emails' have happened since the changes.
The queue slowly seems to be processing down.

Since this was causing an outage of email, I have already applied these
things to bastion01, but I'd like to make sure we match up to whats in
ansible.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-04-24 16:59:35 +00:00
Kevin Fenzi
affac369ab postfix / main.cf / gateway: enable smtp_tls_connection_reuse
Right now we are hitting redhat.com mx server connection limits.
This might be because we are starting too many new connections at once.
Enabling this should reduce the new connections by reusing existing
ones.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-04-20 16:07:40 -07:00
Kevin Fenzi
44caedc87d bastion: switch to mx2 for redhat.com emails
It seems this is a load balancer that we should be using according to
the internal ticket.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-04-05 07:58:45 -07:00
Kevin Fenzi
20b3db2561 bastion: switch email gateway for redhat.com emails
The old ext-mx seems no more, switch to new gateway.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-04-04 16:20:27 -07:00
Pavel Raiskup
a2d65ff508 Move devel servers to elastic IPs, too 2021-01-18 14:58:58 +01:00
Pavel Raiskup
f14b897b1f copr: point playbooks to new set of (elastic) IPs 2020-11-13 10:05:21 +01:00
Jakub Kadlcik
e043b62c5a reprovisioning copr-fe-dev from a new instance 2020-11-11 14:12:15 +01:00
Stephen Smoogen
522c62c273 try to make the postfix milter part better searched and some debugging to opendkim and turn off the sending of reports 2020-10-06 12:20:09 -04:00
Kevin Fenzi
c5f4e27746 roles/base/postfix: add a rdu-cc postfix main.cf
This one just uses the vpn endpoint for bastion to avoid dns and ipv6
issues.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-10-05 16:03:55 -07:00
Pierre-Yves Chibon
8a13932c66 postfix: Drop the main.cf for pagure02 - never worked
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2020-10-02 09:50:42 +02:00
Pierre-Yves Chibon
5383f87f30 pagure: adjust pagure's postfix configuration to rhel8
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2020-10-01 11:06:52 +02:00
Pierre-Yves Chibon
200282de8d pagure: add a dedicated postfix configuration file for pagure02
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2020-09-25 12:10:31 +02:00
Silvie Chlupova
3ded4aae28 Fix DKIM signing 2020-09-24 10:58:17 +00:00
Stephen Smoogen
25d3faff49 put in a relay host for copr 2020-08-13 14:55:18 -04:00
Stephen Smoogen
17965d6ea7 merge and remove duplicate gateway file that bastion.iad2 had. add in copr addresses to allow for relay 2020-08-13 14:53:33 -04:00
Stephen Smoogen
04efbcf732 add in correct main.cf also 2020-08-12 20:45:14 -04:00
Stephen Smoogen
c9cb4a5d5f fix postfix entries so that they use 10.3.160.0/19 network versus phx2 networks 2020-08-12 20:42:57 -04:00
Kevin Fenzi
7984b46eb7 The great phx2 pruning run (1st cut).
Since we no longer have any machines in phx2, I have tried to remove
them from ansible. Note that there are still some places where we need
to remove them still: nagios, dhcp, named were not touched, and in cases
where it wasn't pretty clear what a conditional was doing I left it to
be cleaned up later.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-06-14 14:14:31 -07:00