Kaynağa Gözat

Initial Commit

Signed-off-by: ewft <bnj@ewft.org>
ewft 1 yıl önce
işleme
93d0186b4f

BIN
build/ewft.getmail-2023.11.15a.txz


BIN
build/getmail-6.03-x86_64-3.txz


+ 90 - 0
ewft.getmail.plg

@@ -0,0 +1,90 @@
+<?xml version='1.0' standalone='yes'?>
+
+<!DOCTYPE PLUGIN [
+<!ENTITY name      "ewft.getmail">
+<!ENTITY author    "EWFT">
+<!ENTITY version   "2023.11.15a">
+<!ENTITY launch    "Settings/ewft.getmail">
+<!ENTITY pluginURL "https://git.ewft.org/Unraid/ewft.getmail/raw/master/ewft.getmail.plg">
+<!ENTITY pkgURL    "https://git.ewft.org/Unraid/ewft.getmail/raw/master/build/">
+<!ENTITY getmailpkg    "getmail-6.03-x86_64-3">
+<!ENTITY getmailMD5       "dedd6db0f6e751281e5eca0f2906cc72">
+<!ENTITY ewftgetmailpkg    "ewft.getmail-2023.11.15a">
+<!ENTITY ewftgetmailMD5       "a598cb23fcf5611fabd47132c61e9454">
+<!ENTITY pluginLoc "/boot/config/plugins/&name;">
+]>
+
+<PLUGIN name="&name;" author="&author;" version="&version;" launch="&launch;" pluginURL="&pluginURL;" min="6.4.0">
+
+<CHANGES>
+##&name;
+
+###&version;
+
+###2018.10.09
+- initial release
+
+###2020.10.04
+- Update with getmail 6
+- patch for gmail 
+
+###2021.12.17
+- Update for python 3.9
+
+### 2023.11.15
+
+
+</CHANGES>
+
+<!-- PRE-INSTALL SCRIPT -->
+<FILE Run="/bin/bash">
+<INLINE>
+</INLINE>
+</FILE>
+
+<!-- SOURCE PACKAGE -->
+<FILE Name="&pluginLoc;/&getmailpkg;.txz" Run="upgradepkg --install-new --reinstall">
+<URL>&pkgURL;&getmailpkg;.txz</URL>
+<MD5>&getmailMD5;</MD5>
+</FILE>
+
+
+<FILE Name="&pluginLoc;/&ewftgetmailpkg;.txz" Run="upgradepkg --install-new --reinstall">
+<URL>&pkgURL;&ewftgetmailpkg;.txz</URL>
+<MD5>&ewftgetmailMD5;</MD5>
+</FILE>
+
+<!-- POST-INSTALL SCRIPT -->
+<FILE Run="/bin/bash">
+<INLINE>
+# Create cron entry
+cron=/boot/config/plugins/&name;/getmail.cron
+if [[ ! -f $cron ]]; then
+  echo '# GetMail' >$cron
+  echo -e '0 * * * * /bin/su nobody -mc "getmail --getmaildir /boot/config/plugins/ewft.getmail --rcfile getmailrc --rcfile getmailrc_ewft_bnj" &amp;>/dev/null\n' >>$cron
+  /usr/local/sbin/update_cron
+fi
+echo ""
+echo "-----------------------------------------------------------"
+echo " Plugin &name; is installed."
+echo " Version: &version;"
+echo "-----------------------------------------------------------"
+echo ""
+</INLINE>
+</FILE>
+
+<!-- REMOVE SCRIPT -->
+<FILE Run="/bin/bash" Method="remove">
+<INLINE>
+# Remove plugin related files
+#rm -rf /boot/config/plugins/&name;
+
+# Uninstall the 'source' package
+removepkg &getmailpkg;
+removepkg &ewftgetmailpkg;
+# Remove cron entry
+#/usr/local/sbin/update_cron
+</INLINE>
+</FILE>
+
+</PLUGIN>

+ 2 - 0
getmail.cron

@@ -0,0 +1,2 @@
+# GetMail
+0 * * * *  /bin/su nobody -mc "getmail --getmaildir /mnt/user/mail/ewft.getmail/ --rcfile getmailrc --rcfile getmailrc_ewft_bnj" &>/dev/null

