Make 'Errors_To' / 'Return-Path' of 'Keys check' / 'Keys update' emails configurable
People who host many lists told about a nuisance they're running into: new lists are regularly created, and over time, some email addresses subscribed as admins to lists might cease to exist, run out of space to store emails, etc.
Schleuder checks and updates keys of all lists, weekly, which in turn might lead to lots of Undelivered Mail Returned to Sender
sent to superadmins
. However, the issues which cause these notifications might either be transient, like temporarily limited storage space, or people decided consciously that such errors are not of interest, and hence shouldn't be reported.
Right now, the relevant code (lib/schleuder/logger_notifications.rb:25
) looks like:
def notify_admin(thing, original_message=nil, subject='Error', recipients=nil)
# Minimize using other classes here, we don't know what caused the error.
msg_parts = convert_to_msg_parts(thing, original_message)
recipients ||= adminaddresses
Array(adminaddresses).each do |address, key|
mail = Mail.new
mail.from = @from
mail.to = address
mail.subject = subject
mail[:Errors_To] = superadmin
mail.sender = superadmin
msg_parts.each do |msg_part|
mail.add_part(msg_part)
end
I would like to see mail[:Errors_To] = superadmin
being configurable, and I'm happy to handle the implementation. I don't have a good proposal yet how to name such an option, maybe something like key_maintenance_email_errors_to
.
What do you think?