LDAPAccountManager / lam

LDAP Account Manager
https://www.ldap-account-manager.org
Other
429 stars 69 forks source link

MAILS FROM JOBS #320

Closed informaticavera closed 5 months ago

informaticavera commented 5 months ago

We have detected that we are not receiving the emails that are generated from the ShadowAccountExpiration jobs, however we do receive other emails from lam, such as those that are generated with the self-service portal

Captura desde 2024-04-08 10-38-22

lam.log

gruberroland commented 5 months ago

The log indicates that the user account expires in April 2025. Therefore, no email is sent.

informaticavera commented 5 months ago

ummm, this has happened twice, it seems that the form field with the calendar defaults to that year 2025. Doesn't that seem like appropriate behavior?

El mar, 9 abr 2024, 19:10, gruberroland @.***> escribió:

The log indicates that the user account expires in April 2025. Therefore, no email is sent.

— Reply to this email directly, view it on GitHub https://github.com/LDAPAccountManager/lam/issues/320#issuecomment-2045710744, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHYO6VUXPD5KWUHQZKBKAI3Y4QOHZAVCNFSM6AAAAABF55C75CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBVG4YTANZUGQ . You are receiving this because you authored the thread.Message ID: @.***>

gruberroland commented 5 months ago

Yes, the calendar defaults to the current date + 1 year. This matches something like 80% of the cases.

informaticavera commented 5 months ago

I have tried with another user and I have looked closely at the date and it seems that the emails are not sent as indicated, could it be?

2024-04-11 00:00:01 Info Running job ShadowAccountExpirationCleanupJob for server profile lam 2024-04-11 00:00:01 Debug Configuration options: 2024-04-11 00:00:01 Debug ShadowAccountExpirationCleanupJob_actionlJbrTgrdHAcyqTh: move 2024-04-11 00:00:01 Debug ShadowAccountExpirationCleanupJob_targetDNlJbrTgrdHAcyqTh: ou=NoUsers,dc=vera,dc=es 2024-04-11 00:00:01 Debug ShadowAccountExpirationCleanupJob_delaylJbrTgrdHAcyqTh: 1 2024-04-11 00:00:01 Debug Found 1 users to check. 2024-04-11 00:00:01 Debug Checking uid=mmartinezcaparros,ou=ayuntamiento,ou=Users,dc=vera,dc=es 2024-04-11 00:00:01 Debug Expiration on 2024-04-09 2024-04-11 00:00:01 Debug Action time on 2024-04-10 2024-04-11 00:00:01 Debug Performing action: move 2024-04-11 00:00:01 Info Moving uid=mmartinezcaparros,ou=ayuntamiento,ou=Users,dc=vera,dc=es to uid=mmartinezcaparros,ou=NoUsers,dc=vera,dc=es

2024-04-11 00:00:01 Info Running job ShadowAccountExpirationNotifyJob for server profile lam 2024-04-11 00:00:01 Debug Configuration options: 2024-04-11 00:00:01 Debug ShadowAccountExpirationNotifyJob_mailFromdnKz6b4P7kIMWwo: no-reply@vera.es 2024-04-11 00:00:01 Debug ShadowAccountExpirationNotifyJob_mailReplyTodnKz6b4P7kIMWwo: soporte@vera.es 2024-04-11 00:00:01 Debug ShadowAccountExpirationNotifyJob_mailBCCdnKz6b4P7kIMWwo: soporte@vera.es 2024-04-11 00:00:01 Debug ShadowAccountExpirationNotifyJob_mailSubjectdnKz6b4P7kIMWwo: LAM - Desactivación de cuenta 2024-04-11 00:00:01 Debug ShadowAccountExpirationNotifyJob_mailIsHTMLdnKz6b4P7kIMWwo: false 2024-04-11 00:00:01 Debug ShadowAccountExpirationNotifyJob_mailtextdnKz6b4P7kIMWwo: AYUNTAMIENTO DE VERA, La cuenta del usuario @@uid@@ será desactivada de forma automática., , FECHA DE EXPIRACION: @@EXPIRE_DATE_DDMMYYYY@@, NOMBRE y APELLIDOS: @@displayName@@, CODIGO DE PERSONAL: @@pager@@, , Recuerde que debe de entregar cualquier dispositivo que tenga asignado., , MOVIL CORPORATIVO: @@mobile@@, , Recuerde que debe de revisar los roles que tenga asignados., , ROLES: @@memberof@@ 2024-04-11 00:00:01 Debug ShadowAccountExpirationNotifyJob_mailNotificationPerioddnKz6b4P7kIMWwo: 1 2024-04-11 00:00:01 Debug ShadowAccountExpirationNotifyJob_mailCCdnKz6b4P7kIMWwo: personal@vera.es 2024-04-11 00:00:01 Debug Found 0 users to check.

gruberroland commented 5 months ago

The log shows that the a user was moved. The mail job then does not find any more users to check. Can it be that both jobs have their action set to similar times and the (too early) move is preventing the notification?

informaticavera commented 5 months ago

Maybe, can you think of a way to avoid this automatically?

gruberroland commented 5 months ago

The idea is that users are notified some time before their account is moved. E.g. then they can contact responsible people if this is an error. Looks like you want to send them more like an info message that their account expired now.

I suggest to configure the mail job to send notifications 1 day before the user is moved (or move after the account expires).