+ 5 - 0
usr/local/emhttp/plugins/ewft.getmail/README.md

@@ -0,0 +1,5 @@
+**GetMail**
+
+GetMail is a flexible, extensible mail retrieval system with support for POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs, arbitrary message filtering, single-user and domain-mailboxes, and many other useful features.
+
+https://github.com/ewft/getmail6

+ 8 - 0
usr/local/emhttp/plugins/ewft.getmail/ewft.getmail.page

@@ -0,0 +1,8 @@
+Menu="EWFT"
+Icon="ewft.getmail.png"
+Author="Ben"
+Type="php"
+Title="GetMail"
+---
+<?php include '/usr/local/emhttp/plugins/ewft.getmail/styles/ewft.getmail.css';?>
+<?php include '/usr/local/emhttp/plugins/ewft.getmail/include/ewft.getmail.php';?>

BIN
usr/local/emhttp/plugins/ewft.getmail/ewft.getmail.png


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
usr/local/emhttp/plugins/ewft.getmail/ewft.getmail.svg


+ 152 - 0
usr/local/emhttp/plugins/ewft.getmail/include/ewft.getmail.php

@@ -0,0 +1,152 @@
+<?PHP
+# Setup page variables
+$appname="ewft.getmail";
+$displayname="GetMail";
+$appexecutable="usr/sbin/minidlnad";
+$appconfigfile="settings.json";
+$plglogfile="/var/log/minidlnad/{$appname}.log";
+$arrayState=trim(shell_exec( "grep fsState /var/local/emhttp/var.ini | sed -n 's!fsState=\"\(.*\)\"!\\1!p'" ));
+$ver60check=trim(shell_exec( "grep version /etc/unraid-version | sed -n 's!version=\"\(.*\)\"!\\1!p'" ));
+
+
+# Sets the loader background to match the theme based on unRaid version sicne 6 has a dark theme
+$machine_type = trim(shell_exec( "uname -m" ));
+if ($machine_type == "x86_64") {
+	$loaderbgcolor = "html";
+	$prefix = "";
+	if (substr($ver60check, 0, 3) === "6.0") {
+		$prefix = "/usr/local/emhttp";
+	}
+} else {
+	$loaderbgcolor = ".Container";
+	$prefix = "/usr/local/emhttp";
+}
+?>
+
+<!-- ========================================================================= -->
+<!-- Page load animation and text -->
+<!-- ========================================================================= -->
+
+<!-- # Add jquery library, show loader, fade out when loaded -->
+<script type="text/javascript">
+	if(typeof jQuery == 'undefined'){
+		var oScriptElem = document.createElement("script");
+		oScriptElem.type = "text/javascript";
+		oScriptElem.src = "/plugins/<?=$appname;?>/scripts/jquery.min.js";
+		document.head.insertBefore(oScriptElem, document.getElementsByTagName("script")[0])
+    }
+</script>
+<div id="loading">
+	<img id="loading-image" src='/plugins/<?=$appname;?>/icons/loader.gif' alt="Loading..." />
+	<p id="loading-text">LOADING PLUGIN</p>
+</div>
+<script language="javascript" type="text/javascript">
+	$("#loading").css("background-color",$("<?=$loaderbgcolor;?>").css("background-color"));
+	$("#loading").show();
+</script>
+<script language="javascript" type="text/javascript">
+	$(window).load(function() {$("#loading").fadeOut("slow");});
+</script>
+
+<!-- ========================================================================= -->
+<!-- Load current config file and check if program is installed already -->
+<!-- ========================================================================= -->
+
+<?PHP
+
+# This will clean any ^M characters caused by windows from the config file before use
+if (file_exists("/boot/config/plugins/{$appname}/{$appname}.cfg"))
+	shell_exec("sed -i 's!\r!!g' \"/boot/config/plugins/{$appname}/{$appname}.cfg\"");
+if (file_exists("/usr/local/emhttp/plugins/{$appname}/scripts/rc.{$appname}"))
+	shell_exec("sed -i 's!\r!!g' \"/usr/local/emhttp/plugins/{$appname}/scripts/rc.{$appname}\"");
+
+# Check existence of files and make startfile if missing
+$app_cfg = parse_ini_file( "/boot/config/plugins/{$appname}/{$appname}.cfg" );
+$app_installed = file_exists("/{$appexecutable}" ) ? "yes" : "no";
+
+
+
+# =========================================================================
+## Collect local variables from config files and verify data as best as possible
+# =========================================================================
+
+
+
+# Set readonly status if array is offline
+if ($arrayState == "Started") {
+	$app_readonly = "";
+	$app_disabled = "";
+} else {
+	$app_readonly = 'readonly="readonly"';
+	$app_disabled = 'disabled="disabled"';
+}
+
+# Plugin Current Version Variable
+if (file_exists("/boot/config/plugins/{$appname}.plg")) {
+	$app_plgver = trim(shell_exec ( "grep 'ENTITY version' /boot/config/plugins/{$appname}.plg | sed -n 's!.*\s\"\(.*\)\".*!\\1!p'" ));
+	if ($app_plgver == "") {
+		$app_plgver = "Unknown plugin version";
+	}
+} else {
+	$app_plgver = "(Plugin File Missing)";
+}
+
+
+
+# Service Status Variable
+if (isset($app_cfg['SERVICE']) && ($app_cfg['SERVICE'] == "enable" || $app_cfg['SERVICE'] == "disable"))
+	$app_service = $app_cfg['SERVICE'];
+else
+	$app_service = "disable";
+
+
+
+# =========================================================================
+## Check is program is installed and running to get extra information
+# =========================================================================
+
+# Get current installed version of the program
+if ($arrayState=="Started") {
+	$app_curversion = trim(shell_exec ( "/usr/local/emhttp/plugins/{$appname}/scripts/rc.{$appname} currentversion" ));
+	if ($app_curversion == "")
+		$app_curversion = "UNKNOWN";
+}
+
+if ($app_installed=="yes" && $arrayState=="Started") {
+	$app_running = trim(shell_exec( "[ -f /proc/`cat /var/run/minidlna/minidlna.pid 2> /dev/null`/exe ] && echo 'yes' || echo 'no' 2> /dev/null" ));
+	if ($app_running == "yes")
+		$app_updatestatus = "Running";
+	else
+		$app_updatestatus = "Stopped";
+
+}
+
+echo "<script>document.getElementById('loading-text').innerHTML = \"DONE\";</script>";
+?>
+
+<!-- ========================================================================= -->
+<!-- Create the HTML code used to display the settings GUI -->
+<!-- ========================================================================= -->
+
+
+<script type="text/javascript">
+
+function openLog() {
+	var machine_type = "<?=$machine_type;?>";
+	var title="<?=$appname;?> Activity Log";
+	if (machine_type == "x86_64") {
+		<?if (substr($ver60check, 0, 3) === "6.0"):?>
+			var url="/usr/bin/tail -n 42 -f <?=$plglogfile;?>";
+			openWindow( url, title,600,900);
+		<?else:?>
+			var url="<?=$prefix;?>/plugins/<?=$appname;?>/scripts/tail_log&arg1=<?=$appname;?>.log";
+			openWindow( url, title,600,900);
+		<?endif;?>
+	} else {
+		var url="/logging.htm?title=" + title + "&cmd=/usr/bin/tail -n 42 -f <?=$plglogfile;?>&forkCmd=Start";
+		openWindow( url, title.replace(/ /g, "_"),600,900);
+	}
+}
+
+</script>
+

