Skip to content

Commit

Permalink
Item13241: Add some more hints for autoconfigure
Browse files Browse the repository at this point in the history
That it's long running.  And make the spec a bit more readable.

We should validate the server hostname if anything is entered into the
field, even when Mail is not enabled.  Otherwise may spend wheels trying
to autoconfigure a server that isn't reachable.
  • Loading branch information
gac410 committed Jan 30, 2015
1 parent 0129607 commit 2d470ef
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
16 changes: 13 additions & 3 deletions core/lib/Foswiki.spec
Expand Up @@ -1791,7 +1791,11 @@ $Foswiki::cfg{MergeHeadAndScriptZones} = $FALSE;
# =<nop>%WIKIWEBMASTERNAME%= macro.
$Foswiki::cfg{WebMasterName} = 'Wiki Administrator';
# **EMAILADDRESS 30 LABEL="Webmaster Email" FEEDBACK="label='Auto-configure Email'; wizard='AutoConfigureEmail'; method='autoconfigure'" FEEDBACK="label='Send Test Email';wizard='SendTestEmail'; method='send'"**
# **EMAILADDRESS 30 LABEL="Webmaster Email"\
# FEEDBACK="label='Auto-configure Email';\
# title='Long running: Probes the possible email servers to find most secure connection';\
# wizard='AutoConfigureEmail'; method='autoconfigure'"\
# FEEDBACK="label='Send Test Email';wizard='SendTestEmail'; method='send'"**
# Wiki administrator (webmaster) e-mail address, used as the sender address
# in emails sent by Foswiki. For example =webmaster@example.com=
# Must be a single valid email address.
Expand All @@ -1800,7 +1804,10 @@ $Foswiki::cfg{WebMasterName} = 'Wiki Administrator';
# If your server is already configured to send email, press Auto-configure email. If it works, email will be enabled. You can then send a test email to further verify operation.
$Foswiki::cfg{WebMasterEmail} = '';

# **STRING 30 LABEL="SMTP Host" FEEDBACK="label='Auto-configure Email'; wizard='AutoConfigureEmail'; method='autoconfigure'"**
# **STRING 30 LABEL="SMTP Host"\
# FEEDBACK="label='Auto-configure Email';\
# title='Long running: Probes the possible email servers to find most secure connection';\
# wizard='AutoConfigureEmail'; method='autoconfigure'"**
# Optional mail host for outgoing mail, required if Net::SMTP is being used.
# Examples: =mail.your.company= If the smtp server uses a different port
# than the default 25, use the syntax =mail.your.company:portnumber=,
Expand All @@ -1823,7 +1830,10 @@ $Foswiki::cfg{SMTP}{MAILHOST} = '';
# sender.
$Foswiki::cfg{SMTP}{Username} = '';

# **PASSWORD 30 LABEL="SMTP Password" DISPLAY_IF="{SMTP}{MAILHOST}!=''" FEEDBACK="label='Auto-configure Email'; wizard='AutoConfigureEmail'; method='autoconfigure'"**
# **PASSWORD 30 LABEL="SMTP Password" DISPLAY_IF="{SMTP}{MAILHOST}!=''"\
# FEEDBACK="label='Auto-configure Email';\
# title='Long running: Probes the possible email servers to find most secure connection';\
# wizard='AutoConfigureEmail'; method='autoconfigure'"**
# Password for your {SMTP}{Username}.
$Foswiki::cfg{SMTP}{Password} = '';

Expand Down
2 changes: 0 additions & 2 deletions core/lib/Foswiki/Configure/Checkers/SMTP/MAILHOST.pm
Expand Up @@ -12,8 +12,6 @@ our @ISA = ('Foswiki::Configure::Checker');
sub check_current_value {
my ( $this, $reporter ) = @_;

return unless $Foswiki::cfg{EnableEmail};

my $host = $Foswiki::cfg{SMTP}{MAILHOST} || '';
my $method = $Foswiki::cfg{Email}{MailMethod} || 'Net::SMTP';
if ( $method =~ /^Net::SMTP/ ) {
Expand Down

0 comments on commit 2d470ef

Please sign in to comment.