Fix multiple inclusion of Email::Sender::Simple
This commit is contained in:
parent
80d3352b78
commit
ae330ab897
1 changed files with 11 additions and 32 deletions
43
utils/lpt
43
utils/lpt
|
|
@ -1437,6 +1437,8 @@ sub cmd_no_strong_auth_view(@)
|
||||||
|
|
||||||
sub cmd_no_strong_auth_warn(@)
|
sub cmd_no_strong_auth_warn(@)
|
||||||
{
|
{
|
||||||
|
require "Email::Sender::Simple";
|
||||||
|
|
||||||
for my $entry (get_no_strong_auth_user())
|
for my $entry (get_no_strong_auth_user())
|
||||||
{
|
{
|
||||||
next if (grep { $_ eq "no-strong-auth" } $entry->get_value('labService'));
|
next if (grep { $_ eq "no-strong-auth" } $entry->get_value('labService'));
|
||||||
|
|
@ -1455,15 +1457,12 @@ en suspens.
|
||||||
|
|
||||||
Cordialement,
|
Cordialement,
|
||||||
|
|
||||||
PS: Ce message est généré automatiquement, les roots sont en copie.
|
P.-S. : Ce message est généré automatiquement, les roots sont en copie.
|
||||||
Pour toute demande, merci de faire un ticket à admin\@acu.epita.fr
|
Pour toute demande, merci de faire un ticket à admin\@acu.epita.fr
|
||||||
|
|
||||||
--
|
--
|
||||||
Les roots ACU";
|
Les roots ACU";
|
||||||
|
|
||||||
# create the message
|
|
||||||
require "Email::Sender::Simple";
|
|
||||||
|
|
||||||
my $mail = Email::MIME->create(
|
my $mail = Email::MIME->create(
|
||||||
header_str => [
|
header_str => [
|
||||||
From => "Roots assistants <admin\@acu.epita.fr>",
|
From => "Roots assistants <admin\@acu.epita.fr>",
|
||||||
|
|
@ -1471,11 +1470,6 @@ Les roots ACU";
|
||||||
Cc => 'Roots assistants <root@acu.epita.fr>',
|
Cc => 'Roots assistants <root@acu.epita.fr>',
|
||||||
Subject => "[PILA][AUTH-FORTE] Authentification forte SSH non active"
|
Subject => "[PILA][AUTH-FORTE] Authentification forte SSH non active"
|
||||||
],
|
],
|
||||||
attributes => {
|
|
||||||
encoding => 'quoted-printable',
|
|
||||||
charset => 'utf-8',
|
|
||||||
format => 'flowed',
|
|
||||||
},
|
|
||||||
body_str => $body,
|
body_str => $body,
|
||||||
);
|
);
|
||||||
Email::Sender::Simple::sendmail($mail);
|
Email::Sender::Simple::sendmail($mail);
|
||||||
|
|
@ -1484,6 +1478,8 @@ Les roots ACU";
|
||||||
|
|
||||||
sub cmd_no_strong_auth_close(@)
|
sub cmd_no_strong_auth_close(@)
|
||||||
{
|
{
|
||||||
|
require "Email::Sender::Simple";
|
||||||
|
|
||||||
for my $entry (get_no_strong_auth_user())
|
for my $entry (get_no_strong_auth_user())
|
||||||
{
|
{
|
||||||
next if (grep { $_ eq "no-strong-auth" } $entry->get_value('labService'));
|
next if (grep { $_ eq "no-strong-auth" } $entry->get_value('labService'));
|
||||||
|
|
@ -1492,7 +1488,7 @@ sub cmd_no_strong_auth_close(@)
|
||||||
|
|
||||||
my $body = "Bonjour ".$entry->get_value("cn").",
|
my $body = "Bonjour ".$entry->get_value("cn").",
|
||||||
|
|
||||||
Après plusieurs relance de notre part, vous n'avez toujours pas activé
|
Après plusieurs relances de notre part, vous n'avez toujours pas activé
|
||||||
l'authentification forte pour SSH. Votre compte a donc été suspendu.
|
l'authentification forte pour SSH. Votre compte a donc été suspendu.
|
||||||
|
|
||||||
Nous vous invitons à passer au laboratoire pour faire réactiver votre
|
Nous vous invitons à passer au laboratoire pour faire réactiver votre
|
||||||
|
|
@ -1504,8 +1500,6 @@ Cordialement,
|
||||||
Les roots ACU";
|
Les roots ACU";
|
||||||
|
|
||||||
# create the message
|
# create the message
|
||||||
require "Email::Sender::Simple";
|
|
||||||
|
|
||||||
my $mail = Email::MIME->create(
|
my $mail = Email::MIME->create(
|
||||||
header_str => [
|
header_str => [
|
||||||
From => "Roots assistants <admin\@acu.epita.fr>",
|
From => "Roots assistants <admin\@acu.epita.fr>",
|
||||||
|
|
@ -1513,11 +1507,6 @@ Les roots ACU";
|
||||||
Cc => 'Roots assistants <root@acu.epita.fr>',
|
Cc => 'Roots assistants <root@acu.epita.fr>',
|
||||||
Subject => "[PILA][ACCES] Compte suspendu"
|
Subject => "[PILA][ACCES] Compte suspendu"
|
||||||
],
|
],
|
||||||
attributes => {
|
|
||||||
encoding => 'quoted-printable',
|
|
||||||
charset => 'utf-8',
|
|
||||||
format => 'flowed',
|
|
||||||
},
|
|
||||||
body_str => $body,
|
body_str => $body,
|
||||||
);
|
);
|
||||||
Email::Sender::Simple::sendmail($mail);
|
Email::Sender::Simple::sendmail($mail);
|
||||||
|
|
@ -1642,6 +1631,8 @@ sub cmd_ssh_keys_without_passphrase_view(@)
|
||||||
# warn about unprotected keys
|
# warn about unprotected keys
|
||||||
sub cmd_ssh_keys_without_passphrase_warn(@)
|
sub cmd_ssh_keys_without_passphrase_warn(@)
|
||||||
{
|
{
|
||||||
|
require "Email::Sender::Simple";
|
||||||
|
|
||||||
my $process = sub() {
|
my $process = sub() {
|
||||||
my $entry = shift;
|
my $entry = shift;
|
||||||
my $keys = shift;
|
my $keys = shift;
|
||||||
|
|
@ -1676,8 +1667,6 @@ PS: Ce message est g
|
||||||
Les roots ACU";
|
Les roots ACU";
|
||||||
|
|
||||||
# create the message
|
# create the message
|
||||||
require "Email::Sender::Simple";
|
|
||||||
|
|
||||||
my $mail = Email::MIME->create(
|
my $mail = Email::MIME->create(
|
||||||
header_str => [
|
header_str => [
|
||||||
From => "Roots assistants <admin\@acu.epita.fr>",
|
From => "Roots assistants <admin\@acu.epita.fr>",
|
||||||
|
|
@ -1685,11 +1674,6 @@ Les roots ACU";
|
||||||
Cc => 'Roots assistants <root@acu.epita.fr>',
|
Cc => 'Roots assistants <root@acu.epita.fr>',
|
||||||
Subject => "[PILA][SSH-KEY] Clef SSH non protégée"
|
Subject => "[PILA][SSH-KEY] Clef SSH non protégée"
|
||||||
],
|
],
|
||||||
attributes => {
|
|
||||||
encoding => 'quoted-printable',
|
|
||||||
charset => 'utf-8',
|
|
||||||
format => 'flowed',
|
|
||||||
},
|
|
||||||
body_str => $body,
|
body_str => $body,
|
||||||
);
|
);
|
||||||
Email::Sender::Simple::sendmail($mail);
|
Email::Sender::Simple::sendmail($mail);
|
||||||
|
|
@ -1701,6 +1685,8 @@ Les roots ACU";
|
||||||
# remove unprotected keys
|
# remove unprotected keys
|
||||||
sub cmd_ssh_keys_without_passphrase_remove(@)
|
sub cmd_ssh_keys_without_passphrase_remove(@)
|
||||||
{
|
{
|
||||||
|
require "Email::Sender::Simple";
|
||||||
|
|
||||||
my $process = sub() {
|
my $process = sub() {
|
||||||
my $entry = shift;
|
my $entry = shift;
|
||||||
my $keys = shift;
|
my $keys = shift;
|
||||||
|
|
@ -1741,8 +1727,6 @@ PS: Ce message est g
|
||||||
--
|
--
|
||||||
Les roots ACU";
|
Les roots ACU";
|
||||||
|
|
||||||
require "Email::Sender::Simple";
|
|
||||||
|
|
||||||
my $mail = Email::MIME->create(
|
my $mail = Email::MIME->create(
|
||||||
header_str => [
|
header_str => [
|
||||||
From => "Roots assistants <admin\@acu.epita.fr>",
|
From => "Roots assistants <admin\@acu.epita.fr>",
|
||||||
|
|
@ -1750,11 +1734,6 @@ Les roots ACU";
|
||||||
Cc => 'Roots assistants <root@acu.epita.fr>',
|
Cc => 'Roots assistants <root@acu.epita.fr>',
|
||||||
Subject => "[PILA][SSH-KEY] Clef SSH non protégée supprimée"
|
Subject => "[PILA][SSH-KEY] Clef SSH non protégée supprimée"
|
||||||
],
|
],
|
||||||
attributes => {
|
|
||||||
encoding => 'quoted-printable',
|
|
||||||
charset => 'utf-8',
|
|
||||||
format => 'flowed',
|
|
||||||
},
|
|
||||||
body_str => $body,
|
body_str => $body,
|
||||||
);
|
);
|
||||||
Email::Sender::Simple::sendmail($mail);
|
Email::Sender::Simple::sendmail($mail);
|
||||||
|
|
|
||||||
Reference in a new issue