<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
<!--}}}-->
Background: #fff
Foreground: #000
PrimaryPale: #8cf
PrimaryLight: #18f
PrimaryMid: #04b
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
/*{{{*/
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}

a {color:[[ColorPalette::PrimaryMid]];}
a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];}
a img {border:0;}

h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;}
h1 {border-bottom:2px solid [[ColorPalette::TertiaryLight]];}
h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}

.button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];}
.button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];}
.button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];}

.header {background:[[ColorPalette::PrimaryMid]];}
.headerShadow {color:[[ColorPalette::Foreground]];}
.headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];}
.headerForeground {color:[[ColorPalette::Background]];}
.headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];}

.tabSelected {color:[[ColorPalette::PrimaryDark]];
	background:[[ColorPalette::TertiaryPale]];
	border-left:1px solid [[ColorPalette::TertiaryLight]];
	border-top:1px solid [[ColorPalette::TertiaryLight]];
	border-right:1px solid [[ColorPalette::TertiaryLight]];
}
.tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];}
.tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];}
.tabContents .button {border:0;}

#sidebar {}
#sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];}
#sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];}

.wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];}
.wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;}
.wizard h2 {color:[[ColorPalette::Foreground]]; border:none;}
.wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];
	border:1px solid [[ColorPalette::PrimaryMid]];}
.wizardStep.wizardStepDone {background:[[ColorPalette::TertiaryLight]];}
.wizardFooter {background:[[ColorPalette::PrimaryPale]];}
.wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];}
.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid;
	border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];}
.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid;
	border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];}

.wizard .notChanged {background:transparent;}
.wizard .changedLocally {background:#80ff80;}
.wizard .changedServer {background:#8080ff;}
.wizard .changedBoth {background:#ff8080;}
.wizard .notFound {background:#ffff80;}
.wizard .putToServer {background:#ff80ff;}
.wizard .gotFromServer {background:#80ffff;}

#messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];}
#messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;}

.popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];}

.popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];}
.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}
.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}

.tiddler .defaultCommand {font-weight:bold;}

.shadow .title {color:[[ColorPalette::TertiaryDark]];}

.title {color:[[ColorPalette::SecondaryDark]];}
.subtitle {color:[[ColorPalette::TertiaryDark]];}

.toolbar {color:[[ColorPalette::PrimaryMid]];}
.toolbar a {color:[[ColorPalette::TertiaryLight]];}
.selected .toolbar a {color:[[ColorPalette::TertiaryMid]];}
.selected .toolbar a:hover {color:[[ColorPalette::Foreground]];}

.tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];}
.selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];}
.tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];}
.tagging .button, .tagged .button {border:none;}

.footer {color:[[ColorPalette::TertiaryLight]];}
.selected .footer {color:[[ColorPalette::TertiaryMid]];}

.error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];}
.warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];}
.lowlight {background:[[ColorPalette::TertiaryLight]];}

.zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];}

.imageLink, #displayArea .imageLink {background:transparent;}

.annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];}

.viewer .listTitle {list-style-type:none; margin-left:-2em;}
.viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];}
.viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];}

.viewer table, table.twtable {border:2px solid [[ColorPalette::TertiaryDark]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
.viewer td, .viewer tr, .twtable td, .twtable tr {border:1px solid [[ColorPalette::TertiaryDark]];}

.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
.viewer code {color:[[ColorPalette::SecondaryDark]];}
.viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];}

.highlight, .marked {background:[[ColorPalette::SecondaryLight]];}

.editor input {border:1px solid [[ColorPalette::PrimaryMid]];}
.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;}
.editorFooter {color:[[ColorPalette::TertiaryMid]];}
.readOnly {background:[[ColorPalette::TertiaryPale]];}

#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
#backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
#backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
#backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:alpha(opacity=60);}
/*}}}*/
/*{{{*/
* html .tiddler {height:1%;}

body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}

h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
h4,h5,h6 {margin-top:1em;}
h1 {font-size:1.35em;}
h2 {font-size:1.25em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.9em;}

hr {height:1px;}

a {text-decoration:none;}

dt {font-weight:bold;}

ol {list-style-type:decimal;}
ol ol {list-style-type:lower-alpha;}
ol ol ol {list-style-type:lower-roman;}
ol ol ol ol {list-style-type:decimal;}
ol ol ol ol ol {list-style-type:lower-alpha;}
ol ol ol ol ol ol {list-style-type:lower-roman;}
ol ol ol ol ol ol ol {list-style-type:decimal;}

.txtOptionInput {width:11em;}

#contentWrapper .chkOptionInput {border:0;}

.externalLink {text-decoration:underline;}

.indent {margin-left:3em;}
.outdent {margin-left:3em; text-indent:-3em;}
code.escaped {white-space:nowrap;}

.tiddlyLinkExisting {font-weight:bold;}
.tiddlyLinkNonExisting {font-style:italic;}

/* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */
a.tiddlyLinkNonExisting.shadow {font-weight:bold;}

#mainMenu .tiddlyLinkExisting,
	#mainMenu .tiddlyLinkNonExisting,
	#sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
#sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}

.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 0 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0 1em 1em; left:0; top:0;}

.siteTitle {font-size:3em;}
.siteSubtitle {font-size:1.2em;}

#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}

#sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
#sidebarOptions {padding-top:0.3em;}
#sidebarOptions a {margin:0 0.2em; padding:0.2em 0.3em; display:block;}
#sidebarOptions input {margin:0.4em 0.5em;}
#sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
#sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
#sidebarOptions .sliderPanel input {margin:0 0 0.3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}

.wizard {padding:0.1em 1em 0 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0 0; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0;}
.wizardFooter .status {padding:0 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em;}

#messageArea {position:fixed; top:2em; right:0; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
.messageToolbar {display:block; text-align:right; padding:0.2em;}
#messageArea a {text-decoration:underline;}

.tiddlerPopupButton {padding:0.2em;}
.popupTiddler {position: absolute; z-index:300; padding:1em; margin:0;}

.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
.popup .popupMessage {padding:0.4em;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0;}
.popup li.disabled {padding:0.4em;}
.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}

.tabset {padding:1em 0 0 0.5em;}
.tab {margin:0 0 0 0.25em; padding:2px;}
.tabContents {padding:0.5em;}
.tabContents ul, .tabContents ol {margin:0; padding:0;}
.txtMainTab .tabContents li {list-style:none;}
.tabContents li.listLink { margin-left:.75em;}

#contentWrapper {display:block;}
#splashScreen {display:none;}

#displayArea {margin:1em 17em 0 14em;}

.toolbar {text-align:right; font-size:.9em;}

.tiddler {padding:1em 1em 0;}

.missing .viewer,.missing .title {font-style:italic;}

.title {font-size:1.6em; font-weight:bold;}

.missing .subtitle {display:none;}
.subtitle {font-size:1.1em;}

.tiddler .button {padding:0.2em 0.4em;}

.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
.isTag .tagging {display:block;}
.tagged {margin:0.5em; float:right;}
.tagging, .tagged {font-size:0.9em; padding:0.25em;}
.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
.tagClear {clear:both;}

.footer {font-size:.9em;}
.footer li {display:inline;}

.annotation {padding:0.5em; margin:0.5em;}

* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0 0.25em; padding:0 0.25em;}
.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}

.viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
table.listView {font-size:0.85em; margin:0.8em 1.0em;}
table.listView th, table.listView td, table.listView tr {padding:0 3px 0 3px;}

.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
.viewer code {font-size:1.2em; line-height:1.4em;}

.editor {font-size:1.1em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0; font-size:.9em;}
.editorFooter .button {padding-top:0; padding-bottom:0;}

.fieldsetFix {border:0; padding:0; margin:1px 0px;}

.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
.zoomer div {padding:1em;}

* html #backstage {width:99%;}
* html #backstageArea {width:99%;}
#backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0; right:0;}
#backstageButton a {padding:0.1em 0.4em; margin:0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; width:90%; margin-left:3em; padding:1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em;}
#backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;}

.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
/*}}}*/
/***
StyleSheet for use when a translation requires any css style changes.
This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which need larger font sizes.
***/
/*{{{*/
body {font-size:0.8em;}
#sidebarOptions {font-size:1.05em;}
#sidebarOptions a {font-style:normal;}
#sidebarOptions .sliderPanel {font-size:0.95em;}
.subtitle {font-size:0.8em;}
.viewer table.listView {font-size:0.95em;}
/*}}}*/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #backstageArea {display: none !important;}
#displayArea {margin: 1em 1em 0em;}
noscript {display:none;} /* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
}
/*}}}*/
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::EditToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser excludeLists'></span></div>
<!--}}}-->
To get started with this blank [[TiddlyWiki]], you'll need to modify the following tiddlers:
* [[SiteTitle]] & [[SiteSubtitle]]: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* [[MainMenu]]: The menu (usually on the left)
* [[DefaultTiddlers]]: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
These [[InterfaceOptions]] for customising [[TiddlyWiki]] are saved in your browser

Your username for signing your edits. Write it as a [[WikiWord]] (eg [[JoeBloggs]])

<<option txtUserName>>
<<option chkSaveBackups>> [[SaveBackups]]
<<option chkAutoSave>> [[AutoSave]]
<<option chkRegExpSearch>> [[RegExpSearch]]
<<option chkCaseSensitiveSearch>> [[CaseSensitiveSearch]]
<<option chkAnimate>> [[EnableAnimations]]

----
Also see [[AdvancedOptions]]
<<importTiddlers>>
Type the text for '(built-in shadow tiddler)'
*Réinstaller WebFwLog
*Detecter les erreurs d'envoi SMS
*decrire les accès VPN
*fiches CEPC
*decrire musique hifiberry/squeezelite/lms

