Commit graph

122 commits

Author SHA1 Message Date
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
Stephen Smoogen
9fbe3df30b put the right item into the postfix main.cf 2020-06-09 14:16:22 -04:00
Stephen Smoogen
da3bb01bb8 make it so ipv4 is used for iad2 systems 2020-06-09 14:11:26 -04:00
Stephen Smoogen
16875c357d try to get this to work for builders in iad2 2020-06-06 10:39:09 -04:00
Mark O'Brien
cb9302cb6a [postfix] update gateway conf for postfix3 2020-06-02 08:16:55 +00:00
Mark O'Brien
c8e322e49a [postfix] update main config file for postfix3 config 2020-06-02 08:16:55 +00:00
Stephen Smoogen
d8188e7417 turn off ipv6 on bastion until we get ipv6 fulling deployed 2020-05-22 14:07:59 -04:00
Stephen Smoogen
5b9d2b927d put in an updated postfix.main for bastion-iad01 2020-05-22 13:56:34 -04:00
Kevin Fenzi
c529380547 Spring cleaning time. :)
I removed all the old files, inventory, playbooks, roles and other from
services we no longer run or use. There was a bunch of cruft in there
and I hope that will make the repo cleaner and easier to look for things
we actually do run and care about.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-05-13 14:02:41 -07:00
Kevin Fenzi
ce6cd8844a base: postfix: comment duplicate alias_maps thats sending warnings from bastion01.iad2
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-05-08 20:30:33 -07:00
Stephen Smoogen
03a14c6db9 HOTPATCH: Fix pagure-stg email. Formal fix will need updating our postfix files to work with RHEL-8/Fedora 28+ postfix syntax. 2020-05-04 08:48:43 -04:00
Nils Philippsen
5958059b47 Remove remnants of lists-dev and lists01
Follow-up on:

commit a11e1da4b435928c8895259e12ea1bf895860cb4
Author: Kevin Fenzi <kevin@scrye.com>
Date:   Thu Feb 20 17:09:00 2020 +0000

    lists-dev: farewell

    Signed-off-by: Kevin Fenzi <kevin@scrye.com>

commit dd3bf3b50d
Author: Kevin Fenzi <kevin@scrye.com>
Date:   Fri May 20 18:09:20 2016 +0000

    Drop collab03 and hosted-lists01 (everything is going to mailman01 now).
    Drop hosted01 (we arent going to move hosted to rhel7)

Signed-off-by: Nils Philippsen <nils@redhat.com>
2020-05-03 22:02:42 +00:00
Stephen Smoogen
8611ab80ed put in proper checks like we have for other domains 2019-05-29 15:57:26 +00:00
Stephen Smoogen
22fe4ad0a2 [postfix] and a file to put in drops. 2019-05-29 14:52:52 +00:00
Stephen Smoogen
77dcd8034f [postfix] change to header checks needs to be on both bastion and smtp-mm 2019-05-29 14:50:03 +00:00
Stephen Smoogen
0c6f35bf45 Allow postfix on gateway to do header checks 2019-05-29 14:37:23 +00:00
Jakub Kadlčík
fee9bd85b7 Add smtpd_recipient_restrictions for copr according to main.cf 2019-03-11 21:18:25 +01:00
Kevin Fenzi
6a0a3994ce base/postfix: fix typo. It's regexp not regex.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2019-02-13 17:58:36 +00:00
Kevin Fenzi
8cd9d8750b base/postfix: convert sender map to a regex so we can reject emails with two @'s in From.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2019-02-13 17:54:47 +00:00