mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add a tweak to Preferences->Tweaks to control the list of servers calibre considers public email servers
This commit is contained in:
parent
0a90e37ad7
commit
f9e0afffe2
@ -437,8 +437,11 @@ metadata_edit_custom_column_order = []
|
||||
# public email server like gmx/hotmail/gmail. Default is: 5 minutes
|
||||
# Setting it to lower may cause the server's SPAM controls to kick in,
|
||||
# making email sending fail. Changes will take effect only after a restart of
|
||||
# calibre.
|
||||
# calibre. You can also change the list of hosts that calibre considers
|
||||
# to be public relays here. Any relay host ending with one of the suffixes
|
||||
# in the list below will be considered a public email server.
|
||||
public_smtp_relay_delay = 301
|
||||
public_smtp_relay_host_suffixes = ['gmail.com', 'live.com', 'gmx.com']
|
||||
|
||||
#: The maximum width and height for covers saved in the calibre library
|
||||
# All covers in the calibre library will be resized, preserving aspect ratio,
|
||||
|
@ -62,9 +62,11 @@ class Sendmail(object):
|
||||
self.rate_limit = 1
|
||||
opts = email_config().parse()
|
||||
rh = opts.relay_host
|
||||
if rh and (
|
||||
'gmail.com' in rh or 'live.com' in rh or 'gmx.com' in rh):
|
||||
if rh:
|
||||
for suffix in tweaks['public_smtp_relay_host_suffixes']:
|
||||
if rh.lower().endswith(suffix):
|
||||
self.rate_limit = tweaks['public_smtp_relay_delay']
|
||||
break
|
||||
|
||||
def __call__(self, attachment, aname, to, subject, text, log=None,
|
||||
abort=None, notifications=None):
|
||||
|
Loading…
x
Reference in New Issue
Block a user