Skip to navigation
Skip to content
La Documentation de JFGG
La Documentation de JFGG
Navigation
Accueil
Unix
Unix AIX
Commandes AIX
Droits des fichiers
Shell pour creer des Files Systems
Shell pour deplacer des LV et FS
Shell Presentation taille FS
SMIT
Menu CFT
Menu TSM
Menu ControlM
Linux
Commandes Linux
Droits des fichiers
Shell
Calendrier Annee
Cotation Bourse
Creer Page Wiki
Résultat Euro Millions et loto
Tester valeur numerique
Ftp Shell
Historique
Get Date Ant Post
Lister les jobs en anomalie sur $U
Seuil alerte FS
Acces POP3
Acces IMAP
Acces SMTP send mail
Lower to Upper and Vice Versa
Convert base 10 36 Hexa Dec Bin
Tableau de données
Merge fichiers
Expressions et Variables
Bilan Matin
TSM
Serveur
Dsmadmc cdes
Dsmadmc scripts
Client
Restauration
Sauvegarde
Scripts pour Gestion TSM
SMIT Menu_TSM
Utilitaires
AWK
Sed
Editeur Vi
SSH
SendMail
Introduction to text manipulation
Ordonnanceur Lanceur
ControlM
Controlm Serveur
ctm_menu
ctmpsm
ctmsec
ctmcreate
Cas Unknown
delete ajf
NewYear Calendars
Controlm Enterprise Manager
root_menu
Force stop DB EM
Création tables jobs
SMIT Menu_ControlM
$U Automic
Lister les jobs en anomalie sur $U
Commandes CLI $U V5.6
Commandes CLI $U V6.5
Etat Traitements
Programmation
Html
Caractères et balises
Diverses propriétées CSS
Divers javascript
css
Outils pour CMS Made Simple
Langage_C
Pgm Format Numc
Pgm Long Fic
Pgm ncurses read fic
Pgm read write
Pgm Tableau
Recuperer parametres HTML POST
Pgm Format Fic Binaire
Pgm read avec longueur
Shell
Php
Le Bonjour
Lecture fichier
Page gestion Incidents
Appel Bash
Java_Doc
Réseau
Utilitaires
Netstat
Snmp
Condense de commandes
Ftp
FireSSH
Acces Imap
Acces Pop3
CFT
Architecture type
Les principales commandes
Codes error CFT
Display Tableau awk xml
Extraire configuration
Exploiter accnt avec AWK
Exploiter accnt en C
Exploiter config CFT avec AWK
Generer fichier erreurs
Lister KO avec libelle
SMIT Menu_CFT
Jeux
Liens
Google gmail
Free zimbra
MSA mobilité
Recherche:
You are here:
Unix
»
Shell
»
Acces IMAP
Acces IMAP
Unix AIX
Linux
Shell
Calendrier Annee
Cotation Bourse
Creer Page Wiki
Résultat Euro Millions et loto
Tester valeur numerique
Ftp Shell
Historique
Get Date Ant Post
Lister les jobs en anomalie sur $U
Seuil alerte FS
Acces POP3
Acces IMAP
Acces SMTP send mail
Lower to Upper and Vice Versa
Convert base 10 36 Hexa Dec Bin
Tableau de données
Merge fichiers
Expressions et Variables
Bilan Matin
TSM
Utilitaires
Acces IMAP
Acces serveur messagerie IMAP
#!/usr/bin/sh #======================================================== # del mail dans Inbox # #======================================================== # #---------------- Fonctions AppelImap() { ( sleep 1 echo 1 login ${proxy_user} ${proxy_password} sleep 1 echo 1 select Inbox sleep 2 . ${TempCmd} sleep 1 echo . LOGOUT ) | telnet ${messimap} 143 } #---------------- Main . ~/.bash_profile set -xa TempCmd=/cygdrive/c/temp/tempcmdinbox_$$ #si vacance bypass put in A_FAIRE mettre date debut et fin #if test $(date +%Y%m%d) -lt 20160513 -o $(date +%Y%m%d) -gt 20160522 ;then cat << @EOFF #********************************************************************* #------- mails a mettre dans A_faire #********************************************************************* # # echo '3 uid SEARCH RETURN (COUNT all) or subject "sollicitation" from "service.manager@serveur.fr"' @EOFF cat << @EOFF > ${TempCmd} echo '3 uid SEARCH RETURN (COUNT all) subject "CreatIDF"' echo '3 uid SEARCH RETURN (COUNT all) subject "export Flux"' echo '3 uid SEARCH RETURN (COUNT all) FROM "serveur@serveur.fr"' echo '3 uid SEARCH RETURN (COUNT all) subject "Rappel d"' echo '3 uid SEARCH RETURN (COUNT all) subject "Pilotage RSA"' echo '3 uid SEARCH RETURN (COUNT all) subject "RIB CAISSE PIVOT"' echo '3 uid SEARCH RETURN (COUNT all) subject "RIB"' echo '3 uid SEARCH RETURN (COUNT all) subject "CCDP"' echo '3 uid SEARCH RETURN (COUNT all) subject "XXDISPATCH"' echo '3 uid SEARCH RETURN (COUNT all) subject "Erreur de notification"' echo '3 uid SEARCH RETURN (COUNT all) subject "DERS - "' echo '3 uid SEARCH RETURN (COUNT all) subject "Les sysouts des"' echo '3 uid SEARCH RETURN (COUNT all) subject "Mini BLANC"' @EOFF #-------- find to copy and flags Deleted AppelImap | awk '/* ESEARCH /{ if ( $7 != "" && $7 > 0 ) { print "echo '\''1 uid copy "$7" 1_A_Faire'\''" ; print "echo '\''3 uid store "$7" +Flags \\Deleted'\''" } }' > ${TempCmd}_ if test -s ${TempCmd}_ then #--------- Sup flags Deleted cat << @EOFF > ${TempCmd} . ${TempCmd}_ sleep 1 echo 1 EXPUNGE sleep 1 echo 1 CLOSE @EOFF AppelImap fi #fi cat << @EOFF #********************************************************************* #------- del sans copy vers trash #********************************************************************* # @EOFF cat << @EOFF > ${TempCmd} echo '3 uid SEARCH RETURN (COUNT all) FROM "noreply@noreply.fr"' echo '3 uid SEARCH RETURN (COUNT all) FROM "Admin. CFT"' echo '3 uid SEARCH RETURN (COUNT all) FROM "alerte@alerte.com"' @EOFF #-------- find to flags Deleted AppelImap | awk '/UID ALL/ { print "echo '\''1 uid store "$7" +Flags \\Deleted'\''" }' | sed 's/,$//' > ${TempCmd}_ if test -s ${TempCmd}_ then #--------- Sup flags Deleted cat << @EOFF > ${TempCmd} . ${TempCmd}_ sleep 1 echo 1 EXPUNGE sleep 1 echo 1 CLOSE @EOFF AppelImap fi cat << @EOFF #********************************************************************* #------- del by FROM #********************************************************************* # @EOFF cat << @EOFF | awk '{ gsub(" ","");printf("echo '\''1 uid SEARCH RETURN (COUNT all) FROM \"%s\"'\''\n",$0)}' > ${TempCmd} celine.in00ns@serveur.fr cocteau.n-t-92a@serveur.fr colette.in00nr@cnserveur.fr ctm-druon@serveur.fr dashboard@ip-label.net druon.n-t-92a@cnserveur.fr druon.root@cnserveur.fr exploitationnat_demandes.blf@serveur.fr giono.root@cnserveur.fr hades.gtwxfb@agora.fr helios.helios-cft@cnserveur.fr helios.xxprod@cnserveur.fr helios-mqm helios-gtwxfb hercule.oracle@cnserveur.fr hermes.oracle@cnserveur.fr info_flux_cft.grprec@serveur.fr lacan.cft@cnserveur.fr lassie.oracle@cnserveur.fr noreply.serveur@serveur.fr OracleGLDatab Productionadministrateur psyche-cft psyche.cft root@cnserveur root@seveur serveurCONTROLM service.manager@serveur.fr systunix.grpdif@seveur.fr utilisateurroot XFB-Gateway @EOFF #-------- find to copy and flags Deleted AppelImap | awk '/UID ALL/ { print "echo '\''1 uid copy "$7" Trash'\''" ; print "echo '\''1 uid store "$7" +Flags \\Deleted'\''" }' | sed 's/,$//' > ${TempCmd}_ if test -s ${TempCmd}_ then #--------- Sup flags Deleted cat << @EOFF > ${TempCmd} . ${TempCmd}_ sleep 1 echo 1 EXPUNGE sleep 1 echo 1 CLOSE @EOFF AppelImap fi cat << @EOFF #********************************************************************* #------- del by SUBJECT #********************************************************************* # @EOFF cat << @EOFF | awk '{ printf("echo '\''1 uid SEARCH RETURN (COUNT all) SUBJECT \"%s\"'\''\n",$0)}' > ${TempCmd} AEFI Alerte RNCPS Anomalies dans logs CFT Arch_recv_ok.ksh CR3-EIG- CTM DEAL DEBUT ERREUR Erreurlog Etat_Transferts.ksh FINERREUR FTN10 lacanRAAMSES Liste des flux MQ-SURVEILLANCE-TRIGGERS oaoaglux OCEAN OKCFT Plantage TNG01 RAPPORT RAPPORT PROD MATIN RAPPORT SIMU MATIN RECAPITULATIF DES INCIDENTS CONTROLM SIMU sur Framework Alerte_RNCPS @EOFF #-------- find to copy and flags Deleted AppelImap | awk '/UID ALL/ { print "echo '\''1 uid copy "$7" Trash'\''" ; print "echo '\''1 uid store "$7" +Flags \\Deleted'\''" }' | sed 's/,$//' > ${TempCmd}_ if test -s ${TempCmd}_ then #--------- Sup flags Deleted cat << @EOFF > ${TempCmd} . ${TempCmd}_ sleep 1 echo 1 EXPUNGE sleep 1 echo 1 CLOSE @EOFF AppelImap fi exit
#!/usr/bin/sh #----------------------------------------------------- # # del mail dans Sent tout < 300 jours # #----------------------------------------------------- # #---------------- Fonctions AppelImap() { ( sleep 1 echo 1 login ${proxy_user} ${proxy_password} sleep 1 echo 1 select Sent sleep 2 . ${TempCmd} sleep 1 echo . LOGOUT ) | telnet ${messimap} 143 } #---------------- Main . ~/.bash_profile set -xa TempCmd=/cygdrive/c/temp/tempcmdtrash_$$ #------- rechercher mail SENTBEFORE ${date} #date=$(LC_ALL=fr_EN date --date '250 day ago' +%d-%b-%Y|sed "s/\.//;s/é/e/") #date=$(LC_ALL=en_us_88591 date --date '250 day ago' +%d-%b-%Y|sed "s/\.//;s/é/e/") date=$(LC_ALL=en_EN date --date '250 day ago' +%d-%b-%Y ) cat << @EOFF > ${TempCmd} echo '3 uid SEARCH RETURN (COUNT all) SENTBEFORE ${date}' @EOFF #-------- find to flags Deleted AppelImap | awk '/* ESEARCH /{ if ( $7 != "" && $7 > 0 ) print "echo '\''3 uid store "$7" +Flags \\Deleted'\''" }' > ${TempCmd}_ test -s ${TempCmd}_ || exit #--------- Sup flags Deleted cat << @EOFF > ${TempCmd} . ${TempCmd}_ sleep 1 echo 1 EXPUNGE sleep 1 echo 1 CLOSE @EOFF AppelImap exit
#!/usr/bin/sh #----------------------------------------------------- # # del mail dans Trash tout < 5 jours # #----------------------------------------------------- # #---------------- Fonctions AppelImap() { ( sleep 1 echo 1 login ${proxy_user} ${proxy_password} sleep 1 echo 1 select Trash sleep 2 . ${TempCmd} sleep 1 echo . LOGOUT ) | telnet ${messimap} 143 } #---------------- Main . ~/.bash_profile set -xa TempCmd=/cygdrive/c/temp/tempcmdtrash_$$ cat << @EOFF #********************************************************************* #------- rechercher mail SENTBEFORE ${date} # plus certains FROM #********************************************************************* # @EOFF #date=$(date --date '5 day ago' +%d-%b-%Y|sed "s/\.//;s/é/e/") date=$(LC_ALL=en_EN date --date '5 day ago' +%d-%b-%Y) cat << @EOFF > ${TempCmd} echo '3 uid SEARCH RETURN (COUNT all) SENTBEFORE ${date}' echo '3 uid SEARCH RETURN (COUNT all) FROM "serveur@serveur.fr"' echo '3 uid SEARCH RETURN (COUNT all) FROM "Admin. CFT"' echo '3 uid SEARCH RETURN (COUNT all) FROM "alerte@alerte.com"' @EOFF #-------- find to flags Deleted AppelImap | awk '/* ESEARCH /{ if ( $7 != "" && $7 > 0 ) print "echo '\''3 uid store "$7" +Flags \\Deleted'\''" }' > ${TempCmd}_ test -s ${TempCmd}_ || exit #--------- Sup flags Deleted cat << @EOFF > ${TempCmd} . ${TempCmd}_ sleep 1 echo 1 EXPUNGE sleep 1 echo 1 CLOSE @EOFF AppelImap exit
Search avec UID dans variable
#!/bin/sh # # # find sollicitation dans email # #---------------- Fonctions AppelImap() { ( sleep 1 echo 1 login ${proxy_user} ${proxy_password} sleep 1 echo 1 select Inbox sleep 2 echo '3 uid SEARCH RETURN (COUNT all) subject "Sollicitation"' sleep 1 echo . LOGOUT ) | telnet ${messimap} 143 } AppelImapB() { ( sleep 1 echo 1 login ${proxy_user} ${proxy_password} sleep 1 echo 1 select 1_A_Faire sleep 2 echo '3 uid SEARCH RETURN (COUNT all) subject "Sollicitation"' sleep 1 echo . LOGOUT ) | telnet ${messimap} 143 } AppelImapC() { ( sleep 1 echo 1 login ${proxy_user} ${proxy_password} sleep 1 echo 1 select Inbox sleep 1 echo '3 uid SEARCH RETURN (SAVE) subject "Sollicitation"' sleep 1 echo '4 fetch $ (body envelope)' sleep 1 echo 1 select 1_A_Faire sleep 1 echo '3 uid SEARCH RETURN (SAVE) subject "Sollicitation"' sleep 1 echo '4 fetch $ (body envelope)' sleep 1 echo . LOGOUT ) | telnet ${messimap} 143 } #---------------- Main . ~/.bash_profile #set -xa TempCmd=/cygdrive/c/temp/tempcmdsolli_$$ #------- rechercher mail Sollicitation cat << @EOFF > ${TempCmd} echo '3 uid SEARCH RETURN (COUNT all) subject "Sollicitation"' @EOFF #-------- find UID #AppelImap | awk '/* ESEARCH /{ if ( $7 != "" && $7 > 0 ) print "Sollicitation UID : "$7 }' ## ## UiD=$( AppelImap | awk '/* ESEARCH /{ if ( $7 != "" && $7 > 0 ) print $7 }' ) ## test ! -z "${UiD}" && sh ~/mailinboxcorps.sh ${UiD} | awk '/
^ Top
Previous page:
Acces POP3
Page suivante :
Acces SMTP send mail