<% local form = ... require("viewfunctions") %> <% --[[ DEBUG INFORMATION io.write("

DEBUGGING

DEBUG INFO: CFE

") io.write(html.cfe_unpack(form)) io.write("
") --]] %>

SYSTEM INFO

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

CONFIGURATION

<% local myform = form.config %>
" method="POST">

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) %> <% --]] %>

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.

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("

") %>
<% -- 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 %>
<% end %>