Make mail fetch interval in imap service configurable

using environment variable.
Closes: #3409