Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[postfix] virtual machines allow list #4980

Merged
merged 5 commits into from
Jun 3, 2024
Merged

[postfix] virtual machines allow list #4980

merged 5 commits into from
Jun 3, 2024

Conversation

kayiwa
Copy link
Member

@kayiwa kayiwa commented May 24, 2024

Add the list of virtual machines that can relay messages

Initial machines that we believe need to send messages

Copy link
Contributor

@acozine acozine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a huge step forward. I see a couple of places where we could make it even better:

This PR updates 6 group_vars files, but we currently configure a postfix server in 7 group_vars files:
openbooks )staging and prod)
oawaiver (staging and prod)
ojs (staging and prod)
orangelight (prod only)
Do we want to change them all in this PR? Also, as mentioned below, we should document what we are using the staging ponyexpress for - my vote would be that we assign staging servers to the staging ponyexpress.

Finally, four playbooks refer in their documentation sections to the pul-the-hard-way docs on greenlisting servers for ponyexpress - it would be great to update those as well:
libwww.yml
friends_of_pul.yml
special_collections.yml
byzantine.yml

group_vars/openbooks/staging.yml Show resolved Hide resolved
group_vars/oawaiver/staging.yml Show resolved Hide resolved
kayiwa added a commit to pulibrary/pul-it-handbook that referenced this pull request May 30, 2024
@sandbergja
Copy link
Member

Thanks, @kayiwa! Writing down some notes from my testing, so we can look at them later.

From catalog3, when I run the following in the rails console (with thanks to @carolyncole for the example that inspired this):

form = OpenStruct.new({
  name: 'Me',
  email: 'js7389@princeton.edu',
  email_subject: 'Testing the new pony express server',
  message: 'Testing the new pony express server',
  context: 'http://example.com/new-pony',
  title: 'Example Record with new Pony!',
  routed_mail_to: 'js7389@princeton.edu'
})
mailer = ContactMailer.with(form:)
question = mailer.question
question.delivery_method.settings = {address: 'lib-ponyexpr-prod.princeton.edu'}
question.deliver_now

I get:

SSL_connect returned=1 errno=0 peeraddr=128.112.203.118:25 state=error: certificate verify failed (self-signed certificate) (OpenSSL::SSL::SSLError)

And /var/log/mail on lib-ponyexpr-prod says:

May 30 16:27:00 lib-ponyexpr-prod postfix/smtpd[3159370]: connect from catalog3.princeton.edu[128.112.200.180]
May 30 16:27:00 lib-ponyexpr-prod postfix/smtpd[3159370]: SSL_accept error from catalog3.princeton.edu[128.112.200.180]: -1
May 30 16:27:00 lib-ponyexpr-prod postfix/smtpd[3159370]: warning: TLS library problem: error:0A000418:SSL routines::tlsv1 alert unknown ca:../ssl/record/rec_layer_s3.c:1584:SSL alert number 48:
May 30 16:27:00 lib-ponyexpr-prod postfix/smtpd[3159370]: lost connection after STARTTLS from catalog3.princeton.edu[128.112.200.180]

Copy link
Member

@sandbergja sandbergja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @kayiwa !

@sandbergja
Copy link
Member

For anyone following along, @kayiwa found the issue that was causing the tls error in the above catalog test, we needed to make sure that :enable_starttls was false for now (although we may wish to start using TLS in the future).

Copy link
Contributor

@acozine acozine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add a change to the ojs staging config. Once that's in, this looks great. Thanks @kayiwa.

@kayiwa kayiwa requested a review from acozine June 3, 2024 14:16
kayiwa and others added 5 commits June 3, 2024 13:07
Add the list of virtual machines that can relay messages
related to #4992

Co-authored-by: Beck Davis <beck-davis@users.noreply.github.com>
Co-authored-by: Vickie Karasic <vickiekarasic@users.noreply.github.com>
@kayiwa kayiwa merged commit 881d48e into main Jun 3, 2024
66 checks passed
@kayiwa kayiwa deleted the i4891_postfix_vms branch June 3, 2024 19:30
@kayiwa
Copy link
Member Author

kayiwa commented Jun 3, 2024

I'd add a change to the ojs staging config. Once that's in, this looks great. Thanks @kayiwa.

Added at this commit 1445c3a

@acozine acozine mentioned this pull request Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants