[go: up one dir, main page]

Page MenuHomePhabricator

Clean up OTRS/Znuny addresses handles by gsuite
Closed, ResolvedPublic

Description

The OTRS/Znuny database contains a number of email addresses which are actually handles by gsuite. As such email will never get delivered to orts/zunny

ERROR:/usr/local/bin/otrs_aliases:email is handled by gsuite: board@wikimedia.org
ERROR:/usr/local/bin/otrs_aliases:email is handled by gsuite: press@wikimedia.org
ERROR:/usr/local/bin/otrs_aliases:email is handled by gsuite: donations@wikimedia.org
ERROR:/usr/local/bin/otrs_aliases:email is handled by gsuite: security@wikimedia.org
ERROR:/usr/local/bin/otrs_aliases:email is handled by gsuite: postmaster@wikimedia.org
ERROR:/usr/local/bin/otrs_aliases:email is handled by gsuite: postmaster@wikipedia.org
ERROR:/usr/local/bin/otrs_aliases:email is handled by gsuite: privacy@wikimedia.org
ERROR:/usr/local/bin/otrs_aliases:email is handled by gsuite: legal-en@wikimedia.org
ERROR:/usr/local/bin/otrs_aliases:email is handled by gsuite: business@wikimedia.org
ERROR:/usr/local/bin/otrs_aliases:email is handled by gsuite: wm-cz@wikimedia.org
ERROR:/usr/local/bin/otrs_aliases:email is handled by gsuite: legal-tm-vio@wikimedia.org
ERROR:/usr/local/bin/otrs_aliases:email is handled by gsuite: ux@wikimedia.org
ERROR:/usr/local/bin/otrs_aliases:email is handled by gsuite: glam@wikimedia.org
ERROR:/usr/local/bin/otrs_aliases:email is handled by gsuite: improve@wikimedia.org
ERROR:/usr/local/bin/otrs_aliases:email is handled by gsuite: board@wikimedia.org

It would be useful to understand if theses emails should be removed from zunny or if we can ignore this.

Event Timeline

jbond triaged this task as Medium priority.Jun 2 2021, 1:05 PM
jbond created this task.

Change 697785 had a related patch set uploaded (by Jbond; author: John Bond):

[operations/puppet@production] P:mail::mx: update systemd timer so that it fails silently

https://gerrit.wikimedia.org/r/697785

Change 697785 merged by Jbond:

[operations/puppet@production] P:mail::mx: update systemd timer so that it fails silently

https://gerrit.wikimedia.org/r/697785

jbond added a parent task: Restricted Task.Jun 2 2021, 2:02 PM
jbond added a subscriber: Keegan.

@Keegan I notice you working on the orts/znuny migration and wondered if you would be able to advice on this task, or point me to someone who may know more. thanks

(VRTS admin:) Except of glam@wikimedia.org, all listed mail addresses are deactivated in Znuny/OTRS, so no further actions necessary. For glam@wikimedia.org there is still a queue. @Sadads (Astinson (WMF)) is the only user with access to this queue. If the queue can be closed, we can also deactivate this mail address in Znuny. For this, please send a request to otrs-admins@lists.wikimedia.org.

@DC thanks for the update, do you know what database attribute i could use to exclude deactivated emails from my query. im curently using the following SQL statment to get all otrs emails

SELECT value0, create_time, change_time FROM system_address

@Sadads are you able to confirm if glam@wikimedia.org can be deactivated in OTRS, as far as i can tell no emails addresses to this email will be delivered to to OTRS and will instead be delivered to the google smtp servers

$ sudo exim -bt glam@wikimedia.org                                                                                                                      
glam@wikimedia.org
  router = ldap_group, transport = remote_smtp
  host aspmx.l.google.com [172.217.222.26]

@Keegan I notice you working on the orts/znuny migration and wondered if you would be able to advice on this task, or point me to someone who may know more. thanks

@jbond my utmost apologies for not replying to this earlier! These errors can be ignored, they will never go away AFAIK. These are the result of email addresses that used to be processed through OTRS/Znuny LTS, but were usurped by gsuite handling. When this occurs the old emails were invalidated and disabled from OTRS/Znuny LTS, but they cannot be deleted and so they will forever log errors unless/until the ability to delete unused emails is added as functionality.

@jbond my utmost apologies for not replying to this earlier! These errors can be ignored, they will never go away AFAIK. These are the result of email addresses that used to be processed through OTRS/Znuny LTS, but were usurped by gsuite handling. When this occurs the old emails were invalidated and disabled from OTRS/Znuny LTS, but they cannot be deleted and so they will forever log errors unless/until the ability to delete unused emails is added as functionality.

