<div dir="ltr">thanks for your code. :)<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/2/13 Jan-Frode Myklebust <span dir="ltr"><<a href="mailto:janfrode@tanso.net" target="_blank">janfrode@tanso.net</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Wed, Feb 13, 2013 at 09:29:42AM +0100, Petr Spacek wrote:<br>
> ><br>
> >Yeah, I don't think we want to be in the business of installing and<br>
> >configuring an MTA. However, we should be able to detect if one is available<br>
> >and use it if it is. I think it would be reasonable to restrict it to LMTP<br>
> >with a Unix domain socket (most MTA's support this). Then our config would<br>
> >have a LMTP domain socket pathname, if that pathname exists and we can connect<br>
> >to it we use, if not we fallback to not generating any mail.<br>
><br>
> In meanwhile, it should be relatively simple to code script which<br>
> does ldapsearch from time to time and sends some e-mails. This<br>
> script doesn't have to run on the same server as IPA, only access to<br>
> LDAP and some MTA is required.<br>
<br>
</div>Crude, but a start:<br>
<br>
----------------------------------------------------------------<br>
#! /bin/bash<br>
ldapsearch -z 500 -x -h <a href="http://ipa1.example.net" target="_blank">ipa1.example.net</a> -b cn=users,cn=accounts,dc=example,dc=net "(krbPasswordExpiration<=$(date +%Y%m%d --date='+1 week')000000Z)" mail |grep ^mail|cut -d: -f2 |while read mail<br>

do<br>
        echo password expires in less than a week | mail -s "Password expires" $mail<br>
done<br>
----------------------------------------------------------------<br>
<br>
<br>
<br>
  -jf<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
Freeipa-users mailing list<br>
<a href="mailto:Freeipa-users@redhat.com">Freeipa-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/freeipa-users" target="_blank">https://www.redhat.com/mailman/listinfo/freeipa-users</a><br>
</div></div></blockquote></div><br></div>