[midPoint] Email Notification

Jason Everling jeverling at bshp.edu
Fri Oct 24 19:13:50 CEST 2014


Thanks for this, it helps understand the general notifier a little better.
I am not wanting to get admin emails but I want the system to email the
students/faculty/staff when their accounts are provisioned.

Can I use a separate attribute besides the standard mail attribute.
Currently in Midpoint, all the users will be imported from our student
system and their official email address will be the provisioned mailbox
here but I am also mapping a secondary attribute labeled otherMailbox which
will contain their personal email address. This is the email that the
notification needs to go to since they would not have access to their
official school mailbox.

JASON


On Fri, Oct 24, 2014 at 2:08 AM, Ivan Noris <ivan.noris at evolveum.com> wrote:

> Hi Jason,
>
>
> > Ah ok, so the GeneralNotifier is more or less what I would use then so
> > I could customize the message and such, more testing and reading.
> >
> > I was taking a look at the code on github for those notifiers and I
> > think I could go in and change some stuff if I cannot get the general
> > notifier to work like I would like it.
> >
> > Would there happen to be any samples for the General Notifier
> > anywhere, maybe complex or one's that have the body? I see the simple
> > and others which I have gotten to work but I would like to customize
> > the body and such so the general might be what I am looking for.
>
> Everything I ever needed was doable using the "standard" notifiers. I'm
> using something like this:
>
> 1. notification when User/Org/Role object is added/modified/deleted.
> Sent to system administrators.
> 2. notification when User role is added - password is sent to system
> administrators.
> 3. notification when Resource object (account, group, whatever) is
> added/modified/deleted. Sent to system administrators.
> 4. notification when Resource Account is added - password is sent to
> system administrators.
>
> This covers all of my current requirements.
> All notifications are sent to system administrators, this could be
> changed of course, because the recipient expression is - well, expression.
> All notifications are sent using SMTP (SSL/TLS).
>
> Other-than-account support was added several months ago.
> Other-than-User support was added couple of weeks ago.
>
> I was experimenting with the General Notifier only before Org/Role
> notifications were supported. After Pavol has implemented that, I got
> rid of the General Notifier configuration.
>
> Is there any specific feature that cannot be configured using our
> standard notifiers (i.e. not the generalNotifier)?
>
> FYI there is a comment in https://jira.evolveum.com/browse/MID-2045 that
> might help you how the text in the General Notifier can be formatted.
> Before that was implemented, my configuration for notification of
> changes in OrgType was:
>
> <handler>
>    <generalNotifier>
>    <name>Notify system administrator for organization change</name>
>      <recipientExpression>
>         <value>iamnotify at example.com</value>
>      </recipientExpression>
>
>      <expressionFilter>
>          <script>
>          <code>
> import com.evolveum.midpoint.notifications.api.events.ModelEvent
> import com.evolveum.midpoint.xml.ns._public.common.common_3.OrgType
>
> (event instanceof ModelEvent && event.getFocusContext() != null
> &&
>
> OrgType.class.isAssignableFrom(event.getFocusContext().getObjectTypeClass()))
>          </code>
>      </script>
>      </expressionFilter>
>
>      <subjectExpression>
>        <script><code>
>
> tmpObject = 'Organization '
>
> if (event.isSuccess())
>     tmpText = "[IDM] SUCCESS: " + tmpObject + event?.getChangeType() + "
> operation succeeded"
> else if (event.isFailure())
>     tmpText = "[IDM] ERROR: " + tmpObject + event?.getChangeType() + "
> operation failed"
> else  tmpText = "[IDM] IN PROGRESS: " + tmpObject +
> event?.getChangeType() + " operation in progress"
>
> return tmpText
> </code></script>
>      </subjectExpression>
>
>      <bodyExpression>
>          <script>
>          <code>return 'This notification will be enhanced. Stay
> tuned.'</code>
>      </script>
>      </bodyExpression>
>
>      <transport>mail</transport>
>
>     </generalNotifier>
> </handler>
>
> As you see, the missing part at that time was the body of the email, it
> can now be configured using the example from the JIRA referenced above.
> But I believe that almost everything can now be configured using the
> standard notifiers. Unless you have some very interesting use case, of
> course.
>
> Regards,
> Ivan
>
> --
>   Ing. Ivan Noris
>   Senior Identity Management Engineer
>   evolveum.com
>   ___________________________________________
>            "Idem per idem - semper idem Vix."
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
>

-- 


CONFIDENTIALITY NOTICE:
This e-mail together with any attachments is proprietary and confidential; 
intended for only the recipient(s) named above and may contain information 
that is privileged. You should not retain, copy or use this e-mail or any 
attachments for any purpose, or disclose all or any part of the contents to 
any person. Any views or opinions expressed in this e-mail are those of the 
author and do not represent those of the Baptist School of Health 
Professions. If you have received this e-mail in error, or are not the 
named recipient(s), you are hereby notified that any review, dissemination, 
distribution or copying of this communication is prohibited by the sender 
and to do so might constitute a violation of the Electronic Communications 
Privacy Act, 18 U.S.C. section 2510-2521. Please immediately notify the 
sender and delete this e-mail and any attachments from your computer. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20141024/a1ea073e/attachment.htm>


More information about the midPoint mailing list