@Keegan I suppose this is still the case as of today? If it's just this small list of legacy addressed then we'd simply add them to the export script and filter them out as known false positives.

  1. Let's review if the new Znuny version enabled removal of unused emails and remove them if possible
  2. If not, then let's filter the emails in the export script (in profile::mail::vrts)

cc @Quiddity in case there are any comments about the above

@MoritzMuehlenhoff I cannot say for sure as I have not worked in this area for several years, but I cannot imagine that the situation has changed.

  1. Let's review if the new Znuny version enabled removal of unused emails and remove them if possible
  2. If not, then let's filter the emails in the export script (in profile::mail::vrts)

cc @Quiddity in case there are any comments about the above

  1. I don't know if this feature was added (perhaps in a more obscure location, or in a CLI-only way?), but I cannot see any relevant UI features in the admin panel for "Email Addresses" - there's only an "Add System Address" button at https://ticket.wikimedia.org/otrs/index.pl?Action=AdminSystemAddress ; and within the pages for individual addresses linked therein, there are not any removal-related features.
  2. Sounds reasonable.

Change #1031432 had a related patch set uploaded (by LSobanski; author: LSobanski):

[operations/puppet@production] Filter out addresses handled by gsuite that cannot be removed from VRTS

https://gerrit.wikimedia.org/r/1031432

LSobanski lowered the priority of this task from Medium to Low.
LSobanski moved this task from Incoming to Consultation on the collaboration-services board.
LSobanski moved this task from Consultation to Work in Progress on the collaboration-services board.

Change #1031432 merged by EoghanGaffney:

[operations/puppet@production] Filter out addresses handled by gsuite that cannot be removed from VRTS

https://gerrit.wikimedia.org/r/1031432

Resolving as the change is now in place.

