From 7675a3125618bad993398d89e2ef91eb238c8bc3 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Fri, 29 Aug 2008 17:48:19 +0000 Subject: Added config to fetchmail to configure globals and multiple entries. Also added ability to run once and test. Still need support for ETRN and SSL. git-svn-id: svn://svn.alpinelinux.org/acf/fetchmail/trunk@1437 ab2d0c66-481e-0410-8bed-d214d4d58bed --- fetchmail-config-html.lsp | 169 +++++----------------------------------------- 1 file changed, 17 insertions(+), 152 deletions(-) (limited to 'fetchmail-config-html.lsp') diff --git a/fetchmail-config-html.lsp b/fetchmail-config-html.lsp index ac6dbd6..b686400 100644 --- a/fetchmail-config-html.lsp +++ b/fetchmail-config-html.lsp @@ -1,160 +1,25 @@ -<% local form = ... -require("viewfunctions") -%> -<% ---[[ DEBUG INFORMATION -io.write("

DEBUGGING

DEBUG INFO: CFE

") -io.write(html.cfe_unpack(form)) -io.write("
") ---]] -%> +<% local view, viewlibrary, page_info, session = ... %> +<% require("viewfunctions") %> -

SYSTEM INFO

-
-<% -local myform = form.status -local tags = { "status", "version", "autostart", } -displayinfo(myform,tags,"viewonly") -%> -
- -

CONFIGURATION

-<% local myform = form.config %> -
" method="POST"> +<% displaycommandresults({"deleteentry"}, session) %> -

GUIDED CONFIGURATION

-<% --[[ %> -

FREQUENCY

-

Select how often the mailboxes will be checked. For ETRN transfers (below) this specifies how often transfers are initiated

-<% -local tags = { "freq", } -displayinfo(myform,tags) -%> -<% --]] %> +<% if viewlibrary and viewlibrary.dispatch_component then + viewlibrary.dispatch_component("status") +end %> -

MAILBOXES

-

You will need to specify the remote mailbox and password, as well as the local (internal) mailbox to forward the mail to. The SMTP host is the name or address of the SMTP server to send the mail to.

-

If you want to use POP3 account for the entire domain, selecting the pop3domain method will setup the appropriate configuration for retrieving and distributing the mail appropriately. The domain information should be your internet smtp domain. The mailbox field is ignored when this method is selected.

+

Global Settings

-

When selecting the pop3 or imap methods, the domain field should be left blank.

-<% -- START - SPECIAL VIEW FOR SHOWING AVAILABLE MAILBOXES %> -<% -local tags = "mailboxes" -local mailboxform = myform[tags]["value"] -%>
-<% - io.write("\n\t
\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t") -for i=1, table.maxn(mailboxform) do - leftpadd="30px" - rightpadd="5px" - - io.write("\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t") - io.write("\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t") - io.write("\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t") - io.write("\n\t\t\n\t\t\t\n\t\t") -end -io.write("
") - io.write("
METHOD
") - io.write("
REMOTE
") - io.write("
LOCAL
") - val = "method" - io.write(html.form[mailboxform[i][val]["type"]](mailboxform[i][val])) - io.write("") - val = "remotehost" - io.write(mailboxform[i][val]["label"]) - io.write(":") - io.write(html.form[mailboxform[i][val]["type"]](mailboxform[i][val])) - io.write("") - val = "localhost" - io.write(mailboxform[i][val]["label"]) - io.write(":") - io.write(html.form[mailboxform[i][val]["type"]](mailboxform[i][val])) - io.write("
") - val = "disabled" - io.write(html.form[mailboxform[i][val]["type"]](mailboxform[i][val])) - io.write(" " .. mailboxform[i][val]["label"]) - io.write("") - val = "remotemailbox" - io.write(mailboxform[i][val]["label"]) - io.write(":") - io.write(html.form[mailboxform[i][val]["type"]](mailboxform[i][val])) - io.write("") - val = "localmailbox" - io.write(mailboxform[i][val]["label"]) - io.write(":") - io.write(html.form[mailboxform[i][val]["type"]](mailboxform[i][val])) - io.write("
") - io.write("") - val = "remotepassword" - io.write(mailboxform[i][val]["label"]) - io.write(":") - io.write(html.form[mailboxform[i][val]["type"]](mailboxform[i][val])) - io.write("") - val = "localdomain" - io.write(mailboxform[i][val]["label"]) - io.write(":") - io.write(html.form[mailboxform[i][val]["type"]](mailboxform[i][val])) - io.write("

") -%> +
Edit global settings
+
" method="POST"> + +
-<% -- START - SPECIAL VIEW FOR SHOWING AVAILABLE MAILBOXES %> - -

LAST RESORT

-

The Postmaster address is the address of last resort when fetchmail cannot determine how to send a mail message. If left blank, undelieverable mail may be discarded.

-<% -local tags = { "postmaster", } -displayinfo(myform,tags) -%> - -

ETRN

-

This is for branches that have DNS mail domains hosted by an ISP that allows for ETRN dequeueing. ETRN dequeueing causes the SMTP mail exchanger at the ISP to forward mail to you via SMTP. You will need to make sure that DNS is setup appropriately and that your ISP supports ETRN. If you have not arranged with your ISP to have ETRN support, leave these fields blank.

-<% -local tags = { "etrnremote","etrnquedomain", } -displayinfo(myform,tags) -%> - - -<% --[[ %> -

ADVANCED CONFIGURATION

-

GENERAL

-<% -local tags = { "logfile", "loglevel", "smallerlogs", } -displayinfo(myform,tags) -%> - -<% --]] %> - -

SAVE AND APPLY ABOVE SETTINGS

-<% -local tags = { "cmdsave","cmdtest", } -displayinfo(myform,tags) -%> - - -<% -local cmdform = form.management -local tags = { "start", "stop", "restart" } -if (cmdform) and (cmdform[tags[1]]) then -%> -
-

MANAGEMENT

-
-
<%= cmdform[tags[1]]["label"] %>
-
- <% for k,v in pairs(tags) do %> - <% if (cmdform[v]) then %> - <% io.write(html.form[cmdform[v].type](cmdform[v])) %> - <% end %> - <% end %> -
- <% if (form.cmdmanagement) and (#form.cmdmanagement.descr > 0) then %> -
Previous action result
-
<%= form.cmdmanagement.descr %>
- <% end %> -
-
+<% if viewlibrary and viewlibrary.dispatch_component then + viewlibrary.dispatch_component("listentries") +end %> -<% end %> +<% if viewlibrary and viewlibrary.dispatch_component then + viewlibrary.dispatch_component("startstop") +end %> -- cgit v1.2.3