Add smtp authentication support for notifications mails sent out by the builder
Seems reasonable, though I think we should probably make a similar change in koji-gc.
Also, I wonder if we need to do anything with add_mail_logger. Do you use the admin_emails setting for kojid in your setup? Do you get emails when kojid logs something at the error level?
add_mail_logger
I do not use admin_emails setting but i have now configured it. I do not know though how to cause a harmless error in kojid intentionally in order to test. Do you have any ideas here?
I will make the change in koji-gc but i have noticed that it exposes every option as a command line argument too and i wonder if there should be an option present to specify smtp password on the command line. It would make the password visible in process list. Should i add "--smtp-user" and "--smtp-pass" cli options too? Or maybe just "--smtp-user" ?
I do not know though how to cause a harmless error in kojid intentionally in order to test. Do you have any ideas here?
One way, I think, is to set some invalid values for rlimit options in kojid.conf. E.g.
RLIMIT_NPROC = 100 100 100
Good point. It would definitely not be good practice. At some point we should refactor the options code in koji-gc, but I wouldn't want to require that for this.
Perhaps the simplest way here is to add the cli option, but make it hidden by using help=SUPPRESS_HELP and include a comment in the code about not actually using it.
help=SUPPRESS_HELP
1 new commit added
Smtp auth support for koji-gc added too.
It seems that add_mail_logger hardcodes the smtp host to localhost. If the local smtp is configured properly the notifications work.
Issue #1540
Metadata Update from @tkopecek: - Pull-request tagged with: testing-ready
:thumbsup:
Commit 5b232b2f fixes this pull-request
Pull-Request has been merged by tkopecek
Metadata Update from @jcupova: - Pull-request tagged with: testing-done
Add smtp authentication support for notifications mails sent out by the builder