Reopening as the alert silencing (https://gerrit.wikimedia.org/r/c/operations/puppet/+/697785) still needs to be reverted.

Change #1031760 had a related patch set uploaded (by Muehlenhoff; author: Muehlenhoff):

[operations/puppet@production] mx: Stop ignoring errors from alias sync

https://gerrit.wikimedia.org/r/1031760

Change #1031761 had a related patch set uploaded (by Muehlenhoff; author: Muehlenhoff):

[operations/puppet@production] vrts: Stop ignoring errors from alias sync

https://gerrit.wikimedia.org/r/1031761

Change #1031760 merged by Muehlenhoff:

[operations/puppet@production] mx: Stop ignoring errors from alias sync

https://gerrit.wikimedia.org/r/1031760

Change #1031942 had a related patch set uploaded (by Muehlenhoff; author: Muehlenhoff):

[operations/puppet@production] Revert "mx: Stop ignoring errors from alias sync"

https://gerrit.wikimedia.org/r/1031942

Change #1031942 merged by Muehlenhoff:

[operations/puppet@production] Revert "mx: Stop ignoring errors from alias sync"

https://gerrit.wikimedia.org/r/1031942

The filter list isn't complete yet, when enabling it on the MX hosts (reverted for now) it logged the following errors:

May 15 13:34:56 mx2001 systemd[1]: Finished Generate VRTS aliases file for Exim.
May 15 13:34:56 mx2001 systemd[1]: generate_vrts_aliases.service: Consumed 1.185s CPU time.
May 15 14:22:08 mx2001 systemd[1]: Starting Generate VRTS aliases file for Exim...
May 15 14:22:08 mx2001 vrts_aliases[947648]: ERROR:/usr/local/bin/vrts_aliases:email is handled by postfix alias: otrs@wikimedia.org
May 15 14:22:08 mx2001 vrts_aliases[947648]: ERROR:/usr/local/bin/vrts_aliases:email is handled by postfix alias: noc@wikimedia.org
May 15 14:22:09 mx2001 vrts_aliases[947648]: ERROR:/usr/local/bin/vrts_aliases:email is handled by postfix alias: webmaster@wikimedia.org
May 15 14:22:09 mx2001 vrts_aliases[947648]: ERROR:/usr/local/bin/vrts_aliases:email is handled by postfix alias: webmaster@wikipedia.org
May 15 14:22:14 mx2001 vrts_aliases[947648]: ERROR:/usr/local/bin/vrts_aliases:email is handled by gsuite: wikimania@wikimedia.org
May 15 14:22:14 mx2001 vrts_aliases[947648]: ERROR:/usr/local/bin/vrts_aliases:email is handled by gsuite: donation@wikimedia.org
May 15 14:22:14 mx2001 vrts_aliases[947648]: ERROR:/usr/local/bin/vrts_aliases:email is handled by postfix alias: donation@wikipedia.org
May 15 14:22:14 mx2001 vrts_aliases[947648]: ERROR:/usr/local/bin/vrts_aliases:email is handled by postfix alias: donations@wikipedia.org
May 15 14:22:27 mx2001 vrts_aliases[947648]: ERROR:/usr/local/bin/vrts_aliases:email is handled by postfix alias: security@wikipedia.org
May 15 14:22:34 mx2001 vrts_aliases[947648]: ERROR:/usr/local/bin/vrts_aliases:email is handled by postfix alias: jobs@wikipedia.org
May 15 14:23:14 mx2001 vrts_aliases[947648]: ERROR:/usr/local/bin/vrts_aliases:email is handled by postfix alias: privacy@wikidata.org
May 15 14:23:17 mx2001 systemd[1]: generate_vrts_aliases.service: Main process exited, code=exited, status=1/FAILURE
May 15 14:23:17 mx2001 systemd[1]: generate_vrts_aliases.service: Failed with result 'exit-code'.
May 15 14:23:17 mx2001 systemd[1]: Failed to start Generate VRTS aliases file for Exim.
May 15 14:23:17 mx2001 systemd[1]: generate_vrts_aliases.service: Consumed 1.224s CPU time.

Change #1034046 had a related patch set uploaded (by LSobanski; author: LSobanski):

[operations/puppet@production] Filter out additional addresses handled by gsuite and postfix that cannot be removed from VRTS

https://gerrit.wikimedia.org/r/1034046

Change #1034046 merged by AOkoth:

[operations/puppet@production] Filter out addresses that cannot be removed from VRTS

https://gerrit.wikimedia.org/r/1034046

Last run:

May 28 18:18:41 mx1001 systemd[1]: Starting Generate VRTS aliases file for Exim...
May 28 18:18:43 mx1001 vrts_aliases[1605430]: ERROR:/usr/local/bin/vrts_aliases:email is handled by postfix alias: donations@wikipedia.org
May 28 18:18:57 mx1001 vrts_aliases[1605430]: ERROR:/usr/local/bin/vrts_aliases:email is handled by gsuite: wm-cz@wikimedia.org
May 28 18:19:24 mx1001 systemd[1]: generate_vrts_aliases.service: Succeeded.
May 28 18:19:24 mx1001 systemd[1]: Finished Generate VRTS aliases file for Exim.
May 28 18:19:24 mx1001 systemd[1]: generate_vrts_aliases.service: Consumed 1.094s CPU time.

Do we still have the 2 remaining addresses here because line 83 in the script doesn't end with a comma and both appear after that, maybe?

Run with comma added manually. Thanks @Dzahn

May 28 19:44:49 mx1001 systemd[1]: Starting Generate VRTS aliases file for Exim...
May 28 19:45:31 mx1001 systemd[1]: generate_vrts_aliases.service: Succeeded.
May 28 19:45:31 mx1001 systemd[1]: Finished Generate VRTS aliases file for Exim.
May 28 19:45:31 mx1001 systemd[1]: generate_vrts_aliases.service: Consumed 1.301s CPU time.

Change #1036760 had a related patch set uploaded (by Dzahn; author: Dzahn):

[operations/puppet@production] vrts: add missing comma to vrts_aliases.py

https://gerrit.wikimedia.org/r/1036760

Change #1036760 merged by Dzahn:

[operations/puppet@production] vrts: add missing comma to vrts_aliases.py

https://gerrit.wikimedia.org/r/1036760

on mx1001:

before: Process: 1319423 ExecStart=/usr/local/bin/vrts_aliases (code=exited, status=1/FAILURE)

now: Process: 1399506 ExecStart=/usr/local/bin/vrts_aliases (code=exited, status=0/SUCCESS)

Change #1037117 had a related patch set uploaded (by Dzahn; author: Dzahn):

[operations/puppet@production] mx: stop ignoring VRTS alias errors, email on error

https://gerrit.wikimedia.org/r/1037117

Change #1031761 merged by Dzahn:

[operations/puppet@production] vrts: Stop ignoring errors from alias sync

https://gerrit.wikimedia.org/r/1031761

Change #1037117 abandoned by Dzahn:

[operations/puppet@production] mx: stop ignoring VRTS alias errors

Reason:

duplicate of Ieca89d43b141d4f1d066e

https://gerrit.wikimedia.org/r/1037117

I think this is completed and resolved now.

Change #1037117 restored by Dzahn:

[operations/puppet@production] mx: stop ignoring VRTS alias errors

https://gerrit.wikimedia.org/r/1037117

Change #1037117 merged by Dzahn:

[operations/puppet@production] mx: stop ignoring VRTS alias errors

https://gerrit.wikimedia.org/r/1037117

Change #1041414 had a related patch set uploaded (by Muehlenhoff; author: Muehlenhoff):

[operations/puppet@production] Run vrts_aliases in debug mode

https://gerrit.wikimedia.org/r/1041414

Change #1041414 merged by Muehlenhoff:

[operations/puppet@production] Run vrts_aliases in debug mode

https://gerrit.wikimedia.org/r/1041414