*nextcloud SSO
*Mettre à jour BIRT
*munshine : revoir les scripts openvpn (numerotation des interfaces)
*documenter ''fail2ban''
*Supervision Journal
*Supervision Unison
*IP V6
*Revoir le plugin Nagios Mail (suppression des mails de test)
*Lufi sur axle
*Scipt interconnexion
*docker compose
*Synchro des calendriers
L'image de fond de la page d'accueil change chaque jour de façon aleatoire.
Les images sont stockées dans le répertoire ''/var/www/html/fond'
La liste des images est stockée dans la base ''backimg.db''.
Cette base est editable sous Windows via l'appli ''DB Browser for Sqlite''
<<options>>
*Carte mère
**Asus
**[[P6t deluxe v2|http://chatillon.metivier.fr/Carte%20Meres/f4398_p6t_deluxe_v2.pdf]]
**Socket LGA1366
**6 x 4 Go ~DDR3 2000 (24go)
*CPU
**[[Intel Core I7 920|https://ark.intel.com/content/www/fr/fr/ark/products/37147/intel-core-i7-920-processor-8m-cache-2-66-ghz-4-80-gt-s-intel-qpi.html]] ([[Westmere/Bloomfield|https://en.wikichip.org/wiki/intel/core_i7]])
**CPU Mark : 2,711
**Tmax boitier: 67.9°C
*Alim
**[[Corsair HX520W|http://chatillon.metivier.fr/Carte%20Meres/hx520w.pdf]]
*BIOS
**Révision : AMI 0404 19/11/2015
*Mémoire
**3 x 4 Go ~DDR3 (~BLT4G3D1608DT1TX0.16FM)
*Disque

*Réseau
**Realtek RTL8111/8168 (Motherboard)
***1Gbs
*Carte mère
**Gigabyte
**[[EP45-UD3LR|http://chatillon.metivier.fr/Carte%20Meres/motherboard_manual_ga-ep45-ud3l(r)_e(1).pdf]]
**Socket : ~LGA775
**4 ~DDR2 1366 (16Go)
*CPU
**Intel Core 2 Quad Q6600 2,4 Ghz
**CPU Mark : 1,763
**[[Specifications|https://ark.intel.com/content/www/us/en/ark/products/29765/intel-core2-quad-processor-q6600-8m-cache-2-40-ghz-1066-mhz-fsb.html]]
**Bogomips : 4x4800
**GPU Geforce 8800 GTS (G80)
*Mémoire
** 4 x 2 Go ~DDR2 800Mhz
*** 2 x [[F2-6400CL4D-4GBPK G.SKILL|https://www.gskill.com/search?keywords=f2-6400cl4d-4gbpk]]
*** 2 x 2G DDR2 800 Trancend
*Réseau
**Realtek RTL8111/8168 (Motherboard)
***1Gbs
*[[Hot Swap]]
*Carte mère
**Gigabyte
**[[GA-E7AUM-DS2H|http://chatillon.metivier.fr/Carte%20Meres/ga-e7aum-ds2h_e.pdf]]
**Socket : ~LGA775
**4 ~DDR2 1066 (16Go)
*CPU
**Intel Core 2 DUO E7300 2,66 Ghz
**CPU Mark : 929
**Bogomips : 2x 5333
**GPU Geforce 9400
*Mémoire
**2 x 2Go + 2 x 1 Go ~DDR2 800Mhz
*Disque
** sda : WDC WD20EZRZ-00Z5HB0 - 2To
** sdb : WDC WD20EARX-00PASB0 - 2 To
** sdc : TOSHIBA DT01ACA300 - 3 To
** sdd : TOSHIBA MQ01ABD100 - 1To
** sde : TOSHIBA DT01ACA200 - 2 To
*Réseau
**Realtek RTL8111/8168 (Motherboard)
***1Gbs
** Realtek ~RTL-8169
***1Gbs
**Realtek ~RTL-8139
***100Mbs
!Equipements
*Un ONT Huawei
*Un switch/router RB951
*Le serveur Linux
*Un switch 5 ports
*Le switch et le serveur sont connectés par un Trunk, contenant les vlans 100, 832, 838 & 840
!Accès Internet
*En mode DHCP, géré par le serveur Linux, sur le Lan 832, via le [[RB951]]
!Lan
Le Lan est constitué :
*Un switch GigaBytes 5 ports
*Le bridge ''br0'' du serveur, constitué des ports
**eth0
**eth1.100
*Le bridge ''bridge1'' sur le [[RB951]], constitué des ports :
**vlan100_2
**eth3
**eth4
**wlan1
*Les bridges br0 (serveur) et bridge1 (RB951) sont reliés par le vlan 100
!TV
*Deux vlans :
**''838'' pour le zapping
**''840'' pour le flux TV
*Géré par le bridge ''br1'' sur le serveur Linux, constitué des ports :
**eth1.838
**eth1.840
!Fichiers :
- /etc/iftab
- /etc/modprobe.conf
- /etc/udev/rules.d/70-persistent-net.rules
- [[/etc/ifplugd/ifplugd.action]]
*Installer les packages :
**amavisd-new
**spamassassin (doit etre installé par amavis)
**clamav
**clamd
*--Copier le fichier {{{/var/lib/amavis/.spamassassin/user_prefs}}}--
*Copier le fichier {{{/etc/amavisd/amavisd.conf}}}
<<slider aqaracube [[aqaracube]] "Aqara Cube" "Voir la photo">>
[img[reseau_metivier.jpg]]
!Systèmes Client/Server
*[[LogitechMediaServer (squeezeboxserver)|https://www.mysqueezebox.com/index/Home]]
**[[Interface Web|http://metivier.fr:9001]]
**Client Windows
***[[SqueezeLite-X|https://apps.microsoft.com/store/detail/squeezelitex/9PBHMTNP9037?hl=fr-fr&gl=fr]]
**Client Raspberry
***[[hifiberryos|https://www.hifiberry.com/hifiberryos/]] gète le DSP
***[[piCprePlayer|https://picoreplayer.org/]] (inclut ''squeezelite'')
***[[JiveLite|https://docs.picoreplayer.org/components/jivelite/]] : controle squezzelite à partir d'un touchscreen
*[[Roon|https://roonlabs.com/]]
**Client Raspberry Pi : [[ropieee|https://ropieee.org/]]
**Client multi : [[hqplayer|https://www.signalyst.com/consumer.html]] & [[naa|https://docs.sotm-audio.com/doku.php?id=en:hqplayer_naa]]
**Payant
!Divers
*iPhone : [[HouseCurve|https://housecurve.com/]] - Tuning audio avec iPhone
*FusionDSP : Plugin DSP pour VolumeIO
*[[CamillaDSP|https://henquist.github.io/0.4.2/]] [[Tutoriel|https://www.audiosciencereview.com/forum/index.php?threads/rpi4-camilladsp-tutorial.29656/]]
! Autres Players
*[[VolumeIO|https://volumio.com/en/]]
**Incovénients : Payant pour avoir les fonctionnalités intéressantes
*[[moOde|https://moodeaudio.org/]]
**Non testé : trop lent sur rpi 1B
*[[Audiolinux|http://www.audio-linux.com/]]
**Non testé
*symphonic mpd
**''Bricolage!''
*[[runeaudio|https://www.runeaudio.com/]]
**Inconvenient
***Pas de plugins Deezer
***Pas de controlleur IOS
*pi musicbox
**Plus maintenu
*jriver id
**Payant
*GentooPlayer 

!Comparaisons
*[[1|https://www.superbestaudiofriends.org/index.php?threads/poll-which-pi-audio-software-do-you-use.11738/page-2]]
*[[2|http://techroadtrip.com/audio-software/volumio-vs-moode-vs-picoreplayer/]]
!!Principe
*Un type d'authentification : ''Basic''
*Deux Fournisseurs d'authentification :
**''dbd''
**''external'' (installation du package {{{apache-mod_authnz_external}}})
!!Configuration
*mod_authn_dbd
**Utilise la base Mysql ''auth'' (créée pour l'occasion)
**Dans ''httpd.conf'', ajouter '':DBDriver mysql''
**Pour chaque site/page à protéger, ajouter dans les directives d'authentification (par Directory ou par Localisation) :
{{{
               AuthBasicProvider dbd 
               AuthDBDUserPWQuery "SELECT password AS password FROM users WHERE username = %s "
}}}
*mod_authn_external
**Utilise l'authentification système (/etc/passwd)
**Pour chaque site/page à protéger, ajouter dans les directives d'authentification (par Directory ou par Localisation) :
{{{
               AuthBasicProvider external
               AuthExternal checkEtcPasswd
}}}
!!Mise en oouvre
*Redirection http vers https
**Sauf : munshine.metivier.fr
*Répertoire sans authentification :
**divers
**auth
**img
**crl (nico)
!!SSO
!!!Rouncube
via le plugin ''http_authentication''
!!Ubooquity
*URL : [[https://vaemendis.net/ubooquity/]]
*Database
**Type : ''H2''
**Accès : Depuis Windows, double clic sur {{{h2-1.4.193}}}
*Accès
**URL : http://bievres.metivier.fr:2202--
**Admin : http://bievres.metivier.fr:2203/admin--
!!!Komga
*URL : https://komga.org/guides/
*Database
**Type : SQLite
**Accès : DB Browser for SQLite
*Accès
**URL : http://bievres.metivier.fr:8080
Site : https://eclipse.github.io/birt-website/

*Installation Tomcat :
**java
**tomcat
**tomcat-webapps
**tomcat-admin-webapps
*Paramétrage Manager
**modifier ''~META-INF/context.xml'' pour autoriser l'accès à partir du réseau
*Installation Birt Run-time
*Recopier le contenu du répertoire {{{/var/lib/tomcat/webapps}}}
!!!Alias & Catégories
Lors de l'insertion des opérations (en provenance d'un fichier ofx) dans la base, le libellé normalisé (caractères 11 à 25 du mémo) est recherché dans la table alias
S'il est trouvé, la catégorie est reprise du dernier enregistrement avec le même destinataire
Sinon, un alias est rajouté dans la table, et la catégorie est mise à 'Divers'
!!!Insertion d'un fichier d'opérations (.ofx)
*traité par ''uploadofx.php''
*uploadofx.php lance la commande ''ofx2sql''
*ofx2sql génère le fichier ''ofx.sql''
*uploadofx.php charge ''ofx.sql''
*ofx.sql lance la procédure ''insert_ofx''
Les opérations sont chargées dans la table ''opx''

!!!Traitement d'un relevé
*Traité par ''uploadreleve.php''
*uploadreleve.php lance la commande ''pdftotext''
*pdftotext génére le fichier ''rel.sql''
*uploadreleve.php charge ''rel.sql''
*rel.sql charge les opérations du relevé dans la table ''releve''
*rel.sql lance la procedure de rapprochement ''consolider''

!!!Controles fait par la procédure ''consolider'':
*Dans la table releve : solde fin = solde debut + somme montant des operations
*Dans la table op 
**rapprochement des opérations du relevé avec le couple date/montant
**calcul de la somme des montants des opérations rapprochées
**comparaison avec la somme des opérations du relevé
*Si ''KO'' différenciation d'un nombre d'opérations différent de celui du relevé
*Un ONT Huawei
*La Bbox
*Le serveur Linux (axle)
*Le raspberry (brasp)
*Un switch 5 ports
*Les PCs, Tablettes, Smartphones
!!EFI
*Rendre un disque bootable :
Executer ''efibootmgr'' : {{{efibootmgr --create --disk=/dev/sdX --part=1 --label="LABEL" --loader='EFI\mageia\grubx64.efi'}}}
!!Structure
*Chacun des 4 disques contient une partition EFI (sd''X''1)
*Le système est installé sur deux RAID devices :
**munshine
***/dev/md0
***/dev/md4
**axle
***/dev/md0
***/dev/md3
*Suivant le système sélectionné, le fichier {{{grub2/grub.cfg}}} permet de choisir :
**Le device RAID qui sera monté sur la racine (md0 ou md3/4)
**Le noyau à charger
*Attention
** Lors d'une recopie de mdx vers mdy (ou plus généralement d'une partition sur une autre), l'UUID du fs contenu est également recopié.
**Pour éviter un doublon, il faut donc le noter avant la recopie, et le repositionner ensuite via ''tune2fs -U <uuid>''
!!Création d'un fichier image
*Pour la version d'OS courante : {{{dracut (--force)}}}
*Pour une version d'OS particulière : {{{dracut --kver <version>}}}
**ex : {{{dracut --kver 5.10.12-desktop-1.mga7}}}
!!Extraire le contenu d'un ''initrd''
*Executer la commande {{{binwalk /boot/initrd.......img}}}
{{{
DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             ASCII cpio archive (SVR4 with no CRC), file name: ".", file name length: "0x00000002", file size: "0x00000000"
112           0x70            ASCII cpio archive (SVR4 with no CRC), file name: "early_cpio", file name length: "0x0000000B", file size: "0x00000002"
240           0xF0            ASCII cpio archive (SVR4 with no CRC), file name: "kernel", file name length: "0x00000007", file size: "0x00000000"
360           0x168           ASCII cpio archive (SVR4 with no CRC), file name: "kernel/x86", file name length: "0x0000000B", file size: "0x00000000"
484           0x1E4           ASCII cpio archive (SVR4 with no CRC), file name: "kernel/x86/microcode", file name length: "0x00000015", file size: "0x00000000"
616           0x268           ASCII cpio archive (SVR4 with no CRC), file name: "kernel/x86/microcode/GenuineIntel.bin", file name length: "0x00000026", file size: "0x00007800"
31484         0x7AFC          ASCII cpio archive (SVR4 with no CRC), file name: "TRAILER!!!", file name length: "0x0000000B", file size: "0x00000000"
31744         0x7C00          gzip compressed data, maximum compression, from Unix, last modified: 1970-01-01 00:00:00 (null date)
1113259       0x10FCAB        xz compressed data
6204496       0x5EAC50        xz compressed data
9548896       0x91B460        CRC32 polynomial table, little endian
10982053      0xA792A5        xz compressed data
11641334      0xB1A1F6        xz compressed data
}}}
*Extraire le gzip : {{{dd if= /boot/initrd.......img of=rd.gz bs=31744 skip=1}}} (skip=31744 : pour sauter le microcode)
*Extraire l'archive : {{{gunzip -c rd.gz | cpio -i}}}
!!Recréer un initrd
https://www.debian-fr.org/t/modifier-un-initrd/9573
*Recreer le gzip : {{{find | cpio -H newc -o | gzip -c > ../initrd.partial.gz}}}
*Extraire le microcode {{{dd if= /boot/initrd.......img of=microcode bs=31744 count=1}}}
*Recreer l'initrd : {{{cat microcode initrd.partial.gz > initrd.new}}}
--!!Grub 1
* Correspondance sdAB hdXY
X : a->0, b->1, c->2, d->3
Y = B-1
Ex : sdb3 = (hd1,2)
*Pour retrouver, chaque partition sdX1 contient l'ID du disque, que l'on peut retrouver dans grub avec la commande find :
{{{
[root@munshine ~]# grub
Probing devices to guess BIOS drives. This may take a long time.


    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename. ]
grub> find /_dt300
find /_dt300
 (hd2,0)
grub>
}}}--
!!Grub 2
*https://www.gnu.org/software/grub/manual/grub/grub.html
*Monter la partition de EFI sur ''/boot/efi''
*Installation sur un disque : {{{grub2-install /dev/sdx}}}
*Création de la config : {{{grub2-mkconfig -o /boot/grub2/grub.cfg}}}
!!br-255e076d7198
*créé par 
!!docker0
*créé par l'installation de ''docker''
!!virbr0
*créé par l'installation de ''kvm''?
<<slider cc2531 [[cc2531]] "CC2531" "Voir la photo">>
[[Généralités]]
[[Structure]]
[[WebApp]]
*Localisation de la bibliothèque : {{{/Data/Epubs}}}
*Application installée sur le serveur et sur gus
!Fournisseur : [[SSL2buy|https://www.ssl2buy.com]]
*Autorité de certification : ''GlobalSign''
*Autorité intermédiaire : ''AlphaSSL''
!Emplacement
{{{/root/ssl2buy}}}
!Contenu
|AlphaSSL.crt| Certificat de l'autorité intermédiaire |
|AlphaSSLroot.crt| Concaténation du certificat de GlobalSign et d'AlphaSSL |
|Globalsign.crt| Certificat de GlobalSign |
|metivier.crt| Certificat *metivier.fr |
|metivier.csr| Certificate signing request |
|metivier.key| Clé secrète |
|plex.crt| Pour PLEX : Concaténation de metivier.key, metivier.crt, AlphaSSL.crt et GlobalSign.crt |
|plex.pfx| Certificat u format PKCS 12 (voir [[Plex]]) |
|root.crt| ??? |
|server.pem| pour Postfix : Concaténation de metivier.crt AlphaSSL.crt et GlobalSign.crt |
!Outils
*https://www.kinamo.fr/fr/support/faq/commandes-openssl-utiles
*En cas d'erreur firefox ''ssl_error_rx_record_too_long''
**	{{{openssl s_client -connect yourdomain.tld:*port*}}}
!Utilisation
*Apache
**Dans un fichier de configuration (/etc/httpd/conf/sites/00_default_ssl_vhosts.conf)
{{{
   SSLCertificateFile /root/ssl2buy/metivier.crt
   SSLCertificateKeyFile /root/ssl2buy/metivier.key
   SSLCertificateChainFile /root/ssl2buy/AlphaSSLroot.crt
}}}
*Postfix
**Dans /etc/postfix/main.cf
{{{
smtpd_tls_key_file = /root/ssl2buy/metivier.key
smtpd_tls_cert_file = /root/ssl2buy/server.pem
}}}
*Dovecot
**Dand /etc/dovecot/conf.d/10-ssl.conf
{{{
ssl_cert = </root/ssl2buy/server.pem
ssl_key = </root/ssl2buy/metivier.key
}}}
*Home Assistant
**Dans /etc/homeassistant/ssl, copier ''metivier.key'' et ''metivier.crt''
{{{

}}}
*Plex
**https://www.nodinrogers.com/post/2022-06-01-customer-ssl-cert-in-plex/
**Localisation : ''/Data/plexmediaserver/plex.pfx'' (défini dans "Réglages/Réseau")

*Jellyfin

*Tomcat
*mosquito
*Tautulli
*Deluged/Deluge-web???

!GLOBAUX
!!Fournisseur
--[[Networkin4all|https://www.networking4all.com/fr]]--
[[SSL2BUY|https://www.ssl2buy.com]] : Un certificat Wildcard pour tout le domaine ''metivier.fr''
!!Contenu
*--''~DigiCertGlobalRootCA.cer'' : Autorité de certification racine--
*--''~RapidSSLRSACA2018.cer'' : Autorité fournisseur du certificat--
*--''mx-metivier-fr.cer'' : Certificat ''mx.metivier.fr''--
*--''server.cer'' : concaténation de  mx-metivier-fr.cer et ~RapidSSLRSACA2018.cer--
''~AlphaSSL.crt'' : Certificat intermédiaire
''~AlphaSSLroot.crt'' : Concaténation des Certificats Intermédiaire er racine
''~GlobalSign.crt'' : Certificat racine
''metivier.crt'' : certificat wildcard pour metivier.fr
''metivier.csr'' : Certificate Signing Request
''metivier.key'' : Clé de cryptage
''plex.crt'' : concaténation de la clé de metivier.fr, du certifcat metivier.fr, du certificat ~AlphaSSL et du certificat globalSign
''plex.pfx'' : certificat ''pkcs12'' pour ''plex'' généré à partir de ''plex.crt''
''server.pem'' : concatenation des certificats de metivier.fr, AlphaSSL et GlobalSign
!!Emplacements des certificats :
*--''mx.metivier.fr'' : {{{/etc/postfix/cert}}}--
*--''chatillon.metivier.fr'' : {{{/root/certificat}}} recopié pour home-assistant dans {{{/etc/homeassistant/ssl}}}--
*''*.metivier.fr'' : {{{/root/ssl2buy}}}
*--Autres : {{{/etc/pki/tls}}}--
!AUTOSIGNES
!!Fournisseur
--CACERT--
!!Emplacement--
   --{{{/root/cacert}}}--
!!Equipements
*Un ONT Huawei
*La Bbox
*Le serveur Linux (munshine)
*Le raspberry (crasp) fournissant les services ''Ntp'', ''Dhcp'' & ''DNS''
*Un switch 5 ports
** Port 1 : Bbox
** Port 2 : Axle
** Port 3 : Brasp
** Port 4 : gus
** Port 5 : switch/router
*Les PCs, Tablettes, Smartphones
!!Secours
*Interface : {{{enp0s4f1u6}}}
*Un smartphone en mode USBTethering, connecté en USB au serveur, assure la connexion Internet en cas de coupure de la fibre
*Le routage par défaut étant modifié dans la configuration dhcp du raspberry, Il faut donc renouveler le bail sur tous les équipements connectés
Model : Sierra Wireless AirCard 319U

Ajouter le fichier ''/etc/udev/rules.d/usb-modem.rules'', contenant :
{{{KERNEL=="ttyUSB*",ATTRS{idVendor}=="1199",ATTRS{idProduct}=="68a3",ENV{ID_USB_INTERFACE_NUM}=="03",SYMLINK+="319U"}}}
Commandes Systèmes
*Disks
**df
**fdisk
**lsblk
**cfdisk
**parted
**sfdisk
**hdparm -I
**hwinfo \-\-disk
*Mémoire
**free
*Command: udevadm info
   Liste les Infos sur tous les devices
*Lister les process générant la charge
    {{{ps -eo s,pid,cmd,user | grep ^[RD] | sort | uniq -c | sort -nbr | head -20}}}
*Command: lscpu
    List available cpus and their caracteristics
    Not available on older distribution
*Command: lshal
    Require HAL (Hardware Abstraction Layer) to be installed
    List all hardware visible by HAL
*Command: lshw
    Available on Ubuntu based distributions by default, and Debian in the main repo
    Available in the Fedora repositories
    Uses many inputs to detect all hardware: Kernel, HAL, DMI, etc.
    As a neat ‘-html’ switch that generates hardware reports
    Check more on this page
*Command: lspci
    Standard command
    List all hardware connected to the PCI bus as detected by the kernel
*Command: lsusb
    Standard command
    List all hardware connected to the USB buses as detected by the kernel
*Command: dmidecode
    Standard command
    Get the source information from the DMI (a kind of BIOS interface)
    List all hardware as reported by the DMI interface
*Lister les process à l'état ''wait''
    {{{for x in `seq 1 1 10`; do ps -eo state,pid,cmd | grep "^D"; echo "----"; sleep 5; done}}}
{{{while true; do date; ps auxf | awk '{if($8=="D") print $0;}'; sleep 1; done}}}
{{{
port 1194
proto udp
dev tun-sync
ca ca.crt
cert axle.crt
key axle.key  # This file is secret
dh dh2048.pem
server 192.168.2.0 255.255.255.0
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
log         synchro.log
verb 5
mute 10
}}}
{{{
client
dev tun-sync
proto udp
remote bievres.metivier.fr 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert chatillon.crt
key chatillon.key
ns-cert-type server
comp-lzo
verb 3
log bievres.log
script-security 2
}}}
*Paramétrage du raspberry
**Utilisation de ''minicom''
**Périphérique local : ''/dev/ttyAMA0''
**Périphérique Serveur : ''/dev/ttyS0''
**Paramétrage ''115200 8N1''
*Paramétrage du serveur pour le boot
**/boot/grub2/grub.cfg
{{{
...
serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
terminal_input console serial
terminal_output console serial
...
linux16 /vmlinuz-5.10.12-desktop-1.mga7 root=UUID=7bc7dc40-66b5-4263-995f-be406c51c7e3 ro console=tty0 console=ttyS0,115200n8 noiswmd audit=0 vga=791
...
}}}
*Paramétrage du serveur pour le login
**systemctl enable getty@ttyS0
**systemctl start getty@ttyS0
*Répertoires
**''Jirafeau'' : Transfert de fichiers
**''SFEbooks'' : Livres de SF
**''Ubooquity'' : BDs
**''apps'' : Applis ios
**''auth'' : Authentification Web 
**''Carte Meres'' : utilisé par le wiki
**''bank'' : Gestion de compte bancaire
**''cepc'' : copie du site du cepc
**''cops'' : Bibliotyhèque Epubs
**''crl'' : Pour le boulot de Nico
**''divers'' : Infos affichées via le lien de la page d'accueil
**''gallon'' : Photos cousinades
**''graph'' : Graphes des stats systèmes
**''graph'' : Graphes système (rrdtool)
**''photos'' : Affichage des photos sur smartphone
**''poisson'' : copie du site des cousinades ''poisson'' (sur le site du cepc)
**''sms'' : envoi de SMS
**''stats'' : Statistiques WEB
**''sylvestre'' : photos des réveillons
**''vin'' : Web app cave
**''wup'' : configuration blacklist mail
*Liens
**''webfwlog'' : Logs firewall
**''wiki'' : Wiki
*Fichiers
**''accueil.php'' : ???
**''adminer.php'' : Gestionnaire de bdd MySql
**''favicon.ico'' : standard HTML
**''index.php'' : Page d'accueil
**''info.php'' : Affichage de la config php
**''login.php'' :  Test d'authentification par formulaire
**''mtable.php'' : Webapp table de multiplication
**''rl.php'' : SSO Rainloop
https://lea-linux.org/documentations/Installer_DKIM-SPF_sous_Postfix
https://blog.microlinux.fr/postfix-spf-dkim-dmarc-centos-7/

v=DMARC1;p=reject;sp=reject;pct=100;adkim=r;aspf=r;fo=1;ri=86400;ruf=mailto:dmarc@metivier.fr;rf=afrf

|!Tag|!TagValue|!Name|!Description|
|v|DMARC1|Version|Identifies the record retrieved as a DMARC record. It must be the first tag in the list.|
|p|none|Policy|Policy to apply to email that fails the DMARC test. Valid values can be 'none', 'quarantine', or 'reject'.|
|sp|none|Sub-domain Policy|Requested Mail Receiver policy for all subdomains. Valid values can be 'none', 'quarantine', or 'reject'.|
|pct|100|Percentage|Percentage of messages from the Domain Owner's mail stream to which the DMARC policy is to be applied. Valid value is an integer between 0 to 100.|
|adkim|r|Alignment Mode DKIM|Indicates whether strict or relaxed DKIM Identifier Alignment mode is required by the Domain Owner. Valid values can be 'r' (relaxed) or 's' (strict mode).|
|aspf|r|Alignment Mode SPF|Indicates whether strict or relaxed SPF Identifier Alignment mode is required by the Domain Owner. Valid values can be 'r' (relaxed) or 's' (strict mode).|
|fo|1|Forensic Reporting|Provides requested options for generation of failure reports. Valid values are any combination of characters '01ds' seperated by ':'.|
|ri|86400|Reporting Interval|Indicates a request to Receivers to generate aggregate reports separated by no more than the requested number of seconds. Valid value is a 32-bit unsigned integer.|
|ruf|mailto:dmarc@metivier.fr|Forensic Receivers|Addresses to which message-specific failure information is to be reported. Comma separated plain-text list of DMARC URIs.|
|rf|afrf|Forensic Format|Format to be used for message-specific failure reports. Valid values are 'afrf' and 'iodef'.|
*[[DNS Interne]]
*[[DNS Externe]]
*Bureau d'enregistrement : [[GANDI|https://www.gandi.net/fr]]
*Prestataire de service : [[GANDI|https://www.gandi.net/fr]]
--*Url Dynamique : ''ymetivier.noip.me'' (mis à jour automatiqiement par la bbox)--
*Mise à jour dns gandi : {{{checkip}}} (voir [[Scripts]] : exécuté toutes les 5mn par la crontab
*Toutes les machines du reseau local reçoivent comme serveur dns (via dhcp), l'identité du raspeberry local (brasp ou crasp)
**Ceci permet au réseau de fonctionner, même si un serveur est arrêté.
*Les deux serveurs hébergent und dns secondaire
**Ce qui leur permet de fonctionner en cas de panne ou de maintenance d'un raspberry
*Le DNS des raspberrys est servi par [[PiHole|http://crasp.metivier.fr/admin/]], permettant de supprimer la publicité.
**''~PiHole'' écoute sur le port standard ''53'', et transmet au service standard (''bind9/named''), à l'écoute sur le port ''5335''
[[Domotique]]

*[[Site Web|https://deluge-torrent.org/]]
*[[Aide|https://www.google.fr/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwjzsqSC8930AhXRzoUKHSBZD_YQFnoECAYQAQ&url=https%3A%2F%2Fwww.rapidseedbox.com%2Fkb%2Fultimate-deluge-guide&usg=AOvVaw2GYKgw6uxaFtZhmGUJbugU]]
*Client BitTorrent
**mode client-server
**Clients : console, Gtk, Web
*Client web : http://chatillon.metivier.fr:8112
@@Attention@@ : bug dans ''/lib/systemd/system/deluge-web.service'' : ajouter ''-d'' à la commade de lancement (ExecStart=/usr/bin/deluge-web -d)
*Configuration : répertoire ''.config'' du home du user exécutant le démon (/Data/deluge)
*Reset webUI password :
{{{
sed -i 's|"pwd_sha1": ".*",|"pwd_sha1": "bc28bfa49a73fd2384cbecd6572ea72d0166aa28",|g' ~/.config/deluge/web.conf
sed -i 's|"pwd_salt": ".*",|"pwd_salt": "",|g' ~/.config/deluge/web.conf
}}}
* Supprimer la demande de password : https://dukrat.net/124/deluge-webui-1-3-6-autologin-disable-password
{{{
vim /usr/lib/python2.7/dist-packages/deluge/ui/web/js/deluge-all.js:deluge.LoginWindow (near the end, replace the onShow function):
     onShow:function(){this.onLogin();}

vim /usr/lib/python2.7/dist-packages/deluge/ui/web/auth.py (comment out the if statement and add return True):
            #if s.hexdigest() == config["pwd_sha1"]:
            #    return True
            return True
}}}
!!!Plugin
*Label
**Permet de 'labelliser' un Torrent afin de le déplacer automatiquement en fin de téléchargement dans le bon répertoire
**Pour labelliser : 'clic droit' sur un torrent et choisir le label
**Pour ajouter un label : 'clic' droit sur le nom du filtre 'Label'
**Pour paramétrer un Label : Ouvrir le filtre (Bouton '+'), puis clic droit sur le nom du Label.
|!Fabricant|!Modèle|!Série|!Capacité|!Système|!POH|!Age|!Etat|h
|Western|WD20EARX-00PASB0|WD-WCAZAJ845733|2TO|axle sda|85320|9ans 270jrs|OK|
|Western| WD20EZRZ-00Z5HB0|WD-WCC4M4PFVJXJ|2TO|axle sdb|33961|3ans 320jrs|@@background-color:#00ff00;OK@@|
|Toshiba|DT01ACA200|93M6GGGKS|2TO|axle sdc|75534|8ans 227jrs|OK|
|Toshiba|DT01ACA200|93M6H00KS|2TO|axle sdd|56741|6ans 174jrs|OK|
|HGST|Ultrastar 7K6000|K5HRLY4D|2TO|axle sde|25670||OK|
|Western|WD20PURZ-85AKKY0|WD-WX32D60EUDXD|2TO|axle sdf|15166|1an 266jrs|OK|
|Seagate|ST4000DM004|WFN7LYYJ|4TO|munshine sda|2925||OK|
|Seagate|ST4000DM004|WFN5HHSE|4TO|munshine sdb|2925||OK|
|Seagate|ST4000DM004|WFN7LQMD|4TO|munshine sdc|2925v||OK|
|Seagate|ST4000DM004|WFN82D66|4TO|munshine sdd|861||OK|
!!SPARE
|Seagate|ST2000DL003-9VT166|5YD8DK0H|2TO||49253||!MOYEN|
|Samsung|HD204UI|S2H7J1PB404991|2TO||61107|6ans 356jrs|!MOYEN|
|Samsung|HD204UI|S2H7J1PB404994|2TO||28907||!MOYEN|
|Seagate|ST9500325AS|90M2GRJM|500G||12679|1an 163jrs|OK|
|Hitachi|HDT721010SLA360|MH1R8STW|1TO||57296|6ans 197jrs|OK|

*''Info''
{{{docker info}}}
*Demarrage automatique d'un container
https://docs.docker.com/config/containers/start-containers-automatically/
*Localisation
Défini dans ''/etc/docker/daemon.json'' :{{{ {"data-root": "/Data/docker-storage"} }}}
!!Terminologie
;~ZigBee
:est un protocole de haut niveau permettant la communication d'équipements personnels ou domestiques équipés de petits émetteurs radios à faible consommation ; il est basé sur la norme IEEE 802.15.4 pour les réseaux à dimension personnelle (Wireless Personal Area Networks : WPAN).
;MQTT(Message Queuing Telemetry Transport2)
:est un protocole de messagerie publish-subscribe basé sur le protocole TCP/IP. Il a été initialement développé par Andy Stanford-Clark (IBM) et Arlen Nipper (EuroTech). Il est conçu pour les connexions avec des sites distants où la bande passante du réseau est limitée.
;~ZigbeeToMqtt
:Passerelle Zigbee vers MQTT. Permet d'utiliser un dongle USB de type ''~CC2531'' flashé avec Tasmota ou ZNP-Prod (https://www.zigbee2mqtt.io/)
;[[Tasmota]]
:Firmware Open Source pour ''~ESP8266''. (https://tasmota.github.io/docs/About/)
;~Zigbee2Tasmota (Z2T)
:Equivalent à ~Zigbee2MQTT (https://tasmota.github.io/docs/Zigbee/)
!![[HomeAssistant]]
!!~MiddleWares
[[MQTT Broker]]
[[Zigbee2MQTT]]
!!Plateformes
HomeAssistant
[[IotGO]]
[[Jeedom|https://www.jeedom.com/fr/]]
[[OpenHAB|https://www.openhab.org/]]
[[HomeKit]]
!!Equipements
[[SonOff ZBBridge]]
[[SonOff Basic R3 DIY]]
[[SonOff MINI R2 DIY]]
[[SonOff TXEU]]
[[Tuya IH-K009]]
[[Tuya TH01Z]]
[[ZLinky-TIC]]
[[CC2531]]
[[Aqara Cube]]
[[FT232]]
[[TX Ultimate|https://itead.cc/product/sonoff-tx-ultimate-smart-touch-wall-switch/]]
[[ZBMINIL2]]
[[MINIR4]]
!!Divers
[[ITEAD|https://www.itead.cc/]]
!!Divers
*Accès au BIOS : ''F1''
*Accès au Menu des disques : ''F12''
*Disque nvme
**Windows Boot Manager
***Pb : Le boot manager charge directement Windows (pas de menu)
*Disque SSD Samsung
**~OpenCore : Boot menu 
**mageia
**Windows
***Les trois options Windows/Mageia et MacOS sont accessibles via le boot menu ~OpenCore
!!Utilitaires
*Windows
**''Mini Tool Partition Wizard'' : Pour monter la es partitions EFI
**''Explorer++'' : Pour accéder aux contenus des partitions EFI
*~MacOS
**{{{sudo diskutil mount -mountPoint ~/EFI disk0s1}}}
!!Principe
On utilise le ''policy routing'' de Linux
On crée une table de routage spécifique ''vpn'' pour le traffic p2p (echo "100   vpn" >> /etc/iproute2/rt_tables)
{{{
ip route show table vpn
default proto static
        nexthop via 10.100.0.241 dev tun-evpnpa weight 1
        nexthop via 10.118.0.217 dev tun-evpnam weight 1
        nexthop via 10.188.0.233 dev tun-evpnsa weight 1
192.168.1.0/24 dev enp0s10 proto kernel scope link src 192.168.1.254 metric 10
192.168.3.0/24 via 192.168.3.2 dev tun-vpn
}}}
Cette table est modfiée par le script exécuté après connexion à ExpressVPN

On crée une règle pour diriger le flux issu du user ''deluged'' vers la table de routage ''vpn''
Cette règle est rendue permanente dans ''/etc/sysconfig/network-scripts/rule-enp0s10''
On crée également une règle pour diriger le traffic routé par ''munshine'' vers la table ''vpn''
{{{
# ip rule show
0:      from all lookup local
32763:  from 192.168.10.0/24 iif tun-vpn lookup vpn
32764:  from 192.168.1.0/24 iif enp0s10 lookup vpn
32765:  from all uidrange 963-963 lookup vpn
32766:  from all lookup main
32767:  from all lookup default
}}}
Dans le script exécuté (manuellement) après connexion à ExpressVPN, on modifie la route par défaut de la table ''vpn'' (voir scipt ci-dessous)

Par défaut le traffic des clients vpn Chatillon est routé vers Orange
Pour Le diriger router via le vpn ExpressVPN, on crée un fichier de config dans {{{/etc/openvpn/servers/vpn/ccd/<CNAME>}}} pour fixer l'adresse locale du client
{{{
/etc/openvpn/servers/vpn/ccd/iphony :
ifconfig-push 192.168.10.250 192.168.10.251
}}}
et on rajoute une règle de policy routing
{{{
32763:  from 192.168.10.250 iif tun0 lookup vpn
}}}
!!Installation
On n'utilise pas le package ExpressVPN, mais le package OpenVPN de la distribution
On recherche un fichier de configuration sur le site [[ExpressVPN|https://www.expressvpn.com/setup#manual]], renommé et placé dans le répertoire {{{/etc/openvpn}}}
Le lancement peut ainsi être géré via ''systemctl'' ({{{systemctl start openvpn@<nom du fichier sans le suffixe.conf>}}})
Deux scripts sont créés pour la modification du paramétrage, lors du lancement et de l'arrêt
!!Script post lancement
/etc/openvpn/clients/expressvpn/route-up.sh
{{{
#!/bin/bash
#set -x
GWS=`ip route list scope global | grep tun-evpn | grep -v "\/1" | awk '{print "nexthop dev " $5 " via " $3 " weight 1 "}'`
CMD="ip route replace default proto static scope global table vpn "
IFS='
'
for g in $GWS
do
        CMD="${CMD}${g}"
done
eval $CMD
route del -net 128.0.0.0/1
route del -net 0.0.0.0/1
iptables -t nat -D POSTROUTING -o $dev -j MASQUERADE
iptables -t nat -A POSTROUTING -o $dev -j MASQUERADE

}}}

!!Script pré arrêt
/etc/openvpn/clients/expressvpn/route-pre-down.sh
{{{
#!/bin/bash
set -x
DNS=`ip route list dev $dev scope global|awk '{print $1}'`
iptables -t nat -D POSTROUTING -o $dev  -j MASQUERADE

GWS=`ip route list scope global | grep evpn | awk '{print "nexthop dev " $5 " via " $3 " weight 1 "}'`
CMD="ip route replace default proto static scope global table vpn "
IFS='
'
for g in $GWS
do
        if [[ ! "$g" == *"$dev"* ]]; then
                CMD="${CMD}${g}"
        fi
done
echo $CMD
eval $CMD
}}}
<<slider ft232 [[ft232]] "FT232" "Voir la photo">>
R>ecopier le fichier de conf {{{/etc/proftpd.conf}}}
Montage du répertoire des films pour accès en FTP
{{{
# Pour le telechargement des films
/Data/f /var/ftp/pub none bind 0 0
}}}
Créer la chaine mentionnée dans le fichier de configuration (/etc/fail2ban/jail.d/custom.conf)

*Voir les ~IPs bannies : {{{fail2ban-client status <JAIL-NAME>}}}
!!Documentation
!!!Reseau
*[[Doc|http://www.netfilter.org/documentation/index.html#documentation-faq]]
*[[Man page|http://linux.die.net/man/8/iptables]]
!!!Bridge
*[[Doc|http://ebtables.netfilter.org/documentation/what.html]]
*[[Man page|http://linux.die.net/man/8/ebtables]]
!!Mise en oeuvre

!Logs
*[[Log FW]]
!Pour contrôle de trafic (désactivé)
[[ipt_mark.sh]]
[img[gpio.jpg]]
!!Page statique : http://chatillon.metivier.fr/graph/index.html
mise à jour par la crontab toutes les demi heure
!!Graphes dynamiques
!!!!Traffic VPN
base : vpn.rrd
script : col_vpn.sh (crontab)
!!!!Debit descendant
base : dl.rrd
script : col_dl.sh (crontab)
!!!!Debit montant
base : ul.rrd
script : col_ul.sh (crontab)
!!!!Charge processeur
base : cpu.rrd
script : col_cpu.sh (cron.d)
!!!!Occupation CPU
base : perf.rrd
script : col_perf.pl (col_perf.service)
!!!! I/O
base : perf.rrd
script : col_perf.pl (col_perf.service)
!!!!Temperature
base : tl500.rrd / tl500-2.rrd
script : tl-500 (tl-500.servicel)
!Nom de domaine
*Géré par ''Gandi''
*Inclut un certificat SSL
!Mail
@@2023@@
@@Suppression des boites gratuites@@
* --Une adresse : ''adminemail'' (alias noreply)--
--!!5 Alias :--
--*catherine.metivier -> catherine@metivier.Fr--
--*contact -> catherine@metivier.Fr--
--*entraineur -> didier, nina jacky & catherine--
--*mail -> yves@metivier.fr--
--*postmaster -> yves@metivier.fr--
!Site Web
hébergé par ''Gandi''
*''Nom del'instance'' : gymcepc
*''Identifiant de connexion''(administration) : 2097395
*''Console'' : https://2097395.admin.sd3.gpaas.net/
*''Pwd'' : Gymcepc92&&
!Base de données
*''Nom'' : adhcepc
*''User'' : cepc
*''Pwd'' : aqwzsx
!!Vues
1cheque adherents 2020 1 seul cheque
adhannee  list des adherents par annee
adhanneesav 
adhcour adherents annee courante
adherents adherents donnés par vadh
adhs adherents annee courante
adhtout Tout ceux ayant adhéré au moins une fois
adhzumba adherents zumba pour toutes les annees
liste_inscrits_preins
lreserv
preinscrits
statistiques
stats2020
vadh annee adherents annee 2020
vadh2020
vreserv
vtable liste de tous les membres avec leur dernière adhesion (aid)
!Console
*Répertoire login : ''/srv/data'' équivalent au répertoire ''/lamp0'' via ''Winscp''

!Zigbee
3 options possibles :
**ZHA ([[Zigbee Home Automation|https://www.home-assistant.io/integrations/zha]])
***Peut fonctionner avec le Bridge Zigbee SonOff en mode emulation serial line ([[ser2net|https://tasmota.github.io/docs/Serial-to-TCP-Bridge/]])
**~Z2M ([[Zigbee2MQTT|https://www.zigbee2mqtt.io/]])
***Fonctionne avec un dongle USB
**~Z2T [[Zigbee to Tasmota|https://tasmota.github.io/docs/Zigbee/]]
***lightweight Zigbee gateway/bridge supported by ressource constraints device chip ESP82xx, like [[SonOff ZBBridge]]
!Equipements
https://www.zigbee2mqtt.io/supported-devices/
!Chauffage
*Utilise X10 (via mochad. Voir [[HA-integrations]]) ou WiFi
*Radiateur fil pilote : https://haade.fr/fr/blog/domotiser-entierement-un-radiateur-electrique-dans-home-assistant
*Radiateur sans pilote : Branchement direct du radiateur sur la sortie du commutateur WiFi/X10
!!!Généralités
*[[Documentation|https://www.home-assistant.io/lovelace/dashboards/]]
*Mode ''yaml''
*Défini dans le fichier : {{{/etc/homeassistant/ui-lovelace.yaml}}}
!!!Vues
*''Eclairage''
**Permet d'allumer/Eteindre les differntes lampes, globalement ou séparément
**Permet de lancer les scripts (allumage sequentiel) ou d'activer les scènes (mode Télé)
*Plan
**Boutons pour chaque lampe, affichant l'état (on/off)
**Températures
*Environnement
**Affichage des paramètres de la sonde netatmo
**Affichage des pourcentages de batterie des modules ''Zigbee''
*TV
**//A compléter//
**Allumage/extinction de la Télé
*''Documentation'' : [[HomeAssistant|https://www.home-assistant.io/]]
*''Installation'' : docker : {{{docker pull homeassistant/home-assistant:latest}}}
*''Configuration'' : {{{/etc/homeassistant}}} (Accessible en réseau)
*''Lancement'' : {{{docker run -d --name="home-assistant" -v /etc/homeassistant:/config -v /etc/localtime:/etc/localtime:ro --restart=always --net=host homeassistant/home-assistant:latest}}}
**Afficher la commande de lancement : {{{docker run --rm -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike  home-assistant}}}
!!![[HomeKit|https://www.home-assistant.io/integrations/homekit/]]
!!!Detection de présence
*Owntrack
**Pas fiable - nécessite l'activation du GPS en permanence
*Routeur
**Bbox : //A vérifier//
*NFC
**Nécessite une action manuelle
**Automatisation sur IOS uniquement à partir de l'Iphone XR
*[[Bluetooth|https://www.home-assistant.io/integrations/bluetooth_tracker/]]
*[[Room-assistant|https://www.room-assistant.io/guide/#how-it-works]]
*[[Monitor|https://github.com/andrewjfreyer/monitor]] 
**Installation du driver usb bluetooth : https://linuxreviews.org/Realtek_RTL8761B
**''monitor'' installé dans {{{/opt/monitor}}}
!!!Switch Sonoff WiFi
*https://github.com/AlexxIT/SonoffLAN
!!!Mochad (Températures)
*https://www.home-assistant.io/integrations/mochad/
!!!Consommation
*~ZLinky-TIC ([[Lixee|https://www.zigbee2mqtt.io/devices/ZLinky_TIC.html]])
*Fichier de configuration principal : ''/etc/httpd/conf/httpd.conf''
**<Directory /var/www/html>&nbsp;: ~AllowOverride ~AuthConfig
*Configuration des ''Virtual Hosts'' : ''/etc/httpd/conf/sites.d''
*Commenter dans ''httpd.conf'' la directive ~AddDefaultCharset
{{{#AddDefaultCharset UTF-8}}}
*Logs
**Répertoire : {{{/var/log/httpd}}} (lien vers /etc/httpd/logs)
**SSL : {{{ssl_request_log}}}
**externe : {{{access_log}}}
**interne : {{{lan_log}}}
**local : {{{local_log}}}
**erreurs : {{{error_log}}}
**Erreurs php : {{{phperror.log}}}
*FPM
[[Calculatrice pour configuration|https://spot13.com/pmcalculator/]]
*<<slider chkHaInfo [[HA-infos]] "Infos" "Ouvrir">>
*<<slider chkHaInt [[HA-integrations]] "Integrations" "Ouvrir">>
*<<slider chkHagui [[HA-gui]] "GUI" "Ouvrir">>
*<<slider chkHaConf [[HA-conf]] "Conf" "Ouvrir">>
Plate-forme Domotique d'Apple
Intégrée à 
*''~Home-Assistant'' via l'[[intégration Homekit|https://www.home-assistant.io/integrations/homekit/]]
*''Jeedom'' via [[Homebridge|https://homebridge.io/]] et le [[plugin Homebridge|https://nebzhb.github.io/jeedom_docs/plugins/homebridge/fr_FR/]]
*''~OpenHAB'' via l'[[Add-on Homekit|https://www.openhab.org/addons/integrations/homekit/]]
*Valider le mode ''AHCI'' dans le BIOS
Bios / Integrated Peripherals / OnChip SATA Type
*Avant de retirer un disque, faire un spiining down :
** echo 1 > /sys/block/sd''[x]''/device/delete ou
** echo offline > /sys/block/sda/device/state

*Après avoir inséré un disque : Faire un scan du bus
echo "0 0 0" > /sys/class/scsi_host/host''[n]''/scan

host0 -> ../../devices/pci0000:00/0000:00:11.0/ata1/host0/scsi_host/host0/
host1 -> ../../devices/pci0000:00/0000:00:11.0/ata2/host1/scsi_host/host1/
host2 -> ../../devices/pci0000:00/0000:00:11.0/ata3/host2/scsi_host/host2/
host3 -> ../../devices/pci0000:00/0000:00:11.0/ata4/host3/scsi_host/host3/
host4 -> ../../devices/pci0000:00/0000:00:14.1/ata5/host4/scsi_host/host4/
host5 -> ../../devices/pci0000:00/0000:00:14.1/ata6/host5/scsi_host/host5/

/sys/block/sda -> ../devices/pci0000:00/0000:00:11.0/ata1/host0/target0:0:0/0:0:0:0/block/sda/
/sys/block/sdb -> ../devices/pci0000:00/0000:00:11.0/ata2/host1/target1:0:0/1:0:0:0/block/sdb/
/sys/block/sdc -> ../devices/pci0000:00/0000:00:11.0/ata3/host2/target2:0:0/2:0:0:0/block/sdc/
/sys/block/sdd -> ../devices/pci0000:00/0000:00:14.1/ata6/host5/target5:0:0/5:0:0:0/block/sdd/

To put a SATA disk offline/running:
 
echo running > /sys/block/sda/device/state



*[[munshine]]
*[[axle]]
*[[gus]]
*[[link]]

*[[Ancien Link (nathan)]]
*[[Ancien axle]]
*[[Ancien munshine]]

*[[Commandes système]]
*[[Installation du CD]]
*[[Modifications post-installation]]
*[[Services]]
!Documentation
*[[Admin|https://docs.nextcloud.com/server/latest/admin_manual/]]
*[[User|https://docs.nextcloud.com/server/latest/user_manual/fr/]]
*[[Développeir|https://docs.nextcloud.com/server/latest/developer_manual/]]
!Suppression de la version existante (15) :
*Suppression de la base et de l'utilisateur
*Suppression des données : {{{/Data/nextcloud/*}}}
*Creation de l'utilisateur et de la base ''nextcloud''
!Installation de la version 25 à partir des sources
*@@ATTENTION@@ Résolution du bug ''{{{"Echec de la spécification des paramètres régionaux..."}}}''
** Remplacer ''LANG=C'' par ''LANG=fr_FR.~UTF-8'' dans {{{/etc/sysconfig/httpd}}}
!Performances
*Installation des gestionnaires de cache ''Redis'' (php-redis & redis) et ''Apcu'' (php-apcu)
https://autoize.com/tuning-nextcloud-performance/
*Installation php-fpm
*ajout de :
{{{
'default_phone_region' => 'ISO 3166-1',
  'default_language' => 'fr',
  'memcache.local' => '\OC\Memcache\Redis',
  'redis' => [
        'host' => 'localhost', // can also be a unix domain socket: '/tmp/redis.sock'
        'port' => 6379,
        'timeout' => 0.0,
        'password' => '', // Optional, if not defined no password will be used.
        'dbindex' => 0, // Optional, if undefined SELECT will not run and will use Redis Server's default DB Index.
  ],
}}}
Installation de ''Imaginary''
{{{docker pull docker.io/nextcloud/aio-imaginary:latest}}}
{{{docker run -d -p 9000:9000 nextcloud/aio-imaginary -cors -return-size}}}
Ajout à config.php de :
{{{
<?php
'enabledPreviewProviders' => [
    'OC\Preview\MP3',
    'OC\Preview\TXT',
    'OC\Preview\MarkDown',
    'OC\Preview\OpenDocument',
    'OC\Preview\Krita',
    'OC\Preview\Imaginary',
],
'preview_imaginary_url' => 'http://<url of imaginary>',
}}}


*Creation des utilisateurs
*Activation de l'app ''External storage support''
*Création des stockages externes ''yves'', ''jeremy'' & ''Photos''

*Copier check_mail
*Verifier les packages suivants :
**[[fetchmail]]
**[[postfix]]
**procmail
**courier-authlib
**dovecot
**cyrus-sasl
**imap-utils
**php-imap
**rainloop
**roundcube
*Pour chaque utilisateur, créer un fichier ''~/.procmailrc'' : [[Example|Procmailrc Example]]
*[[Antivirus]]
*Attention : après avoir modifié les fichiers ''aliases'' et ''sasl_passwd'', executer la commande&nbsp;:
**postaliases aliases
**postmap sasl_passwd
!!Principe
*Pour interconnecter les deux Lans de Chatillon et Bièvres, on utilise un vpn en mode client sur chatillon (''inter.conf'') connecté au serveur du raspberry de Bièvres (''server.conf'')
*Pour qu'une machine de Bièvres (B) soir visible de Chatillon (C), on ajoute dans la table arp du raspberry de Chatillon une entrée avec l' @IP de la machine B et l'@MAC de l'interface lan du raspberry de Chatillon
*Et on ajoute également dans la table arp du raspberry de Bièvres une entrée avec l' @IP de la machine C et l'@MAC de l'interface lan du raspberry de Bièvres
*On ajoute également sur le raspberry de Chatillon une route vers la machine B via l'interface vpn (tun-bievres) 
*On ajoute enfin sur le raspberry de Bièvres une route vers la machine C via l'interface vpn (tun-chatillon) 
*Le raspberry de Chatillon reçoit tous les paquets à destination de la machine B et les route vers Bièvres via le VPN inter site.
*La machine de Chatillon dialoque alors avec celle de Bièvres comme si celle-ci était sur son LAN
*Script : @@A FAIRE@@
Installation via docker :
{{{
docker pull humingchun/iotgo
docker pull mongo
}}}
lancement
{{{
docker run -d --name mongodb mongo mongod
docker run -d -p 3000:80 --name iotgo --link mongodb:mongodb humingchun/iotgo node /opt/IoTgo/bin/www
}}}
Accès, depuis firefox local
{{{
http://localhost:3000
}}}
*Info
https://jellyfin.org/
*Clients
**Desktop
***Installer Jellyfin MPC Shim : https://github.com/jellyfin/jellyfin-mpv-shim
***Lancer  Jellyfin MPC Shim et se connecter au serveur
***Sur le site, choisir la diffusion vers Jellyfin MPC Shim (icone [img[cast.png]] en haut à droite)
**IOS
**Tizen

*Creation
{{{
adduser -M -r jellyfin
docker pull jellyfin/jellyfin:latest
mkdir -p /opt/jellyfin/{config,cache}
chown -R jellyfin.jellyfin /opt/jellyfin
docker run -d --name jellyfin --user 930:928 --net=host --volume /opt/jellyfin/config:/config --volume /opt/jellyfin/cache:/cache --volume /Data:/media --restart=unless-stopped jellyfin/jellyfin
}}}
*Acceleration Matérielle
https://jellyfin.org/docs/general/administration/hardware-acceleration.html
*Carte Nvidia Compatibles
https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new
*Transfert de fichiers
*administration : http://chatillon.metivier.fr/Jirafeau/admin
@@24/03/2024@@
Installation Wireguard
@@12/03/2024@@
Re-Installation Mailman 3 en version docker
@@21/02/2024@@
Installation GoAccess
@@09/02/2022@@
Création du script [[switchserv]]
@@07/02/2022@@
Sur ''axle'' : [[Installation Nextcloud 8]] sur raid system de spare (md5)
@@03/02/2022@@
Sur ''axle'' : [[Upgrade mageia 7 vers mageia8]] sur raid system de spare (md5) 
@@30/06/2021@@
Arrêt tomcat pour libérer la mémoire
@@06/04/2021@@
Purge
@@07/04/2021@@
Installation [[Unison]]
Installation [[Fail2ban]]
@@19/05/2021@@
Installation ''Mailman''
http://doc.ubuntu-fr.org/lvm

*Deux types de Log
**Texte : {{{/var/log/ulogd/ulogd_syslogemu.log}}}
**Bdd : Pour affichage avec [[webfwlog]]
*Utilise le système [[Ulogd2]], installé à partir des sources en {{{/usr/local}}} avec :
**Le plug-in ''LOGEMU'' (''ulogd-output-LOGEMU'') pour le stockage dans le fichier de log
**Le plug-in ''MYSQL'' (''ulogd-output-MYSQL'' pour le stockage en base
*Configuration : {{{/etc/ulogd.conf}}}
*[[Documentation|https://connect.ed-diamond.com/GNU-Linux-Magazine/glmfhs-041/ulogd2-journalisation-avancee-avec-netfilter]]
@@ATTENTION@@
*vérifier le chargement du module ''nf_log-ipv4''
*Log en base arrêté en raison de la charge CPU générée
!!Installation
!!!! Prérequis
*''Carton'' : {{{cpan Carton}}}
!!!! Installation
*dézippage dans ''/var/www/lufi-master''
*création du lien ''/var/www/lufi''
*Exécution de : {{{ carton install --deployment --without=test --without=postgresql --without=mysql }}}
*Création du script de démarrage ''/etc/systemd/system/lufi.service''
<<slider br3 [[minir4]] "Image" "Voir la photo">>
*''Switch Mural sans neutre avec Ewelink Remote Contro''
Site : [[Mosquito|https://mosquitto.org/]]
*Activé sur le port standard en local (interne et Lan)
*Activé en MQTTS (port 8883) en externe
*Envoi de commande Zigbee: {{{ mosquitto_pub -t cmnd/tasmota_E36602/ZbSend  -m '{"device":"0xB70E","send":"0B04_00/0F05"}' }}}
*Voir les messages reçus : {{{ mosquitto_sub -t topic -v }}} ex de topic : z2t/sensor/#
Installation a partir d'une clé
modification du fichier /etc/ssh/sshd_config
ajout des clés ssh
modification /etc/passwd, group et shadow
synchro des homes
copy de /root
copy de /etc/sudoers et /etc/sudoers.d
installation docker
installation Home Assistant (docker)
install apache-mod_proxy, proxy_html, session, dbd, authnz_external
installation modules php à partir de ceux d'axle
copie de /usr/local/src
compilation installation mochad
installation htemp et tl-500
http : copie de la conf et de /var/www/html
installation openvpn et copie de la conf
mysql : copie des bases et copie des utilisateurs http://www.uptimemadeeasy.com/linux/mysql-migrate-users-server-server/
installer nagios
installer les plugins : check_tcp check_dhcp check_dhcp check_dns check_http check_mysql check_nagios check_nrpe check_ntp check_smtp
copier les plugins check_available_memory.sh check_evpn check_hdtmp check_mail check_mem.sh check_raid.pl check_remote_nagios check_sensors check_sms check_smsd  check_systemd_service check_tcpu check_tl-500 check_zdevices
copier /usr/lib64/nagios/plugins/contrib
copier la conf (conf.d . cgi.cfg)
installation smartmontools
installation dovecot
installation clamav & clamd
installation spamassassin
installation amavisd-new
installation opendkim
copie de /etc/postfix
copie de /etc/dovecot/conf.d/10-auth & 10-ssl
copie de /etc/postfix/master.cf & main.cf
copie de /etc/amavis/amavisd.conf
copie de la base bayses (/var/lib/amavis/.spamassassin)
copie de /etc/clamd.conf
copie de /etc/fetchmailrc
copie de /var/db/dkim/metivier.fr.pem
copie de /etc/mail/spamassassin/local.cf
ajout du package postfix-pcre
installation samba
recopie de /etc/samba/smb.conf passdb.tdb secrets.tdb
git
perl
  perl-devel
  cpan
  perl-WWW-Curl
  perl-Net-IMAP-Simple
  perl-Moo
  Config::JSON (download+make)
    cpan App::cpanminus
    cpanm Config::JSON
cops : correction due à php 8 https://github.com/seblucas/cops/issues/492
installation de roundcube
--installation de rainloop--
installation cops
installation de ulogd & ulogd-mysql
installation de plexmediaserver
@@installation de nextcloud@@
installation de plex
installation de deluge
activation de ntp
activation ''fetchmail'' @@ATTENTION@@ : installer fetchmail 7 minimum
java openjdk tomcat
tautulli
sensord
Suppression de pnp4nagios
installation de [[Nagiosgraph]]
installation de fail2ban : créer la chaine et la règle FAIL2BAN & recopier /etc/fail2ban/jail.d/custom.conf
installation de mosquitto
parametrage fail2ban
parametrage unison
parametrage crontab et cron.D
------------------------------------
parametrage tomcat

squidguard
[[Installation_]]
[[Principe_]]

[[ssmtp]]
*Installation via Docker : [[Mailman 3 in Docker Containers|https://asynchronous.in/docker-mailman/]]
**Version : 0.4.6
*[[Documentation|https://docs.mailman3.org/en/latest/]]
*[[REST API|https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/rest.html]]
*Url : [[Mailman|http://lists.gymcepc.org]]
*@@Attention@@ : ne pas activer ''local_recipient_maps'' dans la conf ''postfix''
*Alias ''lists.gymcepc.org'' vers ''lists.metivier.fr''

*[[API|https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/rest.html]]
[[Référence|http://classic.tiddlywiki.com/]]
[[A faire]]
[[Journal]]
[[Domotique]]

[[Installation]]
[[Services]]
[[Contenu de /var/www/html]]
[[Authentification Web]]

[[Reseau]]
[[Système]]

[[Raspberry]]

[[Bank]]
[[Rapport Finances]]
[[CEPC]]

[[Audio]]
!!!Installation
https://github.com/okainov/mantisbt-docker

ou

https://hub.docker.com/r/vimagick/mantisbt/
*[[Ajouter les sources tainted]]
*Installer les [[Packages Complémentaires]]
*Changer le niveau de run par défault é 3 (/etc/inittab)
*[[Mettre les clefs SSH]]
*Modifier le [[Routage]]
**Dans le fichier ''/etc/sysctl.conf'' : ajouter ''net.ipv4.conf.default.forwarding=1''
**dans ''/etc/sysconfig/network'', ajouter la ligne ''GATEWAY=192.168.1.1''
*//Optionnel// Arréter le service ''shorewall'' et supprimer le package
*Exécuter ''sensors-detect''
*Configurer le [[RAID]] et [[LVM]]
*''Systemd'' : renommer /lib/systemd/system/httpd-prefork.service pour forcer le mode de démarrage ''sysV'' pour Apache
*Après l'installation, modifier le fichier [[/etc/crontab]]
*Mettre à jour {{{/etc/passwd, group & shadow}}} avec les users dont l'ID est >= 500
*Recopier le fichier ''/var/www/.users'' et ''/var/www/groups''
*Mettre a jour {{{/etc/exports}}}
*[[rc.local]]
!!!Fichier de configuration
/etc/my.cnf
!!!Importation
* ''mysqldump'', puis "''mysql .... < fichier dump''"
* via ''adminer''
!!!Web Management
*phpMyAdmin
** Configuration : ''/etc/httpd/conf/webapps.d/phpmyadmin.conf''
*adminer
!!!Liste des bases :
*adhcepc : Gestion du CEPC
*auth : Authentification Web
*roundcubemail : Web Mail
*cepc : Photos du CEPC
*gallon : Photos Metivier/Gallon
*maconso : Getsion courses (app IOS)
*mtable : appli table de multiplication
*nextcloud : Nextcloud
*poisson : photos poisson
*rainloop : Web Mail
*sylvestre : Photos St Sylvestre
*ulogdb : Log Firewall
*webfwlog : Log Firewall


*Pb rencontré : pb de librairie libperl.so
{{{
echo "/usr/lib/perl5/5.14.2/x86_64-linux-thread-multi/CORE/" > /etc/ld.so.conf.d/perl.conf
ldconfig
}}}
*Installer les packages suivants :
**nagios
**nagios-www
**nagios-check_apache
**nagios-check_dhcp
**nagios-check_disk
**nagios-check_dns
**nagios-check_http
**nagios-check_load
**nagios-check_mysql
**nagios-check_nrpe
**nagios-check_ntp
**nagios-check_ping
**nagios-check_procs
**nagios-check_sensors
**nagios-check_smart
**nagios-check_smtp
**nagios-check_tcp
**nagios-check_users

*Installer/configurer ''smartd''

*Installer/configurer ''hddtemp''

*Plugins
copier /usr/lib64/nagios/plugins/check_hdtmp
copier /usr/lib64/nagios/plugins/check_tcpu
copier ''/usr/lib64/nagios/plugins/check_raid.pl''

__''/etc/sudoers''__
*commenter ''Defaults    requiretty''
*Ajouter :
{{{
nagios ALL = (ALL) NOPASSWD: /usr/lib64/nagios/plugins/contrib/check_smart.pl, /usr/sbin/smartctl
}}}

__Authentification__
*/etc/httpd/conf/webapps.d/nagios.conf
*/etc/nagios/passwd
*/etc/nagios/group

__Fichiers de configuration :__
*dans /etc/nagios, pointer les fichiers utilisés
**/etc/nagios/conf.d/config.cfg
**/etc/nagios/objects/checkcommands
**/etc/nagios/objects/misccommands

__Verification des process__
Utiliser ''check_proc_arg'' plutot que ''check_procs''

__Envoi de SMS__
*Ligne de commande : ''gammu''
*GUI : ''wammu''
@@ATTENTION@@
*Un bug lié à l'obsolescence perl de la déclaration {{{defined(%hash)}}} a été corrigé depuis le package ''nagiosgraph-1.4.3-11.mga8''
**Le fichier /usr/share/nagiosgraph/lib/ngshared.pm a été modifié
*Ajouter ke fichier ''nagiosgraph.js''
!Installation
* Install dir : {{{/usr/share/nextcloud}}}
* Data dir : {{{/Data/nextcloud}}}
!Utilisation
*Via l'appli Desktop ou Smartphone
*Via un montage Webdav sous Windows
Dans le cas de l'appli Nextcloud sous Windows, le répertoire server est ''synchronisé'' avec un répertoire local sur le  desktop
Dans le cas du montage Webdav, c'est le répertoire sur le serveur Nextcloud qui est utilisé
!Montage ''webdav'' sous ''Windows10''
*https://docs.nextcloud.com/server/latest/user_manual/fr/files/access_webdav.html
Dans l'explorateur, faire un clic-droit sur le dossier Ordinateur et sélectionner Connectez un lecteur réseau... depuis le menu déroulant.
Choisir le lecteur de réseau local que vous souhaitez connecter à Nextcloud.
Spécifier l’adresse de l' instance Nextcloud : {{{https://chatillon.metivier.fr/nextcloud/remote.php/webdav/}}}
!Synchronisation
https://docs.nextcloud.com/server/20/user_manual/fr/pim/sync_thunderbird.html
!Partages
* Le calendrier "Famille" (de l'utilisateur ''yves'') est partagé avec le groupe ''famille''
!Permissions
Il faut ajouter l'acl r-x pour les répertoires et r-- pour les fichiers aux arborescences des utilisateurs pour y accéder via nextcloud
*Carte mère
**Lenovo
**[[10b700btfr|http://chatillon.metivier.fr/Carte%20Meres/ThinkCentre_M720_Tiny_Spec.pdf]]
**Socket 
**4 x 16 Go ~DDR4 2133 ( 64go)
*CPU
**Intel Core I5-9400T @ 1,8 GHz (Skylake)
**CPU Mark : 7.825
**GPU UHD630
*BIOS
**Révision : 
*Mémoire
**2 x 4Go ~DDR4 2666
*Disque
** sda :   SSD 256Go M.2
*Réseau
** 
***1Gbs
@@ATTENTION@@ : pour que la mise à jour de l'OS soit effective, il faut s'assurer que la partition de boot soit bien montée sur ''/boot''
*System update (Sistrib version)
Lancer le ''MCC'' (Mageia Control Center) en terminal X
Aller dans ''Gestion des logiciels'', puis ''Mettre à jour votre Système'' 
*Kernel update
urpmi kernel....-latest
!Désactivé
* Signature et vérification sont faits par Amavisd-new
!Principe
Mis en oeuvre dans postfix via un filtre ''before-queue'' (dans main.cf)
{{{
milter_default_action = accept
milter_protocol = 6
smtpd_milters = inet:localhost:8891
non_smtpd_milters = inet:localhost:8891
}}}

!Signature
Activé via
 {{{Mode s}}} 
dans /etc/opendkim.conf
!Vérification
*Actuellement désactivé dans openDKIM : absence de {{{Mode v}}} dans /etc/opendkim.conf 
*Activé dans ''amavisd'' via le paramètre : 
{{{$enable_dkim_verification = 1;}}}
!Configuration
*Pour chaque site un vpn en mode server est configuré sur les raspberries, pour tous clients, avec pour fichier de configuration ''server.conf''
!Gestion des Certificats
!!Localisation : 
Tous les certificats sont gérés sur ''munshine'' (Chatillon) : ''/etc/openvpn/easy-rsa/keys'' (/usr/share/easy-rsa obsolete)
!!Howto : 
*https://openvpn.net/community-resources/rsa-key-management/
*https://community.openvpn.net/openvpn/wiki/EasyRSA3-OpenVPN-Howto
!Configuration (/etc/openvpn)
*Les machines qui se connectent au VPN reçoivent une @IP sur le LNA du site (192.168.1.xxx)
!!Serveurs
!!!brasp (pour tous clients)
port ''1194''
Fichier : ''server.conf''
Certificat : ''brasp.crt''
interface : ''tun-vpn''
!!!crasp (pour tous clients)
port ''1194''
Fichier : ''server.conf''
Certificat : 'cbrasp.crt''
interface : ''tun-vpn''
!!!Bievres (pour le client chatillon)
@réseau : ''192.168.2.0/24'' port ''1194''
Fichier : ''synchro.conf''
Certificat : ''axle.crt''
interface : ''tun-sync''
!!Clients
!!!Chatillon (connexion à Bièvres)
Connexion vers Bièvres : ''bievres.conf'' (lancement : systemctl start openvpn@bievres)
Fichier : ''synchro.conf''
Certificat : ''chatillon.crt''
interface : ''tun-sync''
!!!Autres équipements
Port ''1194''
Utilisation de l'accès Internet de Chatillon par divers équipements (autre serveur, Desktop, Smartphones...) : générer une paire clé/certificat, et un fichier de configuration (modèle /etc/openvpn/client.conf)
Pour le client ''iOS'', concaténer le fichier de conf, le certificat CA, la clef, et le certificat du client dans un seul fichier ''.ovpn'' (voir /home/yves/openvpn
Les connexions sont journalisées dans la base ''vpn''


!Installation
Howto : http://openvpn.net/index.php/open-source/documentation/howto.html

Copier ''/usr/share/openvpn/easy-rsa/2.0/'' dans ''/etc/openvpn/easy-rsa''

Pour lancer manuellement :
{{{systemctl start openvpn@xxxxx}}} (xxxxx.conf doit exister dans /etc/openvpn

Pour le lancement automatique :
{{{systemctl enable openvpn.target}}}
{{{systemctl enablet openvpn@xxxxx}}}

!!client Iphone
[[OpenVPN Connect|https://itunes.apple.com/app/openvpn-connect/id590379981]]
ATTENTION : uniquement en ''tcp''
Configuration : modèle dans ''/home/yves/openvpn/client.ovpn'' 

*Mapping des PE (Physical Elements) to LE (Logical Elements)
{{{
lvdisplay -m <vg>[/<lv>]
pvs -v --segments <device>
}}}
*Déplacer des segments
{{{
pvmove --alloc anywhere /dev/device:<debut>-<fin>
}}}

dos2unix
(lvm2)
netcat
ncftp
tcpdump
tshark
wireshark
iperf
webmin
openvpn
ddclient
bind
courier-authlib
courier-imap
courier-pop
cyrus-sasl
--imapproxy-- tgz fourni par squirrelmail
--imap-utils--
lib64openssl-devel
php-imap
php-mysql
php-iconv
php-xml
php-gd
php-pdo
php-zip
php-exif
php-cgi
php-imagick
amavisd-new
clamav
clamd
squirrelmail
dhcp-server
ntp
proftpd
lm_sensors
mysql
libqt3-mysql
@@libmysql-devel@@
ulogd-mysql + ulogd
apache-mod_proxy
apache-mod_suexec
@@mod_proxy_html@@
mason
perl-~HTTP-Server-Simple-Mason
rrdtool
perl-rrdtool
nagios
nagios-www
nagios-check_apache
nagios-check_dhcp
nagios-check_tcp
nagios-check_smtp
nagios-check_dns
nagios-check_sensors
nagios-check_nrpe
nagios-check_mysql
nagios-check_ntp
nagios-check_smart
nsca
@@fetchlog@@
fetchmail
smartmontools
samba-swat
(samba-doc)
unrar
parchive2
vlc
iptraf-ng
bridge-utils
rp-pppoe
vlan-utils
ebtables
mldonkey
perl-~Net-IMAP-Simple
perl-~Net-IMAP-Simple-SSL
phpmyadmin
perl-~Date-Calc
sysstat
python-cheetah
python-OpenSSL
lshw
hwinfo
lsusb
lsscsi
libpng-devel
libgd-devel
Cable 1 - Position 1

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Caviar Green (AF, SATA 6Gb/s)
Device Model:     WDC WD20EARX-00PASB0
Serial Number:    WD-WCAZAJ845733
LU WWN Device Id: 5 0014ee 25cf48d65
Firmware Version: 51.0AB51
User Capacity:    2 000 398 934 016 bytes [2,00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS (minor revision not indicated)
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Tue Apr  2 16:08:36 2019 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled


Disque /dev/sdb&nbsp;: 1,8 TiB, 2000398934016&nbsp;octets, 3907029168&nbsp;secteurs
Unités&nbsp;: secteur de 1 × 512 = 512&nbsp;octets
Taille de secteur (logique / physique)&nbsp;: 512&nbsp;octets / 4096&nbsp;octets
taille d'E/S (minimale / optimale)&nbsp;: 4096&nbsp;octets / 4096&nbsp;octets
Type d'étiquette de disque&nbsp;: dos
Identifiant de disque&nbsp;: 0x41f0c360


|classe CSS|k
|!Device     Boot|!    Start|!        End|!    Sectors|!  Size|! Id|! Type|
|/dev/sdb1|           2048|    1026047|    1024000|  500M| 83| Linux|
|/dev/sdb2|        1026048|   84912127|   83886080|   40G| fd| Linux raid autodetect|
|/dev/sdb3|       84912128|   93300735|    8388608|    4G| fd| Linux raid autodetect|
|/dev/sdb4|       93300736| 3907029167| 3813728432|  1,8T| fd| Linux raid autodetect|
|sdb|c

Cable 1 - Position 1

=== START OF INFORMATION SECTION ===
Device Model:     WDC WD20EZRZ-00Z5HB0
Serial Number:    WD-WCC4M4NT0FFJ
LU WWN Device Id: 5 0014ee 2b91ab1b8
Firmware Version: 80.00A80
User Capacity:    2 000 398 934 016 bytes [2,00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5400 rpm
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-2 (minor revision not indicated)
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Tue Apr  2 15:56:18 2019 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled


Disque /dev/sda&nbsp;: 1,8 TiB, 2000398934016&nbsp;octets, 3907029168&nbsp;secteurs
Unités&nbsp;: secteur de 1 × 512 = 512&nbsp;octets
Taille de secteur (logique / physique)&nbsp;: 512&nbsp;octets / 4096&nbsp;octets
taille d'E/S (minimale / optimale)&nbsp;: 4096&nbsp;octets / 4096&nbsp;octets
Type d'étiquette de disque&nbsp;: dos
Identifiant de disque&nbsp;: 0xa7852ee8

|classe CSS|k
|!Device     Boot|!    Start|!        End|!    Sectors|!  Size|! Id|! Type|
|/dev/sda1|           2048|    1026047|    1024000|  500M| 83| Linux|
|/dev/sda2|        1026048|   84912127|   83886080|   40G| fd| Linux raid autodetect|
|/dev/sda3|       84912128|   93300735|    8388608|    4G| fd| Linux raid autodetect|
|/dev/sda4|       93300736| 3907029167| 3813728432|  1,8T| fd| Linux raid autodetect|
|sda|c

Cable 3 - Position 3

=== START OF INFORMATION SECTION ===
Model Family:     Toshiba 3.5" HDD DT01ACA...
Device Model:     TOSHIBA DT01ACA300
Serial Number:    X7DXMXUAS
LU WWN Device Id: 5 000039 fe6db1cb5
Firmware Version: MX6OABB0
User Capacity:    3 000 592 982 016 bytes [3,00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 1.5 Gb/s)
Local Time is:    Tue Apr  2 16:10:20 2019 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled


Disque /dev/sdc&nbsp;: 2,7 TiB, 3000592982016&nbsp;octets, 5860533168&nbsp;secteurs
Unités&nbsp;: secteur de 1 × 512 = 512&nbsp;octets
Taille de secteur (logique / physique)&nbsp;: 512&nbsp;octets / 4096&nbsp;octets
taille d'E/S (minimale / optimale)&nbsp;: 4096&nbsp;octets / 4096&nbsp;octets
Type d'étiquette de disque&nbsp;: gpt
Identifiant de disque&nbsp;: 61F72F0E-896F-4659-B07B-A08808FC9BDD


|classe CSS|k
|!Device          |!Start        |!End    |!Sectors   |!Size |!Type|
|/dev/sdc1        |2048    |1026047    |1024000   |500M |Linux filesystem|
|/dev/sdc2     |1026048   |84912127   |83886080    |40G |Linux RAID|
|/dev/sdc3    |84912128   |93300735    |8388608     |4G |Linux RAID|
|/dev/sdc4    |93300736 |3907029167 |3813728432   |1,8T |Linux RAID|
|/dev/sdc5  |3907031040 |5860533134 |1953502095 |931,5G |Linux filesystem|
|sdc|c

Cable 4 - Position 4

=== START OF INFORMATION SECTION ===
Model Family:     Toshiba 3.5" HDD DT01ACA...
Device Model:     TOSHIBA DT01ACA200
Serial Number:    93M6GGGKS
LU WWN Device Id: 5 000039 ff3df1f8a
Firmware Version: MX4OABB0
User Capacity:    2 000 398 934 016 bytes [2,00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 1.5 Gb/s)
Local Time is:    Tue Apr  2 16:17:03 2019 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

Disque /dev/sdd&nbsp;: 1,8 TiB, 2000398934016&nbsp;octets, 3907029168&nbsp;secteurs
Unités&nbsp;: secteur de 1 × 512 = 512&nbsp;octets
Taille de secteur (logique / physique)&nbsp;: 512&nbsp;octets / 4096&nbsp;octets
taille d'E/S (minimale / optimale)&nbsp;: 4096&nbsp;octets / 4096&nbsp;octets
Type d'étiquette de disque&nbsp;: dos
Identifiant de disque&nbsp;: 0xbebef1db

|classe CSS|k
|!Device     Boot|!    Start|!        End|!    Sectors|!  Size|! Id|! Type|
|/dev/sdd1|           2048|    1026047|    1024000|  500M| 83| Linux|
|/dev/sdd2|        1026048|   84912127|   83886080|   40G| fd| Linux raid autodetect|
|/dev/sdd3|       84912128|   93300735|    8388608|    4G| fd| Linux raid autodetect|
|/dev/sdd4|       93300736| 3907029167| 3813728432|  1,8T| fd| Linux raid autodetect|
|sdd|c
!Certificats
Convertir le certificat au format PKCS 12 (voir [[ici|https://www.nodinrogers.com/post/2022-06-01-customer-ssl-cert-in-plex/]])
{{{
openssl pkcs12 -export -out plex.pfx -inkey ./metivier.key -in ./plex.crt -name plex.metivier.fr -passout pass:""
}}}

!Changer la localisation des données (voir [[ici|https://forums.plex.tv/t/moving-pms-library/197342]]) :
créer le répertoire {{{/etc/systemd/system/plexmediaserver.service.d}}}
contenant le fichier {{{override.conf}}}
contenant : 
{{{
[Service]
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/Data/plexmediaserver/Library/Application Support"
}}}
!Répertoires
*Munshine
|{{{/Data/videos/Films}}}|Films Adultes|
|{{{/Data/videos/UHD}}}|4K|
*Axle
|{{{/Data/videos/Series}}}|Series|
|{{{/Data/videos/Enfants}}}|Films Enfants|
!Acceleration Matérielle
*https://support.plex.tv/articles/115002178853-using-hardware-accelerated-streaming/
*Liste des processeurs Intel
https://fr.wikipedia.org/wiki/Liste_des_microprocesseurs_Intel
*Nvidia NVENC
https://en.wikipedia.org/wiki/Nvidia_NVENC
*Types d'accélération
https://www.phoronix.com/scan.php?page=news_item&px=MTEyNDk
https://blog.tinned-software.net/setup-amavisd-new-with-spamassassin-and-clamav-with-postfix/
!!!DNS
L'enregistrement ''MX'' de plus forte priorité pointe sur Chatillon (munshine)
L'enregistrement ''MX'' de priorité 2 pointe sur Bièvres (axle)
Les répertoires ''.Maildir'' de tous les utilisateurs sont synchronisés via [[Unison]]
Enfin deux enregistrements ''MX'' de faible priorité pointe sur le service gratuit de [[MX Backup|http://www.junkemailfilter.com/spam/free_mx_backup_service.html]] 
Si les deux serveurs sont HS, les mails sont automatiquement sauvegardés sur les serveurs de Backup MX.
!!!Sauvegarde
Le script ''saveMail'' est exécuté toutes les nuits et sauvegarde tous les Mails des utilisateurs, @@sans effacement@@, dans le répertoire ''/Data/savemail''
!!!Composants
*Postfix
*postgrey
*Amavisd-new
*Spamassassin
*Clamav
*Sasl
*Fetchmail
*Procmail
*--Cyrus--
*Dovecot
*~OpenDKIM
*DMARC
!!!Postfix
[[Détail|postfix]]
port d'écoute principal : ''25'' (voir master.cf)
fichier de configuration : ''/etc/postfix/main.cf''', ''/etc/postfix/master.cf'''
*~BlackList : {{{/etc/postfix/domain_blacklist}}} (faire ''postmap hash:domain_blacklist'' après modification)
Note : le domaine ''metivier.fr'' est blacklisté, pour bloquer les mails dont l'émetteur est usurpé.
Les mails des véritables utilisateurs sont acceptés avant, car venant d'un client authentifié.
*Après avoir testé la présence en liste grise (communication avec ''postgrey'' via socket unix), le processus principal de Postfix envoie les messages vers ''amavisd-new'', via TCP au port local :
** ''10024'' (défini dans ''main.cf'') pour les mails reçus sur le port ''25'' (mails 'externes')
**''10026'' (défini dans ''master.cf'') pour les mails reçus sur le port ''587'' (clients de messagerie)
*Amavisd-new assure l'interface avec ''~SpamAssassin'' (appel procedural) et ''~ClamAv'' (socket Unix)
*Les messages sont ensuites retournés à Postfix via TCP au port local ''10025'' (défini dans ''amavisd.conf''), pour lequel le filtre de contenu est désactivé
*Les messages sont finalement déposés dans les boites utilisateurs via ''procmail''
!!!Postgrey
Gestion de '''liste grise'''
fichiers de configuration : {{{/etc/postfix/postgrey...}}}
Interface : Socket Unix : {{{/var/spool/postfix/extern/postgrey/socket}}}
!!!Amavisd-new
https://www.amavis.org/
Content-filter interface entre postfix et Spamassassin
fichier de configuration : ''/etc/amavisd/amavisd.conf'''
Répertoire de quarantaine : {{{/var/spool/amavis/virusmails/}}}
Répertoire runtime : {{{/var/run/amavis/}}}
port d'écoute : ''10024'' et ''10026'' (amavisd.conf : $inet_socket_port = [10024,10026];)
Deux ''policy_bank'' en fonction de la provenance (externe/client)
Amavis-new assure également la signature et la vérification DKIM
<<slider AMAVIS [[amavisd-new]] "AmavisdOptions" "Amavisd-new advanced options">>
!!!~SpamAssassin
*https://spamassassin.apache.org/
*fichier de configuration global : ''/etc/mail/spamassassin/local.cf''
*--fichier de configuration secondaire : ''~/.spamassassin/user_prefs''--
*Blacklist/Whitelist : définise dans le fichier de configuration principal: ''/etc/mail/spamassassin/local.cf'' editable via http://chatillon.metivier.fr/wup
**Note : le domaine metivier.fr est whitelisté, car les 'forge source adresses' sont blacklistées en amont par postfix
*Filtre Bayesien
**Emplacement de la base ''bayes'' : {{{/var/lib/amavis/.spamassassin/}}}
**Mise à jour des règles : via {{{/etc/cron.d/sa-update}}} avec log dans {{{/var/log/spamassassin/sa-update.log}}}
**Apprentissage : le système 'apprend' comme spam les messages placés par les utilisteurs dans leur dossier ''Junk'' (''Indésirables'' dans Thunderbird), via ''spamlearn'' lancé par ''cron.daily'' 
*Rules : https://spamassassin.apache.org/old/tests_3_3_x.html
<<slider SAtiddler [[SA_users_prefs]] "SAOptions" "SA Open advanced options">>
!!!~ClamAV

!!!Fetchmail
fichier de configuration : {{{/etc/fetchmailrc}}}
!!!Procmail
@@Attention@@ : le répertoire ''home'' doit être en ''640''
Pour attribuer des droits, préférer les ''ACL''
<<slider ProcMail [[Procmailrc Example]] "procMail Example" "Amavisd-new advanced options">>
!!!Dovecot
voir [[Dovecot]]
!!!~OpenDKIM
voir [[OpenDKIM]]
!!![[DMARC]]
{{{
#DEFAULT=Maildir/


:0:
* ^X-IMELIOS:.*Suspected Spam
.Spams/

:0:
* ^X-Spam-Flag:.*YES
.Spams/

:0:
* ^TOseevia
.Seevia

:0:
* ^TOroot
.root/

:0:
* ^TOvirusalert
.virusalert/

:0
* ^FROM_MAILER
* ^TOyves\.metivier0841
{
 DEST = `grep X-SMTP-Server-Sender | cut -f 3 -d ' '`

 :0 c
 | /usr/bin/formail -f -i "To: ${DEST}" | /usr/sbin/sendmail -oi -t

 :0
 .apache/
}

:0:
* ^From.*nagios
.nagios/

:0:
* ^TOnagios
.nagios/

:0:
* ^TOymetivier@ifrance\.com
* ^TOmunshine@ifrance\.com
.ifrance/
}}}
!Documentation
http://doc.ubuntu-fr.org/raid_logiciel
!Munshine
|!Device|!Montage|
|md0| / |
|md1| swap |
|md2| PV |
|md3| PV |
|md4| OS préc. |

{{{
Personalities : [raid10] [raid1] [raid6] [raid5] [raid4]
md0 : active raid1 sdb2[1] sda2[0]
      41909248 blocks super 1.2 [2/2] [UU]

md1 : active raid10 sdd3[4] sdb3[1] sda3[0] sdc3[2]
      33519616 blocks super 1.2 512K chunks 2 near-copies [4/4] [UUUU]

md2 : active raid5 sdd4[4] sda4[0] sdb4[1] sdc4[2]
      8612702208 blocks super 1.2 level 5, 512k chunk, algorithm 2 [4/4] [UUUU]
      bitmap: 0/22 pages [0KB], 65536KB chunk

md3 : active raid5 sda5[0] sdb5[1] sdc5[3]
      1953238016 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]
      bitmap: 2/8 pages [8KB], 65536KB chunk

md4 : active raid1 sdd2[2] sdc2[0]
      41909248 blocks super 1.2 [2/2] [UU]

unused devices: <none>
}}}


Contenu de ''/etc/mdadm.conf''
Attention : ce sont les UUIDs des raid devices, et pas ceux des file systems
{{{
DEVICE /dev/sda2 /dev/sdb2 /dev/sda5 /dev/sdb5 /dev/sdc5 /dev/sda4 /dev/sdb4 /dev/sdc4 /dev/sda3 /dev/sdb3 /dev/sdc3 /dev/sdd3 /dev/sdc2 /dev/sdd2
ARRAY /dev/md0 UUID=5e720f17:e2cc7408:a63404d7:57c716e5 auto=yes
ARRAY /dev/md3 UUID=efca8b75:10e0cc02:aff42a8e:2e959a6e auto=yes
ARRAY /dev/md2 UUID=86e6c393:6ca21d38:ed6ba0be:0b81f0e3 auto=yes
ARRAY /dev/md1 UUID=56c658c2:a0905c8d:6e392ed8:e1cb37fa auto=yes
ARRAY /dev/md4 UUID=da859d9a:38dad7d3:4d12e9c4:8545eb67 auto=yes

}}}
!Axle
|!Device|!Montage|
|md0| / |
|md1| Swap |
|md 2| PV |
|md 3| OS préc |

{{{
Personalities : [raid10] [raid6] [raid5] [raid4]

md1 : active raid10 sdd2[2] sdb2[0] sde2[4] sdc2[1]
      83818496 blocks super 1.2 512K chunks 2 near-copies [4/4] [UUUU]

md2 : active raid10 sdd3[2] sdb3[0] sde3[4] sdc3[1]
      8378368 blocks super 1.2 512K chunks 2 near-copies [4/4] [UUUU]

md3 : active raid5 sdd5[3] sdb5[1] sda1[5] sde5[4] sdc5[2]
      3906512896 blocks super 1.2 level 5, 512k chunk, algorithm 2 [5/5] [UUUUU]
      bitmap: 0/8 pages [0KB], 65536KB chunk

md4 : active raid5 sdd6[2] sdb6[0] sdc6[1] sde6[4]
      2789907456 blocks super 1.2 level 5, 512k chunk, algorithm 2 [4/4] [UUUU]
      bitmap: 1/7 pages [4KB], 65536KB chunk

unused devices: <none>
}}}

!Howtos
''Changer un disque''
*Déclarer les partitions en faute
{{{
mdadm --manage /dev/md(y) --set-faulty /dev/sd(xn)
}}}
*Retirer les partitions
{{{
mdadm --manage /dev/md(y) --remove /dev/sd(xn)
}}}
*Changer le disque : [[Hot Swap]]
*Ré-ajouter les partitions
{{{
mdadm --manage /dev/md(y) --add /dev/sd(xn)
}}}
[img[rs232.jpg]]
*Vcc: rouge
*Rx : jaune
*Tx : orange
*Gnd : marron
*Installation
**JDK 1.8 : {{{jdk-8u131-windows-x64}}}
**Eclipse+Birt : {{{eclipse-reporting-neon-R-win32-x86_64}}}
** Paramétrage (propre à un workspace) : //Window/perspective/Open perspective/Report Design//

*Localisation : X:\Banque\reports

*Rapports
**''budg_annee''
Balance mensuelle des douze derniers mois
**''budg_mois''
Répartition et liste d'un mois
**''cat_mois''
Liste des opérations d'une catégorie et d'un mois
**''cat_annee''
Balance mensuelle  d'une catégorie pour les douze derniers mois et liste des opérations

**''gl_annee''
Répartition par catégories sur un an
**''gl_mois''
Répartition par catégories sur un mois
**''~SyntheseAnnuelle''
Balance des catégories sur un an
[img[modelb.jpg]]
!!Description
Version [[1 B|https://fr.wikipedia.org/wiki/Raspberry_Pi#Mod%C3%A8le_1_B]]
<<slider cookie [[Rasp]] "Image" "Voir la photo">>
<<slider cookie [[RS232]] "Interface RS232" "Voir la photo">>
<<slider cookie [[GPIO]] "Gpio" "Voir la photo">>
!!Installation Raspbian Lite
*Telechargement : https://www.raspberrypi.com/software/operating-systems/
*Howto : https://raspberrytips.fr/installer-raspbian-raspberry-pi/
*Démarrer et lancer l'utilitaire de configuration ''raspi-config''
*Passer en IP fixe : Editer ''/etc/dhcpcd.conf''
*Activer proxy-arp et forwarding
Ajouter à ''/etc/sysctl.conf''
{{{
net.ipv4.conf.all.proxy_arp=1
net.ipv4.ip_forward=1
}}}
*Supprimer le serial login
{{{
systemctl stop serial-getty@ttyAMA0.service
systemctl mask serial-getty@ttyAMA0.service
}}}
*Packages complémentaires
**isc-dhcp-server
***ajouter ''eth0'' dans {{{/etc/default/isc-dhcp-server}}}
**bind9
***Ajouter dans ''named.conf.options''
{{{
        dnssec-enable yes;
        dnssec-validation yes;
}}}
**minicom
**ntp
***Ajouter {{{restrict 192.168.1.0 mask 255.255.255.128}}} dans ''/etc/ntp.conf''
**xrdp
**iptables
**openvpn
**tcpdump
!!Divers
*Utilisation en [[Console]] du serveur
*[[Installation NRPE|*http://denisrosenkranz.com/tuto-nagios-superviser-un-hote-linux-avec-nrpe/]]
!!Bug
*Correction d'un bug? dans le fichier ''/usr/share/dns/root.hints'' : ajout de ''IN'' devant ''NS    A.~ROOT-SERVERS.NET.''
{{{
; FORMERLY NS.INTERNIC.NET
;
.                         3600000  IN  NS    A.ROOT-SERVERS.NET.
A.ROOT-~SERVERS.NET.      3600000      A     198.41.0.4
A.ROOT-~SERVERS.NET.      3600000      AAAA  2001:503:ba3e::2:30
}}}
*Sur chaque site, un vpn en mode server est activé sur le raspberry, pour tous clients, avec pour fichier de configuration ''server.conf''
*Les machines qui se connectent au VPN reçoivent une @IP sur le LAN du site (192.168.1.xxx), et se comportent comme si elles étaient directement connectées, via la fonctionnalité de ''proxy-arp''
!!Gestion des Certificats
*Localisation : Tous les certificats sont gérés sur ''crasp'' (Chatillon) : ''/root/my-ca''
*Howto : https://community.openvpn.net/openvpn/wiki/EasyRSA3-OpenVPN-Howto
!!Configuration (/etc/openvpn)
*Serveur <<slider cookie [[serverconf]] "server.conf" "Afficher">>
*Clients
**Générer une paire clé/certificat, et un fichier de configuration (modèle /etc/openvpn/client.conf)
**Pour le client ''iOS'' ([[OpenVPN Connect|https://itunes.apple.com/app/openvpn-connect/id590379981]]), concaténer le fichier de conf, le certificat CA, la clef, et le certificat du client dans un seul fichier ''.ovpn'' (voir /home/yves/openvpn
**Les connexions sont journalisées dans la base ''vpn''
**Client chatillon <<slider cookie [[Bievres]] "Afficher/masquer" "Afficher">>
!!Divers
*Installation
**Howto : http://openvpn.net/index.php/open-source/documentation/howto.html
**Copier ''/usr/share/openvpn/easy-rsa/2.0/'' dans ''/etc/openvpn/easy-rsa''
*Lancement
**Manuel : {{{systemctl start openvpn@xxxxx}}} (xxxxx.conf doit exister dans /etc/openvpn
**Automatique :
***{{{systemctl enable openvpn.target}}}
***{{{systemctl enablet openvpn@xxxxx}}}
!Plan
192.168.1.0/24

|hosts connus chatillon|1-63|0000 0000 - 0011 1111|01-3F|
|VPN Chatillon|64-95|0100 0000 - 0101 1111|40-5F|
|DHCP Chatillon|96-122|0110 0000 - 0111 1010|60-7A|
|axle|123|0111 1011|7B|
|mikrotik|125|0111 1101|7D|
|munshine|124|0111 1100|7C|
|chatillon|126|0111 1110|7E|
|hosts connus bievres|128-191|1000 0000 - 1011 1111|80-BF|
|VPN Bievres|192-223|1100 0000 - 1101 1111|~C0-DF|
|DHCP Bievres|224-254|1110 0000 - 1111 1111|~E0-FE|

!Architecture
<<slider cookie [[ArchReseau]] "Afficher/masquer" "Afficher">>
!Synchronisation
<<slider cookie [[Synchro]] "Afficher/masquer" "Afficher">>
!Connexion à distance
<<slider cookie [[Remote]] "Afficher/masquer" "Afficher">>
!Interconnexion
@@A REPRENDRE@@
<<slider cookie [[Interco]] "Afficher/masquer" "Afficher">>
!Chatillon
<<slider cookie [[Chatillon]] "Afficher/masquer" "Afficher">>
!Bievres
<<slider cookie [[Bievres]] "Afficher/masquer" "Afficher">>
[[Configuration réseau]]
[[Firewall]]
--[[Suppression de la Livebox]]--
--[[Traffic Control]]--
[[Doc MikroTik|http://wiki.mikrotik.com/wiki/Manual:TOC]]
[[Switch-cpu|http://forum.mikrotik.com/viewtopic.php?t=50358]]
{{{
# SpamAssassin User Preferences file
# (see perldoc Mail::SpamAssassin::Conf for details of what can be tweaked).
# Note that the entries for headers won't have effect, since those are
# directly handled/overridden by amavisd and amavisd.conf.

dns_available yes

# Ajout� le 8/8/8
clear_trusted_networks
trusted_networks 192.168/16 127/8

# Bayes filters requires at least 200 entries of spam and 200 of ham
# for start working
# Modifi� le 8/8/8 puis 1/9/8
use_bayes 1

bayes_file_mode 0640
#bayes_auto_learn 0

# Modifi� le 11/8/8
#skip_rbl_checks 1

use_razor2 0
use_pyzor 0
#dcc_add_header 1

# Custom scores (local|net|bayes|bayes+net)
#score   BAYES_99        4.300 4.300 5.400 5.400
#score   BAYES_90        3.500 3.500 3.500 3.500
#score   BAYES_80        3.000 3.000 3.000 3.000
#score   DCC_CHECK       4.000 4.000 4.000 4.000
#score   RAZOR2_CHECK    2.500 2.500 2.500 2.500
#score   HABEAS_SWE      -0.01
score FH_DATE_PAST_20XX 0.0
}}}
!!Implanté sur munshine
*Utilise la suite ''gammu''
*Configuration : ''/etc/gammurc''
*Répertoires : {{{/Data/SMS}}}
!!Envoi via Web
*URL : https://axle.metivier.fr/sms
*Ligne de commande : {{{/usr/bin/curl --data  "txt=<texte>" --data "tel=<N° tel>" http://axle.metivier.fr/sms/sms.php}}}
!!Envoi via REST
*Uniquement type ''POST''
*URL : https://axle.metivier.fr/sms/send.php
*body = {"tel":"<n° tel>","txt":"<texte>"}
*retour : {"status":true} | {"status":false,"message":"<message d'erreur>"}
!!Utilisé par :
*Nagios(axle) : /etc/nagios/conf.d/commands.cfg (notify-by-sms)
!!Documentation
*https://docs.gammu.org/
!!Réception
*Les Messages sont stockés dans {{{/Data/SMS/In/}}}
*Le script {{{/usr/bin/gammu-on-receive.sh}}} (défini dans /etc/gammurc) est activé à chaque réception
Ajout de : {{{PubkeyAcceptedKeyTypes=+ssh-dss}}} pour connexion à partir de Raspberry

Accès externe :
*Axle : Connexion via port 10122
*Munshine :  Connexion via port 10022
Fichier de conf : /etc/samba/[[smb.conf]]

@@ATTENTION@@ Selon la version/configuration de windows, utiliser l'un ou l'autre des mécanismes ci-dessous
Pour samba 2 :
Pour créer un user : {{{smbpasswd -a <user>}}}
Password database : {{{/etc/samba/smbpasswd}}}

Pour samba 3 :
Pour créer un user : {{{pdbedit -a <user>}}}
Password database : {{{/etc/samba/password.tdb}}}
!!Sauvegarde des répertoires
<<slider cookie [[backup]] "backup" "Backup Répertoires">>
!!Sauvegarde des bases de données
<<slider cookie [[backsql]] "backsql" "Backup Databases">>
!!Listage des tentatives de connexions de messageries
<<slider cookie [[banmailer]] "ban_mailer" "Liste des attaques mail">>
!!!Mise à jour de l'adresse IP associé au domaine ''metivier.fr''
<<slider cookie [[checkip]] "checkip" "Mise à jour metivier.fr">>
!!!dyndns_update : voir ''checkip''
!!!Sauvegarde des mails @@Obsolete@@ : remplacé par [[Unison]]
<<slider cookie [[mailsync]] "mailsync" "Sauvegarde des mails">>
!!!Sauvegarde locale des mails
<<slider cookie [[savemail]] "saveMail" "Sauvegarde locale des mails">>
*[[Calibre]]
*[[Deluge]]
*[[DNS]]
*[[FTP]]
*[[HTTP]]
*[[Log FW]]
*[[Mail]]
*[[MySql]]
*[[OpenVPN]]
*[[NextCloud]]
*[[Plex]]
*[[PostGreSQL]]
*[[Samba]]
*[[SSH]]
*[[Supervision]]
*[[Température]]
*[[Tautulli]]
*[[Webalizer]]
*[[Webmin]]

WIKI Informatique Metivier Chatillon/Bièvres
*Signification : https://fr.wikipedia.org/wiki/Self-Monitoring,_Analysis_and_Reporting_Technology
*Correction des Bads Sectors : 
**https://www.smartmontools.org/wiki/BadBlockHowto
**https://www.debugpoint.com/2020/07/scan-repair-bad-sector-disk-linux/
<<slider br3 [[basicr3]] "Image" "Voir la photo">>
Prix : 5,96€ + 3.59€ port chez [[AliExpress|https://fr.aliexpress.com/item/4000013367312.html?src=google&albch=shopping&acnt=248-630-5778&isdl=y&slnk=&plac=&mtctp=&albbt=Gploogle_7_shopping&aff_atform=google&aff_short_key=UneMJZVf&gclsrc=aw.ds&&albagn=888888&&ds_e_adid=438856512841&ds_e_matchtype=&ds_e_device=c&ds_e_network=u&ds_e_product_group_id=743612850874&ds_e_product_id=fr4000013367312&ds_e_product_merchant_id=109204005&ds_e_product_country=FR&ds_e_product_language=fr&ds_e_product_channel=online&ds_e_product_store_id=&ds_url_v=2&ds_dest_url=https://fr.aliexpress.com/item/4000013367312.html?&albcp=10191220517&albag=107473525088&gclid=Cj0KCQiAy579BRCPARIsAB6QoIYjZeAPUVmUnC9xK5_EQQ9BnD_N7rMFIvRYpVbRGBz8lES9MWcOmBoaAu95EALw_wcB]]
!!Fonctionnement :
!!!En natif avec [[eWeLink|https://www.ewelink.cc/en/]] et des serveurs dans le cloud
!!!En mode DIY, en https
Permet l'envoi de commandes et la lexture d'etat via des reqêtes http à un serveur REST
!!Passage en [[DIY|https://github.com/itead/Sonoff_Devices_DIY_Tools/blob/master/SONOFF%20DIY%20MODE%20Protocol%20Doc%20v2.0%20Doc.pdf]]
[[DIY Tool|https://github.com/itead/Sonoff_Devices_DIY_Tools]]
!!Alternative
Spoofing des serveurs clouds par un serveur local : https://blog.ipsumdomus.com/sonoff-switch-complete-hack-without-firmware-upgrade-1b2d6632c01
!!Commandes
Ex de commande : {{{curl -X POST -i 'http://192.168.1.40:8081/zeroconf/switch' --data '{"deviceid": "100090d8ce","data":{"switch":"on"}} '}}}
<<slider br3 [[minir2]] "Image" "Voir la photo">>
<<slider tx [[txeu]] "Image" "Voir la photo">>
*[[Documentation|http://dl.itead.cc/txseries/Instructions/TX-EU/TX-EU_V1.2_User_manual_20201116.pdf]]
*[[Flash Tasmota|https://tasmota.github.io/docs/Getting-Started/]]
*[[GUI|http://zbbridge.metivier.fr]]
*''Installation''
**Installer Tasmota [[Flashage|https://digiblur.com/2020/07/25/how-to-use-the-sonoff-zigbee-bridge-with-home-assistant-tasmota/]]
**Installer le firmware Zigbee [[Z2T|https://zigbee.blakadder.com/Sonoff_ZBBridge.html]]
*''Documentation''
**[[Doc Tasmota|https://tasmota.github.io/docs/]]
**[[Doc Tasmota Zigbee|https://tasmota.github.io/docs/Zigbee/]]
**[[Commandes|https://tasmota.github.io/docs/Commands/]]
*''Appairage d'un module''
**mettre le bridge en mode appairage : {{{ZbPermitJoin 1}}}
*''Changer le nom d'un modile''
**Commande Zbname : {{{ZbName 0xZZZZ,'Nom du Module'}}}
*''Divers''
**Topic des messages MQTT envoyés par le bridge : ''/tele/tasmota_E36602/''
**Executer dans la console, la commande ''~SensorRetain'' pour eviter le statut inconnu au redémarrage de HomeAssistant
!CMS
*Utilise l'outil [[Bludit|https://www.bludit.com/]]
*Accès public
*Fournit les informations générales à tout le monde
*Point d'accès aux pages de ''pré-inscription'' et ''réservation zumba''
*Asministration : http://gymcepc.org/admin
!Gestion
*Basé sur le plugin Jquery [[Datatables|https://www.datatables.net/]]
*Trois arborescences :
**''gestion'' : pour la gestion des des adhérents, destiné aux membres du bureau, et plus particulièrement aux secrétaires.
**''reservation'' : destiné aux adhérents, pour réserver un créneau de Zumba du lundi
**''inscription'' : pour les pré-inscriptions
[[Nagios]]
[[pnp4nagios]]
[[hddtemp]]
[[RRDtool]]
@@A Migrer vers Wireguard@@
!!Principe
*Un VPN dédié est établi pour la synchronisation, entre les serveurs Linux de Bièvres (mode serveur) et Chatillon (mode client)
*Un alias est établi sur chaque serveur, et utilisé dans la configuration d'[[Unison]]
!!Configuration
!!!Bievres <<slider cookie [[Conf-bievres]] "synchro.conf" "Afficher">>
!!!Chatillon <<slider cookie [[Conf-chatillon]] "synchro.conf" "Afficher">>
*[[Doc|https://www.linux.com/learn/understanding-and-using-systemd]] - https://fedoraproject.org/wiki/Systemd
*Démarrage d'un service : {{{systemctl start servicename[.service]}}}
**Les scripts sont dans ''/usr/lib/systemd/system/''
*Démarrage automatique : {{{systemctl enable servicename[.service]}}}
**Crée un lien de ''/etc/systemd/system/multi-user.target.wants/servicename.service'' 
**vers ''/usr/lib/systemd/system/servicename.service''
[[Infos Système]]
[[OS Update]]
[[Boot]]
[[Partitions]]
[[RAID]]
[[LVM]]
[[Sensors]]
[[X11/Xdmcp]]
[[Scripts]]
[[Systemd]]
[[Hot Swap]]
[[SmartMonTools]]
<<slider tx [[txul]] "Image" "Voir la photo">>
<<timeline>>
*Site : https://tasmota.github.io/
*Equipements supportés : https://tasmota.github.io/docs/Supported-Modules/
*Equipements compatibles : https://templates.blakadder.com/
*Installé sur 
**[[SonOff ZBBridge]]
**[[SonOff TXEU]]

Utilise :
*les capteurs [[AREXX|http://www.arexx.com/templogger/html/fr/info.php]] pour la collecte des températures
*l'interface usb [[CM19|http://www.x10.com/cm19a.html]] pour l'envoi des commandes x10 en Radio Fréquences (RF)
*L'équipement [[tm13|http://www.haibrain.com/tm13f-transceiver-plugin-module-f-plug-p-625.html]] pour la conversion ~RF-> courant porteur

Outils :
*Collecte des températures : [[tl-500]]
*Planification et stockage dans la base ''~RRDTool'' : [[htemp]]
*Envoi des commandes : [[mochad]]
<<slider ih [[ih-k009]] "Image" "Voir la photo">>
*[[Controle|https://www.zigbee2mqtt.io/devices/IH-K009.html]]
<<slider th01z [[th01z]] "Image" "Voir la photo">>
*Non reconnu par Tasmota
*Reconnu par [[Zigbee2MQTT]] comme un ''~SZ-TO4''
*[[Documentation|https://smarthomescene.com/reviews/zigbee-temperature-humidity-sensor-with-a-screen-sz-t04-review/]]
*[[Controle|https://www.zigbee2mqtt.io/devices/SZ-T04.html]]
* [[Parametrer le téléphone|https://fr.ephesossoftware.com/articles/linux/how-to-tether-any-smartphone-to-linux-android-iphone-and-blackberry.html]]
**Parramètres -> Plus... -> Partage de connexion -> via USB
* Activer l'interface : {{{ifconfig enp0s4f1u6 up && dhclient enp0s4f1u6}}}
* Paramétrer le routage : {{{ip route add 8.0.0.0/8 via 192.168.42.129}}}
*[[Site|https://netfilter.org/projects/ulogd/]]

@@26/02/2024@@ : ''Ne fonctionne pas''

Le stack ''log1'' avec sortie dans les logs ({{{/var/log/ulogd/ulogd_syslogemu.log}}}) fonctionne.
Le stack ''log2'' avec stockage dans la base Mysql ''ulogd'' @@background-color: red;color: white;ne fonctionne pas@@.

*Scripts de création de la base :
Dans les sources de ''ulogd2'' : {{{doc/mysql-ulogd2}}}
Dans les sources de ''webfwlog'' : {{{mysql/mysql_data_table.sql}}}
!!Outil de synchronisation entre systèmes
*[[Documentation|https://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html]]
*Exécution via ''crontab''
*Profils
**@@mail@@ : synchronisation ''.Maildir'' toutes les 5mn
**@@home@@ : synchronisation du répertoire ''/home'' toutes les nuits à 3h30
**@@data@@ : synchronisation des sous-répertoires ''Epubs'', ''Mobile'' et ''piwigo'' toutes les nuits à 3h45
*Procedure
@@ATTENTION@@ : Desactiver ''unison'' avant la mise à jour
Vérifier que la même version se trouve sur les deux plate-formes

Mettez à jour votre Mageia 7 : {{{urpmi --auto-update}}}
Effacez les dépôts de Mageia 7 : {{{urpmi.removemedia -a}}}
Ajoutez ceux de Mageia 8 : {{{urpmi.addmedia --distrib --mirrorlist 'http://mirrors.mageia.org/api/mageia.8.$ARCH.list'}}}
Lancez la mise à niveau : {{{urpmi --auto-update --auto --force}}}
Relancez la dernière commande, par sécurité
*Corrections
La variable par défaut de Perl (@INC) pointe sur {{{/usr/local/lib64/perl5/5.32}}} au lieu de {{{/usr/local/lib64/perl5}}}
Un lien est donc créé dans {{{/usr/local/lib64/perl5}}} de '' '5.32' '' ver '' '.' ''
Qemu
@@ATTENTION@@ : Accès en ''https'' pour permettre l'accès à l'appareil photo
*Localisation
** IHM : gestion/m/
**Backend : gestion/app
*Paramétrage
**
*Plugin utilisé:
**https://blog.minhazav.dev/research/html5-qrcode
*Lancé par /etc/cron.daily/webalizer
*Génération des statistiques Web
!Changer l'emplacement du répertoire ''Documents''
*
*[[Site|https://www.wireguard.com/]]
*Configuration : {{{/etc/wireguard}}}
*[[IOS|https://wireguard.how/client/ios/]]
!Interfaces
!!!''wg0''
Interface pour la synchro (unison)
!!!''wg4''
Interface pour les accès distants (Mobiles/Desktops)
IP : 192.168.4.0/24
Port : 58124
!!!''wg2''
Interface pour l'interco entre @@colverts@@ et @@hommeries@@
*Cygwin
**Installer cygwinX sous Windows
**Modifier le script de lancement  //''startx''// ou //''startxwin''// pour la connexion distante
**Faire '{{{xhost +}}}' dans une fenêtre shell pour autoriser la connexion distante
*Xming
**Utilise le "X11 Forwarding de Putty"
**Lancer Xming
**Paramétrer le ''X11 Forwarding'' dans la session Putty
**Lancer l'appli sur le serveur
Fichier à configurer :
* Xaccess
* Xservers
* kdmrc (ou autre en fonction du Display Manager choisi)

@@ATTENTION@@ xdmcp ne supporte pas le masquerading

cygwin-X : lancer Gygwin, puis ''startxwin """-- -"""listen tcp''
<<slider br3 [[minil2]] "Image" "Voir la photo">>
*[[Zigbee Switch Mural mini|https://itead.cc/product/sonoff-zbminil2-extreme-zigbee-smart-switch-no-neutral-required]]
https://github.com/fairecasoimeme/Zlinky_TIC
https://www.zigbee2mqtt.io/
{{{
use strict;

# a minimalistic configuration file for amavisd-new with all necessary settings
#
#   see amavisd.conf-default for a list of all variables with their defaults;
#   for more details see documentation in INSTALL, README_FILES/*
#   and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html


# COMMONLY ADJUSTED SETTINGS:

# @bypass_virus_checks_maps = (1);  # controls running of anti-virus code
# @bypass_spam_checks_maps  = (1);  # controls running of anti-spam code
# $bypass_decode_parts = 1;         # controls running of decoders&dearchivers

$max_servers = 2;            # num of pre-forked children (2..30 is common), -m
$daemon_user  = 'amavis';     # (no default;  customary: vscan or amavis), -u
$daemon_group = 'amavis';     # (no default;  customary: vscan or amavis), -g

$mydomain = 'metivier.fr';
#(my $__hn,$mydomain) = split (/\./, $myhostname, 2); # try to discover domainname,
                             # a convenient default for other settings could be localhost.localdomain
                             # or change this as your needs


$MYHOME = '/var/run/amavis';   # a convenient default for other settings, -H
$TEMPBASE = "$MYHOME/tmp";   # working directory, needs to exist, -T
$ENV{TMPDIR} = $TEMPBASE;    # environment variable TMPDIR, used by SA, etc.
$QUARANTINEDIR = '/var/spool/amavis/virusmails';  # -Q
# $quarantine_subdir_levels = 1;  # add level of subdirs to disperse quarantine
# $release_format = 'resend';     # 'attach', 'plain', 'resend'
# $report_format  = 'arf';        # 'attach', 'plain', 'resend', 'arf'

# $daemon_chroot_dir = $MYHOME;   # chroot directory or undef, -R

# $db_home   = "$MYHOME/db";      # dir for bdb nanny/cache/snmp databases, -D
# $helpers_home = "$MYHOME/var";  # working directory for SpamAssassin, -S
# $lock_file = "$MYHOME/var/lib/amavisd.lock";  # -L
# $pid_file  = "$MYHOME/var/lib/amavisd.pid";   # -P
#NOTE: create directories $MYHOME/tmp, $MYHOME/var, $MYHOME/db manually

$log_level = 0;              # verbosity 0..5, -d
$log_recip_templ = undef;    # disable by-recipient level-0 log entries
$do_syslog = 1;              # log via syslogd (preferred)
$syslog_facility = 'mail';   # Syslog facility as a string
           # e.g.: mail, daemon, user, local0, ... local7

$enable_db = 1;              # enable use of BerkeleyDB/libdb (SNMP and nanny)
# $enable_zmq = 1;           # enable use of ZeroMQ (SNMP and nanny)
$nanny_details_level = 2;    # nanny verbosity: 1: traditional, 2: detailed

$enable_dkim_verification = 1;  # enable DKIM signatures verification
$enable_dkim_signing = 1;    # load DKIM signing code, keys defined by dkim_key

dkim_key('metivier.fr', 'dkim', '/var/db/dkim/metivier.fr.pem');
@dkim_signature_options_bysender_maps = (
   '.' =>  ttl => 21*24*3600, c => 'relaxed/simple'   );



@local_domains_maps = ( [".$mydomain"] );  # list of all local domains

@mynetworks = qw( 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10
                  10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 );

$unix_socketname = "$MYHOME/amavisd.sock";  # amavisd-release or amavis-milter
               # option(s) -p overrides $inet_socket_port and $unix_socketname

$inet_socket_port = [10024,10026];   # listen on this local TCP port(s)
# $inet_socket_port = [10024,10026];  # listen on multiple TCP ports

# Supprimer les champs Received
$allowed_added_header_fields{lc('Received')} = 0;

$policy_bank{'MYNETS'} = {   # mail originating from @mynetworks
# Ajouté le 22-09-020
  bypass_spam_checks_maps => [1], # don't spam-check internal mail
  bypass_banned_checks_maps => [1], # don't banned-check internal mail
  final_spam_destiny => D_PASS,
  final_banned_destiny => D_PASS,
#
  originating => 1,  # is true in MYNETS by default, but let's make it explicit
  os_fingerprint_method => undef,  # don't query p0f for internal clients
};

# it is up to MTA to re-route mail from authenticated roaming users or
# from internal hosts to a dedicated TCP port (such as 10026) for filtering
$interface_policy{'10026'} = 'ORIGINATING';

$policy_bank{'ORIGINATING'} = {  # mail supposedly originating from our users
  originating => 1,  # declare that mail was submitted by our smtp client
  allow_disclaimers => 1,  # enables disclaimer insertion if available
  # notify administrator of locally originating malware
  virus_admin_maps => ["virusalert\@$mydomain"],
  spam_admin_maps  => ["virusalert\@$mydomain"],
  warnbadhsender   => 1,
  # forward to a smtpd service providing DKIM signing service
  # forward_method => 'smtp:[127.0.0.1]:10027',
  # force MTA conversion to 7-bit (e.g. before DKIM signing)
  smtpd_discard_ehlo_keywords => ['8BITMIME'],
  bypass_banned_checks_maps => [1],  # allow sending any file names and types
  bypass_spam_checks_maps   => [1],  # don't spam-check outgoing mail 
  bypass_header_checks_maps => [0],  # header-check outgoing mail  
  terminate_dsn_on_notify_success => 0,  # don't remove NOTIFY=SUCCESS option
};

$interface_policy{'SOCK'} = 'AM.PDP-SOCK'; # only applies with $unix_socketname

# Use with amavis-release over a socket or with Petr Rehor's amavis-milter.c
# (with amavis-milter.c from this package or old amavis.c client use 'AM.CL'):
$policy_bank{'AM.PDP-SOCK'} = {
  protocol => 'AM.PDP',
  auth_required_release => 0,  # do not require secret_id for amavisd-release
};

$sa_tag_level_deflt  = 0.0;  # add spam info headers if at, or above that level
$sa_tag2_level_deflt = 4.5;  # add 'spam detected' headers at that level
$sa_kill_level_deflt = 4.7;  # triggers spam evasive actions (e.g. blocks mail)
$sa_dsn_cutoff_level = 10;   # spam level beyond which a DSN is not sent
$sa_crediblefrom_dsn_cutoff_level = 18; # likewise, but for a likely valid From
# $sa_quarantine_cutoff_level = 25; # spam level beyond which quarantine is off
$penpals_bonus_score = 8;    # (no effect without a @storage_sql_dsn database)
$penpals_threshold_high = $sa_kill_level_deflt;  # don't waste time on hi spam
$bounce_killer_score = 100;  # spam score points to add for joe-jobbed bounces

$sa_mail_body_size_limit = 512*1024; # don't waste time on SA if mail is larger
$sa_local_tests_only = 0;    # only tests which do not require internet access?

# @lookup_sql_dsn =
#   ( ['DBI:mysql:database=mail;host=127.0.0.1;port=3306', 'user1', 'passwd1'],
#     ['DBI:mysql:database=mail;host=host2', 'username2', 'password2'],
#     ["DBI:SQLite:dbname=$MYHOME/sql/mail_prefs.sqlite", '', ''] );
# @storage_sql_dsn = @lookup_sql_dsn;  # none, same, or separate database
# @storage_redis_dsn = ( {server=>'127.0.0.1:6379', db_id=>1} );
# $redis_logging_key = 'amavis-log';
# $redis_logging_queue_size_limit = 300000;  # about 250 MB / 100000

# $timestamp_fmt_mysql = 1; # if using MySQL *and* msgs.time_iso is TIMESTAMP;
#   defaults to 0, which is good for non-MySQL or if msgs.time_iso is CHAR(16)

$virus_admin               = "virusalert\@$mydomain";  # notifications recip.

$mailfrom_notify_admin     = "virusalert\@$mydomain";  # notifications sender
$mailfrom_notify_recip     = "virusalert\@$mydomain";  # notifications sender
$mailfrom_notify_spamadmin = "postmaster\@$mydomain"; # notifications sender
$mailfrom_to_quarantine = ''; # null return path; uses original sender if undef

@addr_extension_virus_maps      = ('virus');
@addr_extension_banned_maps     = ('banned');
@addr_extension_spam_maps       = ('spam');
@addr_extension_bad_header_maps = ('badh');
# $recipient_delimiter = '+';  # undef disables address extensions altogether
# when enabling addr extensions do also Postfix/main.cf: recipient_delimiter=+

@whitelist_sender_maps = (['nagios@metivier.fr']);

$path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin';
# $dspam = 'dspam';

$MAXLEVELS = 14;
$MAXFILES = 3000;
$MIN_EXPANSION_QUOTA =      100*1024;  # bytes  (default undef, not enforced)
$MAX_EXPANSION_QUOTA = 500*1024*1024;  # bytes  (default undef, not enforced)

$sa_spam_subject_tag = '***Spam*** ';
$defang_virus  = 1;  # MIME-wrap passed infected mail
$defang_banned = 1;  # MIME-wrap passed mail containing banned name
# for defanging bad headers only turn on certain minor contents categories:
$defang_by_ccat{CC_BADH.",3"} = 1;  # NUL or CR character in header
$defang_by_ccat{CC_BADH.",5"} = 1;  # header line longer than 998 characters
$defang_by_ccat{CC_BADH.",6"} = 1;  # header field syntax error


# OTHER MORE COMMON SETTINGS (defaults may suffice):

# $myhostname = 'host.example.com';  # must be a fully-qualified domain name!

 $notify_method  = 'smtp:[127.0.0.1]:10025';
 $forward_method = 'smtp:[127.0.0.1]:10025';  # set to undef with milter!

# $final_virus_destiny      = D_DISCARD;
# $final_banned_destiny     = D_DISCARD;
# $final_spam_destiny       = D_PASS;  #!!!  D_DISCARD / D_REJECT
# $final_bad_header_destiny = D_PASS;
# $bad_header_quarantine_method = undef;

# $os_fingerprint_method = 'p0f:*:2345';  # to query p0f-analyzer.pl

## hierarchy by which a final setting is chosen:
##   policy bank (based on port or IP address) -> *_by_ccat
##   *_by_ccat (based on mail contents) -> *_maps
##   *_maps (based on recipient address) -> final configuration value


# SOME OTHER VARIABLES WORTH CONSIDERING (see amavisd.conf-default for all)

# $warnbadhsender,
# $warnvirusrecip, $warnbannedrecip, $warnbadhrecip, (or @warn*recip_maps)
#
# @bypass_virus_checks_maps, @bypass_spam_checks_maps,
# @bypass_banned_checks_maps, @bypass_header_checks_maps,
#
# @virus_lovers_maps, @spam_lovers_maps,
# @banned_files_lovers_maps, @bad_header_lovers_maps,
#
# @blacklist_sender_maps, @score_sender_maps,
#
# $clean_quarantine_method, $virus_quarantine_to, $banned_quarantine_to,
# $bad_header_quarantine_to, $spam_quarantine_to,
#
# $defang_bad_header, $defang_undecipherable, $defang_spam


# REMAINING IMPORTANT VARIABLES ARE LISTED HERE BECAUSE OF LONGER ASSIGNMENTS

@keep_decoded_original_maps = (new_RE(
  qr'^MAIL$',                # let virus scanner see full original message
  qr'^MAIL-UNDECIPHERABLE$', # same as ^MAIL$ if mail is undecipherable
  qr'^(ASCII(?! cpio)|text|uuencoded|xxencoded|binhex)'i,
# qr'^Zip archive data',     # don't trust Archive::Zip
));


$banned_filename_re = new_RE(

### BLOCKED ANYWHERE
# qr'^UNDECIPHERABLE$',  # is or contains any undecipherable components
  qr'^\.(exe-ms|dll)$',                   # banned file(1) types, rudimentary
# qr'^\.(exe|lha|cab|dll)$',              # banned file(1) types

### BLOCK THE FOLLOWING, EXCEPT WITHIN UNIX ARCHIVES:
# [ qr'^\.(gz|bz2)$'             => 0 ],  # allow any in gzip or bzip2
  [ qr'^\.(rpm|cpio|tar)$'       => 0 ],  # allow any in Unix-type archives

  qr'.\.(pif|scr)$'i,                     # banned extensions - rudimentary
# qr'^\.zip$',                            # block zip type

### BLOCK THE FOLLOWING, EXCEPT WITHIN ARCHIVES:
# [ qr'^\.(zip|rar|arc|arj|zoo)$'=> 0 ],  # allow any within these archives

  qr'^application/x-msdownload$'i,        # block these MIME types
  qr'^application/x-msdos-program$'i,
  qr'^application/hta$'i,

# qr'^message/partial$'i,         # rfc2046 MIME type
# qr'^message/external-body$'i,   # rfc2046 MIME type

# qr'^(application/x-msmetafile|image/x-wmf)$'i,  # Windows Metafile MIME type
# qr'^\.wmf$',                            # Windows Metafile file(1) type

  # block certain double extensions in filenames
  qr'^(?!cid:).*\.[^./]*[A-Za-z][^./]*\.\s*(exe|vbs|pif|scr|bat|cmd|com|cpl|dll)[.\s]*$'i,

# qr'\{[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}\}?'i, # Class ID CLSID, strict
# qr'\{[0-9a-z]{4,}(-[0-9a-z]{4,}){0,7}\}?'i, # Class ID extension CLSID, loose

  qr'.\.(exe|vbs|pif|scr|cpl)$'i,             # banned extension - basic
# qr'.\.(exe|vbs|pif|scr|cpl|bat|cmd|com)$'i, # banned extension - basic+cmd
# qr'.\.(ade|adp|app|bas|bat|chm|cmd|com|cpl|crt|emf|exe|fxp|grp|hlp|hta|
#        inf|ini|ins|isp|js|jse|lib|lnk|mda|mdb|mde|mdt|mdw|mdz|msc|msi|
#        msp|mst|ocx|ops|pcd|pif|prg|reg|scr|sct|shb|shs|sys|vb|vbe|vbs|vxd|
#        wmf|wsc|wsf|wsh)$'ix,                # banned extensions - long
# qr'.\.(asd|asf|asx|url|vcs|wmd|wmz)$'i,     # consider also
# qr'.\.(ani|cur|ico)$'i,                 # banned cursors and icons filename
# qr'^\.ani$',                            # banned animated cursor file(1) type
# qr'.\.(mim|b64|bhx|hqx|xxe|uu|uue)$'i,  # banned extension - WinZip vulnerab.
);
# See http://support.microsoft.com/default.aspx?scid=kb;EN-US;q262631
# and http://www.cknow.com/vtutor/vtextensions.htm


# ENVELOPE SENDER SOFT-WHITELISTING / SOFT-BLACKLISTING

@score_sender_maps = ({ # a by-recipient hash lookup table,
                        # results from all matching recipient tables are summed

# ## per-recipient personal tables  (NOTE: positive: black, negative: white)
# 'user1@example.com'  => [{'bla-mobile.press@example.com' => 10.0}],
# 'user3@example.com'  => [{'.ebay.com'                 => -3.0}],
# 'user4@example.com'  => [{'cleargreen@cleargreen.com' => -7.0,
#                           '.cleargreen.com'           => -5.0}],

  ## site-wide opinions about senders (the '.' matches any recipient)
  '.' => [  # the _first_ matching sender determines the score boost

   new_RE(  # regexp-type lookup table, just happens to be all soft-blacklist
    [qr'^(bulkmail|offers|cheapbenefits|earnmoney|foryou)@'i         => 5.0],
    [qr'^(greatcasino|investments|lose_weight_today|market\.alert)@'i=> 5.0],
    [qr'^(money2you|MyGreenCard|new\.tld\.registry|opt-out|opt-in)@'i=> 5.0],
    [qr'^(optin|saveonlsmoking2002k|specialoffer|specialoffers)@'i   => 5.0],
    [qr'^(stockalert|stopsnoring|wantsome|workathome|yesitsfree)@'i  => 5.0],
    [qr'^(your_friend|greatoffers)@'i                                => 5.0],
    [qr'^(inkjetplanet|marketopt|MakeMoney)\d*@'i                    => 5.0],
   ),

#  read_hash("/var/lib/amavis/sender_scores_sitewide"),

   { # a hash-type lookup table (associative array)
     'nobody@cert.org'                        => -3.0,
     'cert-advisory@us-cert.gov'              => -3.0,
     'owner-alert@iss.net'                    => -3.0,
     'slashdot@slashdot.org'                  => -3.0,
     'securityfocus.com'                      => -3.0,
     'ntbugtraq@listserv.ntbugtraq.com'       => -3.0,
     'security-alerts@linuxsecurity.com'      => -3.0,
     'mailman-announce-admin@python.org'      => -3.0,
     'amavis-user-admin@lists.sourceforge.net'=> -3.0,
     'amavis-user-bounces@lists.sourceforge.net' => -3.0,
     'spamassassin.apache.org'                => -3.0,
     'notification-return@lists.sophos.com'   => -3.0,
     'owner-postfix-users@postfix.org'        => -3.0,
     'owner-postfix-announce@postfix.org'     => -3.0,
     'owner-sendmail-announce@lists.sendmail.org'   => -3.0,
     'sendmail-announce-request@lists.sendmail.org' => -3.0,
     'donotreply@sendmail.org'                => -3.0,
     'ca+envelope@sendmail.org'               => -3.0,
     'noreply@freshmeat.net'                  => -3.0,
     'owner-technews@postel.acm.org'          => -3.0,
     'ietf-123-owner@loki.ietf.org'           => -3.0,
     'cvs-commits-list-admin@gnome.org'       => -3.0,
     'rt-users-admin@lists.fsck.com'          => -3.0,
     'clp-request@comp.nus.edu.sg'            => -3.0,
     'surveys-errors@lists.nua.ie'            => -3.0,
     'emailnews@genomeweb.com'                => -5.0,
     'yahoo-dev-null@yahoo-inc.com'           => -3.0,
     'returns.groups.yahoo.com'               => -3.0,
     'clusternews@linuxnetworx.com'           => -3.0,
     lc('lvs-users-admin@LinuxVirtualServer.org')    => -3.0,
     lc('owner-textbreakingnews@CNNIMAIL12.CNN.COM') => -5.0,

     # soft-blacklisting (positive score)
     'sender@example.net'                     =>  3.0,
     '.example.net'                           =>  1.0,

   },
  ],  # end of site-wide tables
});


@decoders = (
  ['mail', \&do_mime_decode],
# [[qw(asc uue hqx ync)], \&do_ascii],  # not safe
  ['F',    \&do_uncompress, ['unfreeze', 'freeze -d', 'melt', 'fcat'] ],
  ['Z',    \&do_uncompress, ['uncompress', 'gzip -d', 'zcat'] ],
  ['gz',   \&do_uncompress, 'gzip -d'],
  ['gz',   \&do_gunzip],
  ['bz2',  \&do_uncompress, 'bzip2 -d'],
  ['xz',   \&do_uncompress,
           ['xzdec', 'xz -dc', 'unxz -c', 'xzcat'] ],
  ['lzma', \&do_uncompress,
           ['lzmadec', 'xz -dc --format=lzma',
            'lzma -dc', 'unlzma -c', 'lzcat', 'lzmadec'] ],
# not available in Mageia (mga#20816)
#  ['lrz',  \&do_uncompress,
#           ['lrzip -q -k -d -o -', 'lrzcat -q -k'] ],
  ['lzo',  \&do_uncompress, 'lzop -d'],
  ['rpm',  \&do_uncompress, ['rpm2cpio.pl', 'rpm2cpio'] ],
  [['cpio','tar'], \&do_pax_cpio, ['pax', 'gcpio', 'cpio'] ],
           # ['/usr/local/heirloom/usr/5bin/pax', 'pax', 'gcpio', 'cpio']
  ['deb',  \&do_ar, 'ar'],
# ['a',    \&do_ar, 'ar'],  # unpacking .a seems an overkill
  ['rar',  \&do_unrar, ['unrar', 'rar'] ],
  ['arj',  \&do_unarj, ['unarj', 'arj'] ],
  ['arc',  \&do_arc,   ['nomarch', 'arc'] ],
  ['zoo',  \&do_zoo,   ['zoo', 'unzoo'] ],
  ['doc',  \&do_ole,   'ripole'],
  ['cab',  \&do_cabextract, 'cabextract'],
  ['tnef', \&do_tnef_ext, 'tnef'],
  ['tnef', \&do_tnef],
# ['lha',  \&do_lha,   'lha'],  # not safe, use 7z instead
# ['sit',  \&do_unstuff, 'unstuff'],  # not safe
  [['zip','kmz'], \&do_7zip,  ['7za', '7z'] ],
  [['zip','kmz'], \&do_unzip],
  ['7z',   \&do_7zip,  ['7zr', '7za', '7z'] ],
  [[qw(7z zip gz bz2 Z tar)],
           \&do_7zip,  ['7za', '7z'] ],
  [[qw(xz lzma jar cpio arj rar swf lha iso cab deb rpm)],
           \&do_7zip,  '7z' ],
  ['exe',  \&do_executable, ['unrar','rar'], 'lha', ['unarj','arj'] ],
);


@av_scanners = (

# ### http://www.sophos.com/
# ['Sophos-SSSP',  # SAV Dynamic Interface
#   \&ask_daemon, ["{}", 'sssp:/var/run/savdi/sssp.sock'],
#           # or: ["{}", 'sssp:[127.0.0.1]:4010'],
#   qr/^DONE OK\b/m, qr/^VIRUS\b/m, qr/^VIRUS\s*(\S*)/m ],

# ### http://www.clanfield.info/sophie/ (http://www.vanja.com/tools/sophie/)
# ['Sophie',
#   \&ask_daemon, ["{}/\n", 'sophie:/var/run/sophie'],
#   qr/(?x)^ 0+ ( : | [\000\r\n]* $)/,  qr/(?x)^ 1 ( : | [\000\r\n]* $)/,
#   qr/(?x)^ [-+]? \d+ : (.*?) [\000\r\n]* $/m ],

# ### http://www.csupomona.edu/~henson/www/projects/SAVI-Perl/
# ['Sophos SAVI', \&ask_daemon, ['{}','savi-perl:'] ],

# ['Avira SAVAPI',
#   \&ask_daemon, ["*", 'savapi:/var/tmp/.savapi3', 'product-id'],
#   qr/^(200|210)/m,  qr/^(310|420|319)/m,
#   qr/^(?:310|420)[,\s]*(?:.* <<< )?(.+?)(?: ; |$)/m ],
# settings for the SAVAPI3.conf: ArchiveScan=1, HeurLevel=2, MailboxScan=1

# ### http://www.clamav.net/
['ClamAV-clamd',
   \&ask_daemon, ["CONTSCAN {}\n", "/var/lib/clamav/clamd.socket"],
   qr/\bOK$/m, qr/\bFOUND$/m,
   qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
# # NOTE: run clamd under the same user as amavisd - or run it under its own
# #   uid such as clamav, add user clamav to the amavis group, and then add
# #   AllowSupplementaryGroups to clamd.conf;
# # NOTE: match socket name (LocalSocket) in clamav.conf to the socket name in
# #   this entry; when running chrooted one may prefer a socket under $MYHOME.

# ### http://www.clamav.net/ and CPAN  (memory-hungry! clamd is preferred)
# # note that Mail::ClamAV requires perl to be build with threading!
# ['Mail::ClamAV', \&ask_daemon, ['{}','clamav-perl:'],
#   [0], [1], qr/^INFECTED: (.+)/m],

# ### http://www.openantivirus.org/
# ['OpenAntiVirus ScannerDaemon (OAV)',
#   \&ask_daemon, ["SCAN {}\n", '127.0.0.1:8127'],
#   qr/^OK/m, qr/^FOUND: /m, qr/^FOUND: (.+)/m ],

# ### http://www.vanja.com/tools/trophie/
# ['Trophie',
#   \&ask_daemon, ["{}/\n", 'trophie:/var/run/trophie'],
#   qr/(?x)^ 0+ ( : | [\000\r\n]* $)/m,  qr/(?x)^ 1 ( : | [\000\r\n]* $)/m,
#   qr/(?x)^ [-+]? \d+ : (.*?) [\000\r\n]* $/m ],

# ### http://www.grisoft.com/
# ['AVG Anti-Virus',
#   \&ask_daemon, ["SCAN {}\n", '127.0.0.1:55555'],
#   qr/^200/m, qr/^403/m, qr/^403[- ].*: ([^\r\n]+)/m ],

# ### http://www.f-prot.com/
# ['F-Prot fpscand',  # F-PROT Antivirus for BSD/Linux/Solaris, version 6
#   \&ask_daemon,
#   ["SCAN FILE {}/*\n", '127.0.0.1:10200'],
#   qr/^(0|8|64) /m,
#   qr/^([1235679]|1[01345]) |<[^>:]*(?i)(infected|suspicious|unwanted)/m,
#   qr/(?i)<[^>:]*(?:infected|suspicious|unwanted)[^>:]*: ([^>]*)>/m ],

# ### http://www.f-prot.com/
# ['F-Prot f-protd',  # old version
#   \&ask_daemon,
#   ["GET {}/*?-dumb%20-archive%20-packed HTTP/1.0\r\n\r\n",
#     ['127.0.0.1:10200', '127.0.0.1:10201', '127.0.0.1:10202',
#      '127.0.0.1:10203', '127.0.0.1:10204'] ],
#   qr/(?i)<summary[^>]*>clean<\/summary>/m,
#   qr/(?i)<summary[^>]*>infected<\/summary>/m,
#   qr/(?i)<name>(.+)<\/name>/m ],

# ### http://www.sald.com/, http://www.dials.ru/english/, http://www.drweb.ru/
# ['DrWebD', \&ask_daemon,   # DrWebD 4.31 or later
#   [pack('N',1).  # DRWEBD_SCAN_CMD
#    pack('N',0x00280001).   # DONT_CHANGEMAIL, IS_MAIL, RETURN_VIRUSES
#    pack('N',     # path length
#      length("$TEMPBASE/amavis-yyyymmddTHHMMSS-xxxxx/parts/pxxx")).
#    '{}/*'.       # path
#    pack('N',0).  # content size
#    pack('N',0),
#    '/var/drweb/run/drwebd.sock',
#  # '/var/lib/amavis/var/run/drwebd.sock',   # suitable for chroot
#  # '/usr/local/drweb/run/drwebd.sock',  # FreeBSD drweb ports default
#  # '127.0.0.1:3000',                    # or over an inet socket
#   ],
#   qr/\A\x00[\x10\x11][\x00\x10]\x00/sm,        # IS_CLEAN,EVAL_KEY; SKIPPED
#   qr/\A\x00[\x00\x01][\x00\x10][\x20\x40\x80]/sm,# KNOWN_V,UNKNOWN_V,V._MODIF
#   qr/\A.{12}(?:infected with )?([^\x00]+)\x00/sm,
# ],
# # NOTE: If using amavis-milter, change length to:
# # length("$TEMPBASE/amavis-milter-xxxxxxxxxxxxxx/parts/pxxx").

  ### http://www.kaspersky.com/  (kav4mailservers)
  ['KasperskyLab AVP - aveclient',
    ['/usr/local/kav/bin/aveclient','/usr/local/share/kav/bin/aveclient',
     '/opt/kav/5.5/kav4mailservers/bin/aveclient','aveclient'],
    '-p /var/run/aveserver -s {}/*',
    [0,3,6,8], qr/\b(INFECTED|SUSPICION|SUSPICIOUS)\b/m,
    qr/(?:INFECTED|WARNING|SUSPICION|SUSPICIOUS) (.+)/m,
  ],
  # NOTE: one may prefer [0],[2,3,4,5], depending on how suspicious,
  # currupted or protected archives are to be handled

  ### http://www.kaspersky.com/
  ['KasperskyLab AntiViral Toolkit Pro (AVP)', ['avp'],
    '-* -P -B -Y -O- {}', [0,3,6,8], [2,4],    # any use for -A -K   ?
    qr/infected: (.+)/m,
    sub {chdir('/opt/AVP') or die "Can't chdir to AVP: $!"},
    sub {chdir($TEMPBASE) or die "Can't chdir back to $TEMPBASE $!"},
  ],

  ### The kavdaemon and AVPDaemonClient have been removed from Kasperky
  ### products and replaced by aveserver and aveclient
  ['KasperskyLab AVPDaemonClient',
    [ '/opt/AVP/kavdaemon',       'kavdaemon',
      '/opt/AVP/AvpDaemonClient', 'AvpDaemonClient',
      '/opt/AVP/AvpTeamDream',    'AvpTeamDream',
      '/opt/AVP/avpdc', 'avpdc' ],
    "-f=$TEMPBASE {}", [0,8], [3,4,5,6], qr/infected: ([^\r\n]+)/m ],
    # change the startup-script in /etc/init.d/kavd to:
    #   DPARMS="-* -Y -dl -f=/var/lib/amavis /var/lib/amavis"
    #   (or perhaps:   DPARMS="-I0 -Y -* /var/lib/amavis" )
    # adjusting /var/lib/amavis above to match your $TEMPBASE.
    # The '-f=/var/lib/amavis' is needed if not running it as root, so it
    # can find, read, and write its pid file, etc., see 'man kavdaemon'.
    # defUnix.prf: there must be an entry "*/var/lib/amavis" (or whatever
    #   directory $TEMPBASE specifies) in the 'Names=' section.
    # cd /opt/AVP/DaemonClients; configure; cd Sample; make
    # cp AvpDaemonClient /opt/AVP/
    # su - vscan -c "${PREFIX}/kavdaemon ${DPARMS}"

  ### http://www.centralcommand.com/
  ['CentralCommand Vexira (new) vascan',
    ['vascan','/usr/lib/Vexira/vascan'],
    "-a s --timeout=60 --temp=$TEMPBASE -y $QUARANTINEDIR ".
    "--log=/var/log/vascan.log {}",
    [0,3], [1,2,5],
    qr/(?x)^\s* (?:virus|iworm|macro|mutant|sequence|trojan)\ found:\ ( [^\]\s']+ )\ \.\.\.\ /m ],
    # Adjust the path of the binary and the virus database as needed.
    # 'vascan' does not allow to have the temp directory to be the same as
    # the quarantine directory, and the quarantine option can not be disabled.
    # If $QUARANTINEDIR is not used, then another directory must be specified
    # to appease 'vascan'. Move status 3 to the second list if password
    # protected files are to be considered infected.

  ### http://www.avira.com/
  ### old Avira AntiVir 2.x (ex H+BEDV) or old CentralCommand Vexira Antivirus
  ['Avira AntiVir', ['antivir','vexira'],
    '--allfiles -noboot -nombr -rs -s -z {}', [0], qr/ALERT:|VIRUS:/m,
    qr/(?x)^\s* (?: ALERT: \s* (?: \[ | [^']* ' ) |
         (?i) VIRUS:\ .*?\ virus\ '?) ( [^\]\s']+ )/m ],
    # NOTE: if you only have a demo version, remove -z and add 214, as in:
    #  '--allfiles -noboot -nombr -rs -s {}', [0,214], qr/ALERT:|VIRUS:/,

  ### http://www.avira.com/
  ### Avira for UNIX 3.x
  ['Avira AntiVir', ['avscan'],
   '-s --batch --alert-action=none {}', [0,4], qr/(?:ALERT|FUND):/m,
   qr/(?:ALERT|FUND): (?:.* <<< )?(.+?)(?: ; |$)/m ],

  ### http://www.commandsoftware.com/
  ['Command AntiVirus for Linux', 'csav',
    '-all -archive -packed {}', [50], [51,52,53],
    qr/Infection: (.+)/m ],

  ### http://www.symantec.com/
  ['Symantec CarrierScan via Symantec CommandLineScanner',
    'cscmdline', '-a scan -i 1 -v -s 127.0.0.1:7777 {}',
    qr/^Files Infected:\s+0$/m, qr/^Infected\b/m,
    qr/^(?:Info|Virus Name):\s+(.+)/m ],

  ### http://www.symantec.com/
  ['Symantec AntiVirus Scan Engine',
    'savsecls', '-server 127.0.0.1:7777 -mode scanrepair -details -verbose {}',
    [0], qr/^Infected\b/m,
    qr/^(?:Info|Virus Name):\s+(.+)/m ],
    # NOTE: check options and patterns to see which entry better applies

# ### http://www.f-secure.com/products/anti-virus/  version 5.52
#  ['F-Secure Antivirus for Linux servers',
#   ['/opt/f-secure/fsav/bin/fsav', 'fsav'],
#   '--virus-action1=report --archive=yes --auto=yes '.
#   '--dumb=yes --list=no --mime=yes {}', [0], [3,4,6,8],
#   qr/(?:infection|Infected|Suspected|Riskware): (.+)/m ],
#   # NOTE: internal archive handling may be switched off by '--archive=no'
#   #   to prevent fsav from exiting with status 9 on broken archives

  ### http://www.f-secure.com/ version 9.14
   ['F-Secure Linux Security',
    ['/opt/f-secure/fsav/bin/fsav', 'fsav'],
    '--virus-action1=report --archive=yes --auto=yes '.
    '--list=no --nomimeerr {}', [0], [3,4,6,8],
    qr/(?:infection|Infected|Suspected|Riskware): (.+)/m ],
    # NOTE: internal archive handling may be switched off by '--archive=no'
    #   to prevent fsav from exiting with status 9 on broken archives

# ### http://www.avast.com/
# ['avast! Antivirus daemon',
#   \&ask_daemon,  # greets with 220, terminate with QUIT
#   ["SCAN {}\015\012QUIT\015\012", '/var/run/avast4/mailscanner.sock'],
#   qr/\t\[\+\]/m, qr/\t\[L\]\t/m, qr/\t\[L\]\t[0-9]+\s+([^[ \t\015\012]+)/m ],

# ### http://www.avast.com/
# ['avast! Antivirus - Client/Server Version', 'avastlite',
#   '-a /var/run/avast4/mailscanner.sock -n {}', [0], [1],
#   qr/\t\[L\]\t([^[ \t\015\012]+)/m ],

  ['CAI InoculateIT', 'inocucmd',  # retired product
    '-sec -nex {}', [0], [100],
    qr/was infected by virus (.+)/m ],
  # see: http://www.flatmtn.com/computer/Linux-Antivirus_CAI.html

  ### http://www3.ca.com/Solutions/Product.asp?ID=156  (ex InoculateIT)
  ['CAI eTrust Antivirus', 'etrust-wrapper',
    '-arc -nex -spm h {}', [0], [101],
    qr/is infected by virus: (.+)/m ],
    # NOTE: requires suid wrapper around inocmd32; consider flag: -mod reviewer
    # see http://marc.theaimsgroup.com/?l=amavis-user&m=109229779912783

  ### http://mks.com.pl/english.html
  ['MkS_Vir for Linux (beta)', ['mks32','mks'],
    '-s {}/*', [0], [1,2],
    qr/--[ \t]*(.+)/m ],

  ### http://mks.com.pl/english.html
  ['MkS_Vir daemon', 'mksscan',
    '-s -q {}', [0], [1..7],
    qr/^... (\S+)/m ],

# ### http://www.nod32.com/,  version v2.52 (old)
# ['ESET NOD32 for Linux Mail servers',
#   ['/opt/eset/nod32/bin/nod32cli', 'nod32cli'],
#    '--subdir --files -z --sfx --rtp --adware --unsafe --pattern --heur '.
#    '-w -a --action-on-infected=accept --action-on-uncleanable=accept '.
#    '--action-on-notscanned=accept {}',
#   [0,3], [1,2], qr/virus="([^"]+)"/m ],

# ### http://www.eset.com/, version v2.7 (old)
# ['ESET NOD32 Linux Mail Server - command line interface',
#   ['/usr/bin/nod32cli', '/opt/eset/nod32/bin/nod32cli', 'nod32cli'],
#   '--subdir {}', [0,3], [1,2], qr/virus="([^"]+)"/m ],

# ### http://www.eset.com/, version 2.71.12
# ['ESET Software ESETS Command Line Interface',
#   ['/usr/bin/esets_cli', 'esets_cli'],
#   '--subdir {}', [0], [1,2,3], qr/virus="([^"]+)"/m ],

  ### http://www.eset.com/, version 3.0
  ['ESET Software ESETS Command Line Interface',
    ['/usr/bin/esets_cli', 'esets_cli'],
    '--subdir {}', [0], [1,2,3],
    qr/:\s*action="(?!accepted)[^"]*"\n.*:\s*virus="([^"]*)"/m ],

  ## http://www.nod32.com/,  NOD32LFS version 2.5 and above
  ['ESET NOD32 for Linux File servers',
    ['/opt/eset/nod32/sbin/nod32','nod32'],
    '--files -z --mail --sfx --rtp --adware --unsafe --pattern --heur '.
    '-w -a --action=1 -b {}',
    [0], [1,10], qr/^object=.*, virus="(.*?)",/m ],

# Experimental, based on posting from Rado Dibarbora (Dibo) on 2002-05-31
# ['ESET Software NOD32 Client/Server (NOD32SS)',
#   \&ask_daemon2,    # greets with 200, persistent, terminate with QUIT
#   ["SCAN {}/*\r\n", '127.0.0.1:8448' ],
#   qr/^200 File OK/m, qr/^201 /m, qr/^201 (.+)/m ],

  ### http://www.norman.com/products_nvc.shtml
  ['Norman Virus Control v5 / Linux', 'nvcc',
    '-c -l:0 -s -u -temp:$TEMPBASE {}', [0,10,11], [1,2,14],
    qr/(?i).* virus in .* -> \'(.+)\'/m ],

  ### http://www.pandasoftware.com/
  ['Panda CommandLineSecure 9 for Linux',
    ['/opt/pavcl/usr/bin/pavcl','pavcl'],
    '-auto -aex -heu -cmp -nbr -nor -nos -eng -nob {}',
    qr/Number of files infected[ .]*: 0+(?!\d)/m,
    qr/Number of files infected[ .]*: 0*[1-9]/m,
    qr/Found virus :\s*(\S+)/m ],
  # NOTE: for efficiency, start the Panda in resident mode with 'pavcl -tsr'
  # before starting amavisd - the bases are then loaded only once at startup.
  # To reload bases in a signature update script:
  #   /opt/pavcl/usr/bin/pavcl -tsr -ulr; /opt/pavcl/usr/bin/pavcl -tsr
  # Please review other options of pavcl, for example:
  #  -nomalw, -nojoke, -nodial, -nohackt, -nospyw, -nocookies

# ### http://www.pandasoftware.com/
# ['Panda Antivirus for Linux', ['pavcl'],
#   '-TSR -aut -aex -heu -cmp -nbr -nor -nso -eng {}',
#   [0], [0x10, 0x30, 0x50, 0x70, 0x90, 0xB0, 0xD0, 0xF0],
#   qr/Found virus :\s*(\S+)/m ],

# GeCAD AV technology is acquired by Microsoft; RAV has been discontinued.
# Check your RAV license terms before fiddling with the following two lines!
# ['GeCAD RAV AntiVirus 8', 'ravav',
#   '--all --archive --mail {}', [1], [2,3,4,5], qr/Infected: (.+)/m ],
# # NOTE: the command line switches changed with scan engine 8.5 !
# # (btw, assigning stdin to /dev/null causes RAV to fail)

  ### http://www.nai.com/
  ['NAI McAfee AntiVirus (uvscan)', 'uvscan',
    '--secure -rv --mime --summary --noboot - {}', [0], [13],
    qr/(?x) Found (?:
        \ the\ (.+)\ (?:virus|trojan)  |
        \ (?:virus|trojan)\ or\ variant\ ([^ ]+)  |
        :\ (.+)\ NOT\ a\ virus)/m,
  # sub {$ENV{LD_PRELOAD}='/lib/libc.so.6'},
  # sub {delete $ENV{LD_PRELOAD}},
  ],
  # NOTE1: with RH9: force the dynamic linker to look at /lib/libc.so.6 before
  # anything else by setting environment variable LD_PRELOAD=/lib/libc.so.6
  # and then clear it when finished to avoid confusing anything else.
  # NOTE2: to treat encrypted files as viruses replace the [13] with:
  #  qr/^\s{5,}(Found|is password-protected|.*(virus|trojan))/

  ### http://www.virusbuster.hu/en/
  ['VirusBuster', ['vbuster', 'vbengcl'],
    "{} -ss -i '*' -log=$MYHOME/vbuster.log", [0], [1],
    qr/: '(.*)' - Virus/m ],
  # VirusBuster Ltd. does not support the daemon version for the workstation
  # engine (vbuster-eng-1.12-linux-i386-libc6.tgz) any longer. The names of
  # binaries, some parameters AND return codes have changed (from 3 to 1).
  # See also the new Vexira entry 'vascan' which is possibly related.

# ### http://www.virusbuster.hu/en/
# ['VirusBuster (Client + Daemon)', 'vbengd',
#   '-f -log scandir {}', [0], [3],
#   qr/Virus found = (.*);/m ],
# # HINT: for an infected file it always returns 3,
# # although the man-page tells a different story

  ### http://www.cyber.com/
  ['CyberSoft VFind', 'vfind',
    '--vexit {}/*', [0], [23], qr/##==>>>> VIRUS ID: CVDL (.+)/m,
  # sub {$ENV{VSTK_HOME}='/usr/lib/vstk'},
  ],

  ### http://www.avast.com/
  ['avast! Antivirus', ['/usr/bin/avastcmd','avastcmd'],
    '-a -i -n -t=A {}', [0], [1], qr/\binfected by:\s+([^ \t\n\[\]]+)/m ],

  ### http://www.ikarus-software.com/
  ['Ikarus AntiVirus for Linux', 'ikarus',
    '{}', [0], [40], qr/Signature (.+) found/m ],

  ### http://www.bitdefender.com/
  ['BitDefender', 'bdscan',  # new version
    '--action=ignore --no-list {}', qr/^Infected files\s*:\s*0+(?!\d)/m,
    qr/^(?:Infected files|Identified viruses|Suspect files)\s*:\s*0*[1-9]/m,
    qr/(?:suspected|infected)\s*:\s*(.*)(?:\033|$)/m ],

  ### http://www.bitdefender.com/
  ['BitDefender', 'bdc',  # old version
    '--arc --mail {}', qr/^Infected files *:0+(?!\d)/m,
    qr/^(?:Infected files|Identified viruses|Suspect files) *:0*[1-9]/m,
    qr/(?:suspected|infected): (.*)(?:\033|$)/m ],
  # consider also: --all --nowarn --alev=15 --flev=15.  The --all argument may
  # not apply to your version of bdc, check documentation and see 'bdc --help'

  ### ArcaVir for Linux and Unix http://www.arcabit.pl/
  ['ArcaVir for Linux', ['arcacmd','arcacmd.static'],
    '-v 1 -summary 0 -s {}', [0], [1,2],
    qr/(?:VIR|WIR):[ \t]*(.+)/m ],

# ### a generic SMTP-client interface to a SMTP-based virus scanner
# ['av_smtp', \&ask_av_smtp,
#   ['{}', 'smtp:[127.0.0.1]:5525', 'dummy@localhost'],
#   qr/^2/, qr/^5/, qr/^\s*(.*?)\s*$/m ],

# ['File::Scan', sub {Amavis::AV::ask_av(sub{
#   use File::Scan; my($fn)=@_;
#   my($f)=File::Scan->new(max_txt_size=>0, max_bin_size=>0);
#   my($vname) = $f->scan($fn);
#   $f->error ? (2,"Error: ".$f->error)
#   : ($vname ne '') ? (1,"$vname FOUND") : (0,"Clean")}, @_) },
#   ["{}/*"], [0], [1], qr/^(.*) FOUND$/m ],

# ### fully-fledged checker for JPEG marker segments of invalid length
# ['check-jpeg',
#   sub { use JpegTester (); Amavis::AV::ask_av(\&JpegTester::test_jpeg, @_) },
#   ["{}/*"], undef, [1], qr/^(bad jpeg: .*)$/m ],
# # NOTE: place file JpegTester.pm somewhere where Perl can find it,
# #       for example in /usr/local/lib/perl5/site_perl

);


@av_scanners_backup = (

  ### http://www.clamav.net/   - backs up clamd or Mail::ClamAV
  ['ClamAV-clamscan', 'clamscan',
    "--stdout --no-summary -r --tempdir=$TEMPBASE {}",
    [0], qr/:.*\sFOUND$/m, qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],

# ### http://www.clamav.net/ - using remote clamd scanner as a backup
# ['ClamAV-clamdscan', 'clamdscan',
#   "--stdout --no-summary --config-file=/etc/clamd-client.conf {}",
#   [0], qr/:.*\sFOUND$/m, qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],

# ['ClamAV-clamd-stream',
#   \&ask_daemon, ["*", 'clamd:/var/lib/clamav/clamd.socket'],
#   qr/\bOK$/m, qr/\bFOUND$/m,
#   qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],

  ### http://www.f-prot.com/   - backs up F-Prot Daemon, V6
  ['F-PROT Antivirus for UNIX', ['fpscan'],
    '--report --mount --adware {}',  # consider: --applications -s 4 -u 3 -z 10
    [0,8,64],  [1,2,3, 4+1,4+2,4+3, 8+1,8+2,8+3, 12+1,12+2,12+3],
    qr/^\[Found\s+[^\]]*\]\s+<([^ \t(>]*)/m ],

  ### http://www.f-prot.com/   - backs up F-Prot Daemon (old)
  ['FRISK F-Prot Antivirus', ['f-prot','f-prot.sh'],
    '-dumb -archive -packed {}', [0,8], [3,6],   # or: [0], [3,6,8],
    qr/(?:Infection:|security risk named) (.+)|\s+contains\s+(.+)$/m ],

  ### http://www.trendmicro.com/   - backs up Trophie
  ['Trend Micro FileScanner', ['/etc/iscan/vscan','vscan'],
    '-za -a {}', [0], qr/Found virus/m, qr/Found virus (.+) in/m ],

  ### http://www.sald.com/, http://drweb.imshop.de/   - backs up DrWebD
  ['drweb - DrWeb Antivirus',  # security LHA hole in Dr.Web 4.33 and earlier
    ['/usr/local/drweb/drweb', '/opt/drweb/drweb', 'drweb'],
    '-path={} -al -go -ot -cn -upn -ok-',
    [0,32], [1,9,33], qr' infected (?:with|by)(?: virus)? (.*)$'m ],

   ### http://www.kaspersky.com/
   ['Kaspersky Antivirus v5.5',
     ['/opt/kaspersky/kav4fs/bin/kav4fs-kavscanner',
      '/opt/kav/5.5/kav4unix/bin/kavscanner',
      '/opt/kav/5.5/kav4mailservers/bin/kavscanner', 'kavscanner'],
     '-i0 -xn -xp -mn -R -ePASBME {}/*', [0,10,15], [5,20,21,25],
     qr/(?:INFECTED|WARNING|SUSPICION|SUSPICIOUS) (.*)/m,
#    sub {chdir('/opt/kav/bin') or die "Can't chdir to kav: $!"},
#    sub {chdir($TEMPBASE) or die "Can't chdir back to $TEMPBASE $!"},
   ],

  ### http://www.sophos.com/
  ['Sophos Anti Virus (savscan)',   # formerly known as 'sweep'
    ['/opt/sophos-av/bin/savscan', 'savscan'],  # 'sweep'
    '-nb -f -all -rec -ss -sc -archive -cab -mime -oe -tnef '.
    '--no-reset-atime {}',
    [0,2], qr/Virus .*? found/m,
    qr/^>>> Virus(?: fragment)? '?(.*?)'? found/m,
  ],
  # other options to consider: -idedir=/usr/local/sav
  # A name 'sweep' clashes with a name of an audio editor (Debian and FreeBSD).
  # Make sure the correct 'sweep' is found in the path if using the old name.

# Always succeeds and considers mail clean.
# Potentially useful when all other scanners fail and it is desirable
# to let mail continue to flow with no virus checking (when uncommented).
# ['always-clean', sub {0}],

);


1;  # insure a defined return value


# $sa_debug = 1
}}}
[img[aqaracube.jpg]]
*Carte mère
**Asus
**[[B150M-A|http://chatillon.metivier.fr/Carte%20Meres/F10799_B150M-A_UM_WEB.pdf]]
**Socket LGA1151
**4 x 16 Go ~DDR4 2133 ( 64go)
*CPU
**[[Intel Core I3-6100 Dual  CPU @ 3,7 GHz|https://ark.intel.com/content/www/fr/fr/ark/products/90729/intel-core-i36100-processor-3m-cache-3-70-ghz.html]]  ([[Skylake|https://en.wikichip.org/wiki/intel/core_i3/i3-6100]])
**CPU Mark : 4.162
*GPU
**UHD 530
*Ecran
**[[Iiyame Prolite B2483HSU|http://chatillon.metivier.fr/Carte%20Meres/B_E2483HSU-DP-usermanual-f-revL]]
*BIOS
**Révision : AMI 0404 19/11/2015
*Mémoire
**2 x 4Go ~DDR4
*[[Disques]]
*Réseau
**1Gbs
*Réseau
**Realtek RTL8111/8168 (Motherboard)
***1Gbs
** Realtek ~RTL-8169
***1Gbs
**Realtek ~RTL-8139
***100Mbs
*Position des disques : http://chatillon.metivier.fr/Carte%20Meres/cm2.png
!!!Usage
{{{backsql [-v] [-p ssh_port] -h host}}}
!!!Fichier de configuration
{{{/etc/rsyncdb.conf}}}
!!!Description
Met à jour les bases de données identifiées dans le fichier de configuration
@@Obsolete@@ : remplacé par [[Unison]]
!!!Usage
{{{backup [-v] [-p ssh_port] -h host}}}
!!!Fichier de configuration
{{{/etc/rsync.conf}}}
!!!Description
Met à jour les fichiers modifiés, identifiés dans le fichier de configuration
Par défaut, pour chaque répertoire utilisateur, tout le contenu du répertoire est sauvegardé ({{{+ /home/user}}}), sauf les répertoires et fichiers cachés ({{{- /home/usr/.*}}})
!!!Usage
{{{/usr/bin/journalctl -S "today" -t auth | grep -v unknown | awk '{print substr($14,7)}' | sort | uniq -c | sort -g -r}}}
!!!Description
Tri par fréquences des journalisation de ''auth''
[img[sonoffr3.jpg]]
[img[cc2531.jpg]]
[img[uart.jpg]]
!![[Boot|Démarrage]]
!!Divers
*Modéle : [[Lenovo 10T7 00BTFR|http://chatillon.metivier.fr/Carte%20Meres/ThinkCentre_M720_Tiny_Spec.pdf]]
**[[Manuel|http://chatillon.metivier.fr/Carte%20Meres/m720q_ughmm_en.pdf]]
*Carte mère
**Socket FCLGA1151
**2 x 16 Go ~DDR4 2666 (32go)
*CPU
**[[Intel Core I5 9400T|https://ark.intel.com/content/www/fr/fr/ark/products/134893/intel-core-i59400t-processor-9m-cache-up-to-3-40-ghz.html]] ([[Coffee Lake|https://en.wikichip.org/wiki/intel/core_i5]])
**CPU Mark : 7,827
**TDP : 35W
**--Tmax boitier: 67.9°C--
*GPU
**UHD 630
*Alim
**Externe
*BIOS
**--Révision : AMI 0404 19/11/2015--
*Mémoire
**2 x 4 Go ~DDR4
*Disque
** --sda : WDC WD20EARX-00PASB0 - 2 To--
*Réseau
**Ethernet 1Gbs : Realtek RTL8111/8168 (Motherboard)
**WiFi : 
Dépend de [[mochad]]
--Lancement type system5 : {{{/etc/init.d/htemp}}}--
Lancement type systemd : 
Configuration : /etc/htemp.conf : ''Attention'' : propriétés root.apache, perms : 0664
Répertoire {{{/run/htemp}}} défini dans {{{/usr/lib/tmpfiles.d/htemp.conf}}} : Pour le mode manuel
Sources : ''/usr/local/src/x10/htemp''

{{{
# Programmation de la temperature
# Format (pour une sonde/piece) :
#       id=XXXXX        N° de la sonde Arexx
#
#       nom=NNNN        Nom de la piece, apparaissant dant le fichier xml, pour les sensors openremote
#
#       label=AAA...AAA Label en clair, affiché dans les interfaces graphiques de paramétrage
#
#       code=NX         Adresse X10 dur récepteur
#
#       deftemp=XX[.X]  Temperature par defaut
#
#       pente=0.XXX     Coefficient (en °/h) de montee de la temperature
#
#       ht=AjBBhCCmDD   Definition d'une plage horaire
#               A : Jour de la semaine
#                       0 :     Ts les jours
#                       1..7 :  Lundi..Dimanche
#                       8 :     Lundi..Vendredi
#                       9 :     Samedi..Dimanche
#               BB : Heure
#               CC : Minute
#               DD : Temerature (0 = Temperature par defaut)
#
#
###
}}}
[img[ih.png]]
*Modéle : [[Lenovo 10T7 00BTFR|http://chatillon.metivier.fr/Carte%20Meres/ThinkCentre_M720_Tiny_Spec.pdf]]
**[[Manuel|http://chatillon.metivier.fr/Carte%20Meres/m720q_ughmm_en.pdf]]
*Carte mère
**Socket FCLGA1151
**2 x 16 Go ~DDR4 2666 (32go)
*CPU
**[[Intel Core I5 9400T|https://ark.intel.com/content/www/fr/fr/ark/products/134893/intel-core-i59400t-processor-9m-cache-up-to-3-40-ghz.html]] ([[Coffee Lake|https://en.wikichip.org/wiki/intel/core_i5]])
**CPU Mark : 7,827
**TDP : 35W
**--Tmax boitier: 67.9°C--
*GPU
**UHD 630
*Alim
**Externe
*BIOS
**--Révision : AMI 0404 19/11/2015--
*Mémoire
**2 x 4 Go ~DDR4
*Disque
** --sda : WDC WD20EARX-00PASB0 - 2 To--
*Réseau
**Ethernet 1Gbs : Realtek RTL8111/8168 (Motherboard)
**WiFi : 
*Carte mère
**Msi
**[[MAG B550M|http://chatillon.metivier.fr/Carte%20Meres/MAGB550MMORTARWIFI_MAGB550MMORTAR]]
**Socket AM4
**4 x 32 Go ~DDR4 4400 (128go)
*CPU
**[[AMD Ryzen 5800x|https://www.amd.com/en/product/10466]] (Vermeer)
**CPU Mark : 28.188
**Tmax boitier: 90°C
*Alim
**[[Seasonic Focus GX550|https://seasonic.com/focus-gx]]
*BIOS
**Révision : AMI 0404 19/11/2015
*Mémoire
**2 x 8 Go ~DDR4
*Disque
*Réseau
**Realtek RTL8125B (Motherboard)
***2,5 Gbs
@@Obsolete@@ : remplacé par [[Unison]]
!!!Usage
{{{mailsync [-xvndh] [-p ssh_port] host}}}
!!!Fichier de configuration
Variable interne au script
!!!Description
Met à jour le répertoire ''.maildir'' des utilisateurs listés dans le script, en supprimant dans la destination les fichiers manquant dans la source
[img[minil2.jpg]]
[img[minir2.jpg]]
[img[minir4.jpg]]
Envoie vers le CM19 les commandes reçues sur le port 1099
Lancé automatiquement par : /etc/udev/rules.d/91-usb-x10-controllers.rules

Envoi de commandes manuelles :
*se connecter :
{{{nc localhost 1099}}}
*envoyer une commande
{{{rf A1 on}}}
*Chassis : 1204R-706-IXN équivalent SuperMicro : [[SYS-6018R-WTR|https://www.supermicro.com/en/products/system/1U/6018/SYS-6018R-WTR.cfm]]
**[[Manuel|http://chatillon.metivier.fr/Carte%20Meres/MNL-1635.pdf]]
*Carte mère
**[[SuperMicro X10DRW-I|https://www.supermicro.com/en/products/motherboard/X10DRW-I]]
**[[Manuel|http://chatillon.metivier.fr/Carte%20Meres/MNL-1557.pdf]]
**Socket FCLGA2011-3
**~DDR4 2400 (1,5To)
*CPU
**2 x [[Intel Xeon E5-2680 v4 @ 2.40GHz|https://www.intel.fr/content/www/fr/fr/products/sku/91754/intel-xeon-processor-e52680-v4-35m-cache-2-40-ghz/specifications.html]]
**CPU Mark : 17.989 (par proc)
**PDT : 120W
**Tmax boitier: 86°C
*GPU
**NA
*Alim
**Externe
*BIOS
**--Révision : AMI 0404 19/11/2015--
*Mémoire
**8 x 32G Go ~DDR4 Ecc (M393A4K40BB1-CRC)
*Disque
** sda : Seagate BarraCuda 3.5 (ST4000DM004-2U9104) - 4To -- SN : WFN7LYYJ
** sdb : Seagate BarraCuda 3.5 (ST4000DM004-2U9104) - 4To -- SN : WFN5HHSE
** sdc : Seagate BarraCuda 3.5 (ST4000DM004-2U9104) - 4To -- SN : WFN7LQMD
** sdd : Seagate BarraCuda 3.5 (ST4000DM004-2U9104) - 4To -- SN : WFN82D66
*Réseau
**Ethernet 1Gbs : Intel® i350 Dual Port (Motherboard)

31/03/2022 Suppression car incompatible avec php8

26/02/2020 Installation pnp4nagios 0.6.26

./configure --cache-file=config.cache  --with-httpd-conf=/etc/httpd/conf/webapps.d

--deplacement de /etc/httpd/conf.d/pnp4nagios.conf vers /etc/httpd/conf/webapps.d/-- (webapps.d = lien vers sites.d)

----------------------------------------------------------------------------------------------------------------------

*Télécharger ''pnp4nagios'' (non disponible en dépot)
**installer avec ''rpm -i - -nodeps'', car dépend de ''rrdtool-perl'', alors que mageia fournit ''perl-rrdtool''
Le package nagios de mandriva installe le document root en {{{/usr/share/nagios/www}}}
alors que pnp4nagios sinstalle en {{{/usr/share/nagios/html/pnp4nagios}}}
Il faut donc le déplacer en {{{/usr/share/nagios/www/pnp4nagios}}}
et modifier en conséquence 
*la définition de action_url dans /etc/nagios/conf.d/config.cfg
*le fichier /usr/share/nagios/www/pnp4nagios/index.php
*/etc/httpd/conf.d/pnp4nagios.conf

*Attention, avec la V0.6 un sous-répertoire pnp4nagios a été créé dans /usr/libexec
*Fichier pricipal : [[/etc/postfix/main.cf]]
*Fichier secondaire : [[/etc/postfix/master.cf]]
*Fichier des aliases : [[/etc/postfix/aliases]]
*Fichier de configuration SASL
**/etc/postfix/sasl_passwd
**[[/etc/sasl2/smtpd.conf]]
**--[[/etc/sysconfig/saslauthd]]--
*SSL
**Certificats dans --/etc/postifix/cert-- {{{/root/ssl2buy}}}
**Certificat serveur pour le CN ''mx.metivier.fr''
***concaténation du certificat du serveur et du du certificat du CA : [[smtpd_tls_cert_file|https://postfix.traduc.org/index.php/postconf.5.html#smtpd_tls_cert_file]]
**Autorité racine : ''~Globalsign''
**Autorité intermédiaire : ''~AlphaSSL''
**Dans ''main.cf'' : {{{$myhsotname = "mx.metivier.fr"}}}
Avec ''systemd'', rc.local n'existe plus.

Il faut donc le remplacer par un service : http://linuxtricks.asso-linux-online.fr/wiki/systemd-restaurer-la-fonctionnalite-rc-local

{{{
Introduction


Le fichier rc.local est parfois utilisé par les administrateurs système pour exécuter des commandes bash à l'initialisation du système d'exploitation.
Mais depuis l'apparition de systemd, cela a disparu.

Fort bien pratique, j'ai voulu faire quelque chose de similaire sur systemd.


Création du service


Dans un premier temps, on va créer un service rc-local.

On va créer le fichier /etc/systemd/system/rc-local.service avec ceci dedans:

Code BASH :

[Unit]
Description=/etc/rc.local
ConditionPathExists=/etc/rc.local
 
[Service]
Type=forking
ExecStart=/bin/sh -c '/etc/rc.local'
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99
 
[Install]
WantedBy=multi-user.target
 



Puis, on rends ce service exécutable :

Code BASH :

chmod a+x /etc/systemd/system/rc-local.service



A vérifier le chmod a+x si u+x ne suffirait pas !!


Création du rc.local


Et bien dans cette partie, rien de spectaculaire ! On va créer le fichier /etc/rc.local !

Code BASH :

nano /etc/rc.local



Voici la structure d'un fichier rc.local :

Code BASH :

#! /bin/sh
#Ajouter le code ICI avant exit 0
 
exit 0



Ne pas oublier de le rendre exécutable :

Code BASH :

chmod a+x /etc/rc.local



A vérifier le chmod a+x si u+x ne suffirait pas !!


Démarrer le service


Avant cela, si on veut tester sans redémarrer :

On recharge le démon systemctl

Code BASH :

systemctl --system daemon-reload



Et on teste notre service :

Code BASH :

systemctl start rc-local.service




Activer le service au démarrage


Pour activer le service rc-local au démarrage de l'ordinateur, on appelle la commande systemctl correspondante avec le nom de notre service.

Code BASH :

systemctl enable rc-local.service
ln -s '/etc/systemd/system/rc-local.service' '/etc/systemd/system/multi-user.target.wants/rc-local.service'
 



}}}
!!!Usage
!!!Fichier de configuration
!!!Description
Recopie les répertoire .Maildir des utilisateurs dans le répertoire {{{/Data/tmp/savemail}}}
{{{
port 1194
proto udp
dev tun-vpn
dev-type tun
ca ca.crt
cert munshine.crt
key munshine.key  # This file is secret
dh dh2048.pem
server 192.168.1.64 255.255.255.224
push "redirect-gateway def1 block-local"
push "dhcp-option DNS 192.168.1.16"
push "dhcp-option DOMAIN metivier.fr"
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
log server.log
verb 5
mute 10
#route-noexec
script-security 2
client-connect "/etc/openvpn/servers/vpn/connect.sh"
client-disconnect "/etc/openvpn/servers/vpn/disconnect.sh"
down-pre
script-security 2
route-up "/etc/openvpn/servers/vpn/route-up.sh"
route-pre-down "/etc/openvpn/servers/vpn/route-pre-down.sh"
management localhost 7506
}}}
@@Obsolète@@ depuis la mise en place des deux serveurs mail (chatillon & bièvres) avec synchro [[Unison]]

--Lorsque le mail est géré par cachan (tower), les services postfix et fetchmail sont arrêtés à chatillon
L'envoi de mail à partir de chatillon est alors configuré pour utiliser ''ssmtp''--

--http://linuxpitstop.com/install-ssmtp-to-send-emails-to-gmail-and-office3655/--
Type the text for 'switchserv'
[img[th01z.jpg]]
sources :  /usr/local/src/x10/tl-500-0.7/
Lancement de /usr/bin/tl-500 par /etc/rc.d/rc.local
Dernières mesures stockées dans /var/lib/htemp/tl-500*
[img[tx.jpg]]
* Role : Visualisation des logs firewall en base, générés par [[Ulogd2]]
*[[Site|https://webfwlog.sourceforge.io/]]
*Installation : A partir des sources, en {{{/usr/local}}}