Skip to content

Commit

Permalink
Item13241: Add exim to mailprogram auto config
Browse files Browse the repository at this point in the history
This has had very rudimentary testing.  I can't get exim to process
messages, unrelated to foswiki. However the autoconfig recognized that
exim is the MTA,  sets the correct flags and debug flags, and is able to
get the test message into the queue.
  • Loading branch information
gac410 committed Jan 30, 2015
1 parent 5db72e2 commit c10b964
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions core/lib/Foswiki/Configure/Wizards/AutoConfigureEmail.pm
Expand Up @@ -22,14 +22,20 @@ use Foswiki::IP qw/$IPv6Avail :regexp :info/;
# N.B. Below the block comment are not enabled placeholders
# Search order (specify hash key). Agents with custom sniffers
# ( code => keys ) should be tried first.
my @mtas = (qw/mailwrapper postfix ssmtp sendmail/);
my @mtas = (qw/mailwrapper postfix ssmtp exim sendmail/);

# Note: Standard sendmail options used:
# -t Read the message for recipients To: Cc: ...
# -oeq Discard any error messages, just return on failure
# -oi Ignore dots alone on lines by themselves in incoming messages.
# This should be set if you are reading data from a file.
#<<<
my %mtas = (
sendmail => {
name => 'sendmail', # Display name
file => 'sendmail', # Executable file to look for in PATH
regexp => # Regexp to match basename from alias
qr/^(?:sendmail\.)?sendmail$/, # e.g. usr/sbin/sendmail -> ssmtp
qr/^(?:sendmail\.)?sendmail$/, # e.g. usr/sbin/sendmail -> ssmtp
flags => '-t -oi -oeq', # Flags used for sending mail
debug => '-X /dev/stderr', # Additional flags to enable debug logs
},
Expand All @@ -56,6 +62,13 @@ my %mtas = (
code =>
sub { return _sniffPostfix( @_ ); },
},
exim => {
name => 'Exim4',
file => 'exim4',
regexp => qr/^(?:sendmail\.)?exim4$/,
flags => '-t -oi -oeq',
debug => '-v',
},

# Below this comment, the keys aren't in @mtas, and hence aren't used (yet). The data
# is almost certainly wrong - these are simply placeholders.
Expand All @@ -68,14 +81,6 @@ my %mtas = (
flags => '',
debug => '',
},
exim => {
name => 'Exim',
file => 'exim',
regexp => qr/^(?:sendmail\.)?exim$/,
flags => '',
debug => '-v',
},

# ... etc
);
#>>>
Expand Down

0 comments on commit c10b964

Please sign in to comment.