|
4 | 4 | from compiler_admin.commands.user.reset import reset
|
5 | 5 | from compiler_admin.services.google import (
|
6 | 6 | OU_ALUMNI,
|
| 7 | + USER_HELLO, |
7 | 8 | CallGAMCommand,
|
8 | 9 | move_user_ou,
|
9 | 10 | user_account_name,
|
@@ -33,7 +34,7 @@ def alumni(args: Namespace) -> int:
|
33 | 34 | return RESULT_FAILURE
|
34 | 35 |
|
35 | 36 | if getattr(args, "force", False) is False:
|
36 |
| - cont = input(f"Convert account to alumni for {account}? (Y/n)") |
| 37 | + cont = input(f"Convert account to alumni: {account}? (Y/n) ") |
37 | 38 | if not cont.lower().startswith("y"):
|
38 | 39 | print("Aborting conversion.")
|
39 | 40 | return RESULT_SUCCESS
|
@@ -68,4 +69,48 @@ def alumni(args: Namespace) -> int:
|
68 | 69 | command = ("user", account, "turnoff2sv")
|
69 | 70 | res += CallGAMCommand(command)
|
70 | 71 |
|
| 72 | + print("Resetting email signature") |
| 73 | + # https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Gmail-Send-As-Signature-Vacation#manage-signature |
| 74 | + command = ( |
| 75 | + "user", |
| 76 | + account, |
| 77 | + "signature", |
| 78 | + f"Compiler LLC<br />https://compiler.la<br />{USER_HELLO}", |
| 79 | + "replyto", |
| 80 | + USER_HELLO, |
| 81 | + "default", |
| 82 | + "treatasalias", |
| 83 | + "false", |
| 84 | + "name", |
| 85 | + "Compiler LLC", |
| 86 | + "primary", |
| 87 | + ) |
| 88 | + res += CallGAMCommand(command) |
| 89 | + |
| 90 | + print("Turning on email autoresponder") |
| 91 | + # https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Gmail-Send-As-Signature-Vacation#manage-vacation |
| 92 | + message = ( |
| 93 | + "Thank you for contacting Compiler. This inbox is no longer actively monitored.<br /><br />" |
| 94 | + + f"Please reach out to {USER_HELLO} if you need to get a hold of us." |
| 95 | + ) |
| 96 | + command = ( |
| 97 | + "user", |
| 98 | + account, |
| 99 | + "vacation", |
| 100 | + "true", |
| 101 | + "subject", |
| 102 | + "[This inbox is no longer active]", |
| 103 | + "message", |
| 104 | + message, |
| 105 | + "contactsonly", |
| 106 | + "false", |
| 107 | + "domainonly", |
| 108 | + "false", |
| 109 | + "start", |
| 110 | + "Started", |
| 111 | + "end", |
| 112 | + "2999-12-31", |
| 113 | + ) |
| 114 | + res += CallGAMCommand(command) |
| 115 | + |
71 | 116 | return res
|
0 commit comments