passage en cas proxy pour imapunread
This commit is contained in:
@ -585,6 +585,18 @@ parameters:
|
||||
noreply: %%ninegate_noreply
|
||||
%end if
|
||||
|
||||
%if %%is_defined('adresse_imap') or %%is_defined('adresse_ip_mail')
|
||||
active_imapunread: true
|
||||
%if %%is_defined('adresse_imap')
|
||||
imapundread_ip: %%adresse_imap
|
||||
%else
|
||||
imapundread_ip: %%adresse_ip_mail
|
||||
%end if
|
||||
%else
|
||||
active_imapunread: false
|
||||
imapunread_ip:
|
||||
%end if
|
||||
|
||||
# Doctrine Configuration
|
||||
doctrine:
|
||||
dbal:
|
||||
|
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
%if %%is_defined('adresse_imap') or %%is_defined('adresse_ip_mail')
|
||||
require_once('/var/www/html/ninegate/vendor/jasig/phpcas/CAS.php');
|
||||
require_once('configCAS/cas.inc.php');
|
||||
|
||||
// try to configure the phpCAS client
|
||||
session_name("imapunread");
|
||||
session_start();
|
||||
|
||||
if (__CAS_DEBUG){
|
||||
phpCAS::setDebug("/var/log/phpcas/phpcas-imap.log");
|
||||
}
|
||||
|
||||
$c= phpCAS::proxy(__CAS_VERSION, __CAS_SERVER, __CAS_PORT, __CAS_FOLDER, false);
|
||||
|
||||
phpCAS::setNoClearTicketsFromUrl();
|
||||
phpCAS::setNoCasServerValidation();
|
||||
phpCAS::forceAuthentication();
|
||||
|
||||
if (__CAS_LOGOUT){
|
||||
if(method_exists('phpCAS','EoleLogoutRequests')) phpCAS::EoleLogoutRequests(false);
|
||||
}
|
||||
|
||||
%if %%is_defined('adresse_imap')
|
||||
$a = phpCAS::serviceMail("{%%adresse_imap:993/imap/ssl/novalidate-cert}","imap://%%adresse_imap",0, $errc,$err, phpCAS::retrievePT('imap://%%adresse_imap',$t,$f));
|
||||
$unseen = imap_status($a, "{%%adresse_imap:993/imap/ssl/novalidate-cert}INBOX", SA_UNSEEN);
|
||||
%else
|
||||
$a = phpCAS::serviceMail("{%%adresse_ip_mail:993/imap/ssl/novalidate-cert}","imap://%%adresse_ip_mail",0, $errc,$err, phpCAS::retrievePT('imap://%%adresse_ip_mail',$t,$f));
|
||||
$unseen = imap_status($a, "{%%adresse_ip_mail:993/imap/ssl/novalidate-cert}INBOX", SA_UNSEEN);
|
||||
%end if
|
||||
|
||||
$count=$unseen->unseen;
|
||||
echo $count;
|
||||
%end if
|
||||
?>
|
Reference in New Issue
Block a user