+ 310 - 0
usr/local/emhttp/plugins/ewft.getmail/styles/ewft.getmail.css

@@ -0,0 +1,310 @@
+<style type="text/css">
+.longver {
+	width: 235px;
+	min-width: 90%;
+	max-width: 290px;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	white-space: nowrap;
+	vertical-align: bottom;
+}
+#UPDATEBUTTON {
+	border-collapse: separate;
+	-moz-box-shadow:inset 0px 1px 0px 0px #dcecfb;
+	-webkit-box-shadow:inset 0px 1px 0px 0px #dcecfb;
+	box-shadow:inset 0px 1px 0px 0px #dcecfb;
+	background-color:#bddbfa;
+	background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#bddbfa), to(#80b5ea));
+	background-image: -moz-linear-gradient(#bddbfa, #80b5ea);
+	background-image: -o-linear-gradient(#bddbfa, #80b5ea);
+	background-image: linear-gradient(#bddbfa, #80b5ea);
+	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bddbfa', endColorstr='#80b5ea');
+	ms-filter: "progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#bddbfa,EndColorStr=#80b5ea)";
+	text-indent:0;
+	border:1px solid #84bbf3;
+	display:inline-block;
+	color:#ffffff;
+	font-family:Arial;
+	font-size:15px;
+	font-weight:bold;
+	font-style:normal;
+	text-align:center;
+	text-shadow:1px 1px 0px #528ecc;
+	-webkit-transition: all 300ms ease-in;
+	-moz-transition: all 300ms ease-in;
+	-o-transition: all 300ms ease-in;
+	-ms-transition: all 300ms ease-in;
+	transition: all 300ms ease-in;
+	margin: auto;
+}
+#UPDATEBUTTON:hover {
+	border:1px solid #4fa1f4;
+	-moz-box-shadow:inset 0px 0px 8px 4px #67aef6;
+	-webkit-box-shadow:inset 0px 0px 8px 4px #67aef6;
+	box-shadow:inset 0px 0px 8px 4px #67aef6;
+	-webkit-transition: all 300ms ease-out;
+	-moz-transition: all 300ms ease-out;
+	-o-transition: all 300ms ease-out;
+	-ms-transition: all 300ms ease-out;
+	transition: all 300ms ease-out;
+}
+#UPDATEBUTTON:active {
+	border:1px solid #4fa1f4;
+	-moz-box-shadow:inset 0px 0px 8px 4px #67aef6;
+	-webkit-box-shadow:inset 0px 0px 8px 4px #67aef6;
+	box-shadow:inset 0px 0px 8px 4px #67aef6;
+	position:relative;
+	top:1px;
+	left:1px;
+}
+#UPDATEBUTTON.UPDATEBTN {
+	margin: 0px;
+	margin-top: 10px;
+}
+#UPDATEBUTTON.UIBUTTON {
+	display: inline-block;
+	font-size: 12px;
+	padding: 2px 7px 2px 7px;
+	border-radius: 5px;
+	line-height: 12px;
+	margin-top: -2px;
+	margin-right: -15px;
+}
+#STDSMBUTTON {
+	width: 60px;
+	margin: 0px;
+}
+#STDSMBUTTONR {
+	width: 60px;
+	margin: 0px;
+	margin-right: 5px;
+}
+#STDSMBUTTONL {
+	width: 60px;
+	margin: 0px;
+	margin-left: 5px;
+}
+#STDLGBUTTONR {
+	width: 110px;
+	margin: 0px;
+	margin-right: 5px;
+}
+#STDLGBUTTONL {
+	width: 110px;
+	margin: 0px;
+	margin-left: 5px;
+}
+#STDLGBUTTON {
+	width: 100px;
+	margin: 0px;
+}
+#VERSION {
+	display: inline-block;
+	margin-top: 5px;
+	margin-bottom: 5px;
+	text-align: center;
+}
+#TEXTLARGE {
+	width: 250px;
+}
+#TEXTSMALL {
+	width: 225px;
+}
+#TEXTUSER {
+	style="width: 165px"
+}
+#IMGICON {
+	margin-top: -2px;
+}
+#DIVIDER {
+	background-color: #FFFFFF;
+	border: 1px solid #000000;
+	height: 1px;
+	width: 100%;
+	font-size: 8px;
+}
+#ERRORPAD {
+	padding: 0px;
+}
+#ACTIVITYLINK {
+	color: inherit;
+}
+#BOTTOMPAD {
+	margin-bottom: 35px;
+}
+.green {
+	color: #33cc33;
+	padding-left: 5px;
+	padding-right: 5px;
+}
+.red {
+	color: #ff0000;
+	padding-left: 5px;
+	padding-right: 5px;
+}
+.orange {
+	color: #ff9900;
+	padding-left: 5px;
+	padding-right: 5px;
+}
+#PANELALL {
+	/* Not used in unRAID 6 */
+}
+#PANELLEFT {
+	float: left;
+	width: 50%;
+}
+#title.TITLEBARLEFT {
+	float: left;
+	width: 95%;
+	margin-top: 20px;
+	margin-bottom: 20px;
+	height: 18px;
+}
+#DIVLEFT {
+	float: left;
+	width: 100%;
+	display: table;
+}
+#T100LT {
+	width: 95%;
+	text-align: left;
+	vertical-align: top;
+	display: table-cell;
+	padding-bottom: 10px;
+}
+#T50LT {
+	width: 50%;
+	text-align: left;
+	vertical-align: top;
+	display: table-cell;
+}
+#T50LM {
+	width: 50%;
+	text-align: left;
+	vertical-align: middle;
+	display: table-cell;
+}
+#T50CM {
+	width: 50%;
+	text-align: center;
+	vertical-align: middle;
+	display: table-cell;
+}
+#T25RM {
+	width: 25%;
+	text-align: right;
+	vertical-align: middle;
+	display: table-cell;
+}
+#T25LM {
+	width: 25%;
+	text-align: left;
+	vertical-align: middle;
+	display: table-cell;
+}
+#PANELRIGHT {
+	float: right;
+	width: 50%;
+}
+#title.TITLEBARRIGHT {
+	float: right;
+	width: 95%;
+	margin-top: 20px;
+	margin-bottom: 20px;
+	height: 18px;
+}
+#DIVRIGHT {
+	float: right;
+	padding-right: 15px;
+	margin-left: 10px;
+	padding-top: 10px;
+	width: 95%;
+	display: table;
+}
+#PLINE {
+	margin: 5px;
+	margin-left: 10px;
+	text-align: left;
+}
+#FOOTER2 {
+	position: fixed;
+	font-size: 80%;
+	bottom: 25px;
+	right: 0px;
+	background-color: inherit;
+	padding-left: 5px;
+	padding-right: 5px;
+	z-index : 1;
+}
+.title {
+	vertical-align: middle;
+	margin: 20px 0 22px 0;
+	padding: 5px 10px;
+	-webkit-border-top-left-radius: 5px;
+	-webkit-border-top-right-radius: 5px;
+	-webkit-border-bottom-left-radius: 0;
+	-webkit-border-bottom-right-radius: 0;
+	-moz-border-radius-topleft: 5px;
+	-moz-border-radius-topright: 5px;
+	-moz-border-radius-bottomleft: 0;
+	-moz-border-radius-bottomright: 0;
+	border-top-left-radius: 5px;
+	border-top-right-radius: 5px;
+	border-bottom-left-radius: 0;
+	border-bottom-right-radius: 0;
+	border: 1px solid #E8E8E8;
+	border-bottom: 1px solid #C8C8C8;
+	background: #e6e6e6;
+	background: -moz-linear-gradient(top, #D0D0D0 0%, #C0C0C0 100%);
+	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#D0D0D0), color-stop(100%,#C0C0C0));
+	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#D0D0D0', endColorstr='#C0C0C0', GradientType=0 );
+	clear: both;
+}
+#title span.left {
+	font-size: 14px;
+}
+#title span.right {
+	float: right;
+}
+#TABLESETTINGS {
+	width: 100%;
+	margin-left: 0px;
+}
+#TDSETTINGS {
+	text-align: left;
+	padding-left: 0px;
+}
+select {min-width: 0px;}
+.no-js #loading {display: none;}
+#loading {
+	display: none;
+	position: fixed;
+	left: 0px;
+	top: 190px;
+
+	width: 100%;
+	height: 100%;
+	z-index: 9999;
+}
+#loading-image {
+	position: absolute;
+	top: 20%;
+	left: 50%;
+	margin-top: -24px;
+	margin-left: -24px;
+	z-index: 10000;
+}
+#loading-text {
+	position: absolute;
+	top: 20%;
+	left: 50%;
+	margin-top: 40px;
+	margin-left: -150px;
+	padding: 0px;
+	width: 300px;
+	text-align: center;
+	background : none;
+	z-index: 10000;
+}
+</style>

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor