bugmailtype => $bugmailtype,
};
- if (Bugzilla->params->{'use_mailer_queue'}) {
+ if (Bugzilla->get_param_with_override('use_mailer_queue')) {
enqueue($vars);
} else {
MessageToMTA(_generate_bugmail($vars));
# might want to change this for upstream
use constant ENV_PREFIX => 'BMO_';
-use constant PARAM_OVERRIDE => qw( shadowdb shadowdbhost shadowdbport shadowdbsock );
+use constant PARAM_OVERRIDE => qw( use_mailer_queue mail_delivery_method shadowdb shadowdbhost shadowdbport shadowdbsock );
sub _sensible_group {
return '' if ON_WINDOWS;
{
name => 'param_override',
default => {
- memcached_servers => undef,
- memcached_namespace => undef,
- shadowdb => undef,
- shadowdbhost => undef,
- shadowdbport => undef,
- shadowdbsock => undef,
+ use_mailer_queue => undef,
+ mail_delivery_method => undef,
+ shadowdb => undef,
+ shadowdbhost => undef,
+ shadowdbport => undef,
+ shadowdbsock => undef,
},
},
{
sub MessageToMTA {
my ($msg, $send_now) = (@_);
- my $method = Bugzilla->params->{'mail_delivery_method'};
+ my $method = Bugzilla->get_param_with_override('mail_delivery_method');
return if $method eq 'None';
- if (Bugzilla->params->{'use_mailer_queue'} and !$send_now) {
+ if (Bugzilla->get_param_with_override('use_mailer_queue') and !$send_now) {
Bugzilla->job_queue->insert('send_mail', { msg => $msg });
return;
}
}
# Ensure that we are not sending emails too quickly to recipients.
- if (Bugzilla->params->{use_mailer_queue}
+ if (Bugzilla->get_param_with_override('use_mailer_queue')
&& (EMAIL_LIMIT_PER_MINUTE || EMAIL_LIMIT_PER_HOUR))
{
$dbh->do(
}
# insert into email_rates
- if (Bugzilla->params->{use_mailer_queue}
+ if (Bugzilla->get_param_with_override('use_mailer_queue')
&& (EMAIL_LIMIT_PER_MINUTE || EMAIL_LIMIT_PER_HOUR))
{
$dbh->do(
unless (close $pipe) {
return failure "error when closing pipe to $mailer: $!" if $!;
my ($error_message, $is_transient) = _map_exitcode($? >> 8);
- if (Bugzilla->params->{'use_mailer_queue'}) {
+ if (Bugzilla->get_param_with_override('use_mailer_queue')) {
# Return success for errors which are fatal so Bugzilla knows to
# remove them from the queue
if ($is_transient) {
This is the max amount of unshared memory (in kb) that the apache process is
allowed to use before Apache::SizeLimit kills it.
+BMO_mail_delivery_method
+ Usually configured on the MTA section of admin interface, but may be set here for testing purposes.
+ Valid values are None, Test, Sendmail, or SMTP.
+ If set to Test, email will be appended to the /app/data/mailer.test file.
+
+BMO_use_mailer_queue
+ Usually configured on the MTA section of the admin interface, you may change this here for testing purposes.
+ Should be 1 or 0. If 1, the job queue will be used. For testing, only set to 0 if the BMO_mail_delivery_method is None or Test.
+
HTTPD_StartServers
Sets the number of child server processes created on startup.
As the number of processes is dynamically controlled depending on the load,
and time, and get the result of these queries directly per email. This is a
good way to create reminders and to keep track of the activity in your installation.</dd>
- [% IF Param('use_mailer_queue') %]
+ [% IF Bugzilla.localconfig.param_override.use_mailer_queue OR Param('use_mailer_queue') %]
[% class = user.in_group('admin') ? "" : "forbidden" %]
<dt id="view_job_queue" class="[% class %]"><a href="view_job_queue.cgi">Job Queue</a></dt>
<dd class="[% class %]">View the queue of undelivered/deferred jobs/emails.</dd>