mirror of
https://github.com/webmin/webmin.git
synced 2025-08-19 01:15:14 +00:00
Show warning if .procmailrc is bypassed in /etc/procmailrc
This commit is contained in:
@ -6,3 +6,4 @@ Added a message to the module's main page to detect system-level mail aliases (i
|
||||
Added an option to set the date range for which autoreplies are sent.
|
||||
---- Changes since 1.290 ----
|
||||
Added a simple page for setting up an email autoresponder.
|
||||
Display a warning if /etc/procmailrc is setup to always deliver to the inbox, which would prevent user-defined filters from working.
|
||||
|
@ -458,5 +458,17 @@ sub can_simple_autoreply
|
||||
return 1; # Always true for now
|
||||
}
|
||||
|
||||
# no_user_procmailrc()
|
||||
# Returns 1 if /etc/procmailrc has a recipe to always deliver to the user's
|
||||
# mailbox, which prevents this module from configuring anything useful
|
||||
sub no_user_procmailrc
|
||||
{
|
||||
local @recipes = &procmail::parse_procmail_file(
|
||||
$spam::config{'global_procmailrc'});
|
||||
local ($force) = grep { $_->{'action'} eq '$DEFAULT' &&
|
||||
!@{$_->{'conds'}} } @recipes;
|
||||
return $force;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
@ -33,6 +33,11 @@ if ($alias) {
|
||||
print "</ul>\n";
|
||||
}
|
||||
|
||||
# Check if /etc/procmailrc forces local delivery
|
||||
if (&no_user_procmailrc()) {
|
||||
print $text{'index_force'},"<p>\n";
|
||||
}
|
||||
|
||||
@filters = &list_filters();
|
||||
@links = ( &select_all_link("d"), &select_invert_link("d"),
|
||||
"<a href='edit.cgi?new=1'>$text{'index_add'}</a>" );
|
||||
|
@ -27,6 +27,7 @@ index_return=filter list
|
||||
index_warn=Warning - The program <tt>procmail</tt> used for mail filtering is not installed on this system. Any filters defined below are unlikely to work.
|
||||
index_alias=Warning - The system is configured to forward all email to your mailbox to the following destinations. Filters defined here will not be used.
|
||||
index_aliasme=Note - The system is also configured forward all email to :
|
||||
index_force=Warning - The system is configured to not process user-defined mail filters. Any filters defined below are unlikely to work.
|
||||
index_period=Minimum time between autoreplies
|
||||
index_noperiod=No minimum
|
||||
index_mins=minutes
|
||||
|
Reference in New Issue
Block a user