Commit Graph

53 Commits

Author SHA1 Message Date
Michal Konecny
2ec055db6f Use first uppercase letter for all handlers
This will unify all the handlers to use first uppercase letter for
ansible-lint to stop complaining.

I went through all `notify:` occurrences and fixed them by running
```
set TEXT "text_to_replace"; set REPLACEMENT "replacement_text"; git grep
-rlz "$TEXT" . | xargs -0 sed -i "s/$TEXT/$REPLACEMENT/g"
```

Then I went through all the changes and removed the ones that wasn't
expected to be changed.

Fixes https://pagure.io/fedora-infrastructure/issue/12391

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2025-02-10 20:31:49 +00:00
Ryan Lerch
6a3816dfdc ansiblelint fixes-- fqcn[action-core] - copy to ansible.builtin.copy
Replaces many references to 'copy' with ansible.builtin.copy

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 10:43:31 +10:00
Ryan Lerch
691adee6ee Fix name[casing] ansible-lint issues
fix 1900 failures of the following case issue:

`name[casing]: All names should start with an uppercase letter.`

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-14 20:20:07 +10:00
Ryan Lerch
89f6f1fc32 Fix majority of remaining yamllint warnings and errors
Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2024-11-28 17:31:45 +10:00
Kevin Fenzi
4a6cb460ca buildvm_s390x in boston: retire
We have moved over to the rdu mainframe, drop all the bos kvm hosts.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-02-27 08:33:41 -08:00
Kevin Fenzi
4cd2c924c3 smtp-auth: actually install the master.cf file too
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-11-15 17:51:16 -08: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
57f75cbcab postfix: install main.cf as template
There is no jinja in the current main.cf files, except for the Copr
main.cf that uses STARTTLS for SMTP relayhost.
2023-06-19 10:33:33 +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
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
a336ba2a9e postfix: use a chain file for ssl certs
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-07-21 16:25:10 -07:00
Kevin Fenzi
b54b8a0bb7 bastion / postfix: adjust gateway ssl cert to base name
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-07-21 13:39:43 -07:00
Kevin Fenzi
9953c1346f postfix / also install tls_policy on pagure*
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-06-13 18:03:59 -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
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
Stephen Smoogen
ec8c05f116 Fix tasks/postfix.yaml and roles/basic/tasks/postfix.yaml to match
Found the reason that the definitions I had put were not
working. There were two different ones and i was looking at the wrong
one. Put the two tasks with the same logic so things should work no
matter which one is run.
2021-02-17 19:17:50 -05:00
Stephen Smoogen
5b9d2b927d put in an updated postfix.main for bastion-iad01 2020-05-22 13:56:34 -04:00
Kevin Fenzi
5ecc8a9c4f base / postfix: also work around postfix/systemd bug on buildvmhost-s390x.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:16 +02:00
Kevin Fenzi
e1bea5fb6b postfix / base: also this is Service not service
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:16 +02:00
Kevin Fenzi
cdeaa2558c base / postfix: reload systemd after changing the postfix service file.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:16 +02:00
Kevin Fenzi
015df8dc65 postfix / base: work around s390x bug in private devices.
https://bugzilla.redhat.com/show_bug.cgi?id=1769148

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:16 +02:00
Rick Elrod
0f9a591216 base: don't copy a bunch of postfix stuff for stg
Signed-off-by: Rick Elrod <relrod@redhat.com>
2020-04-24 21:34:15 +02:00
Stephen Smoogen
42bf78480e try again. run only against bastion02 to see what isnt happening 2020-04-24 21:34:10 +02:00
Stephen Smoogen
f158bfca8e undo the change to certs 2020-04-24 21:34:10 +02:00
Stephen Smoogen
92b2f4e805 fix matts problem 2020-04-24 21:34:09 +02:00
Stephen Smoogen
8611ab80ed put in proper checks like we have for other domains 2019-05-29 15:57:26 +00:00
Stephen Smoogen
1be05a2039 put in header checks postmap and restart 2019-05-29 14:59:43 +00:00
Kevin Fenzi
b035dceff5 base/postfix: no need to make a hash here, regexp uses the normal file.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2019-02-13 18:21:25 +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
Patrick Uiterwijk
697e09fe7e Do a sender_access for mailman as well
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2019-02-07 09:03:51 +00:00
Patrick Uiterwijk
fe5f1c3152 Or no quoting
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2017-08-04 16:49:13 +00:00
Patrick Uiterwijk
4eef39463f Quote this too. Quote all the things
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2017-08-04 16:47:29 +00:00
Patrick Uiterwijk
fa0d94d697 Fix EPARSE
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2017-08-04 16:46:12 +00:00
Patrick Uiterwijk
cfab031a8a Deploy sender_access file
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2017-08-04 18:20:17 +02:00
Kevin Fenzi
8a6e51a9a6 change state=running to start=started as the old one is going away in ansible 2.7 2017-04-13 01:37:21 +00:00
Patrick Uiterwijk
1e9441af9b Install complete.crt into .crt
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2016-09-27 18:21:10 +00:00
Patrick Uiterwijk
905ef28ad2 Install gateway cert with intermediate cert
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2016-09-27 18:15:04 +00:00
Stephen Smoogen
e13358ccd8 push the tls change out to the smtp-mm boxes 2016-09-27 17:37:21 +00:00
Kevin Fenzi
41cee6c129 Fix the order of this handler 2016-09-27 16:35:29 +00:00
Kevin Fenzi
4302a23215 Swap the order of these handlers so it does the map, then the postfix restart. 2016-09-27 16:09:32 +00:00
Stephen Smoogen
39459ede7d rebuild then restart 2016-09-27 03:34:39 +00:00
Stephen Smoogen
865dc57de9 call it a crt not a csr 2016-09-27 03:25:37 +00:00
Stephen Smoogen
2c055ba46e and we need to have a trigger 2016-09-27 03:08:25 +00:00
Stephen Smoogen
379340b456 and put in the items kevin asked for. 2016-09-27 03:00:03 +00:00
Stephen Smoogen
6780736eb3 lets try another go at patching 2016-09-27 01:46:38 +00:00
Stephen Smoogen
d2764137e5 try this patch set on for size to get tls working with smtp 2016-09-27 01:10:46 +00:00
Patrick Uiterwijk
ebf41c6366 Also delivery master.cf to noc02
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2016-09-24 00:51:05 +00:00
Stephen Smoogen
bf85ec58dd why? 2016-09-24 00:41:31 +00:00
Kevin Fenzi
9fe0726ddb Try this and see if it works any differently. 2016-05-14 17:49:50 +00:00