Skip to content

SMTP - server_hostname cannot be an empty string or start with a leading dot. #227

@nicoh88

Description

@nicoh88

Hello Community,

I have a problem with the smtp notification settings.

Command: icloudpd --username=nico***@googlemail.com --password=*** --directory=/mnt/data/private/Bilder/2099-12-31\ iCloud/ --size=original --live-photo-size=original --auto-delete --folder-structure={:\%Y/\%m-\%B} --smtp-username blablabla@gmx.de --smtp-password o9*** --smtp-host mail.gmx.net --smtp-port 587 --notification-email nico***@gmail.com

Error:

Keyring config file contains incorrect values.
Config file: /root/.local/share/python_keyring/keyringrc.cfg
2020-11-10 21:30:35 DEBUG    Authenticating...
2020-11-10 21:30:37 INFO     Sending 'two-step expired' notification via email...
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/icloudpd/base.py", line 260, in main
    client_id=os.environ.get("CLIENT_ID"),
  File "/usr/local/lib/python3.7/dist-packages/icloudpd/authentication.py", line 44, in authenticate
    "Two-step/two-factor authentication is required!"
icloudpd.authentication.TwoStepAuthRequiredError: Two-step/two-factor authentication is required!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/icloudpd", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/icloudpd/base.py", line 272, in main
    notification_email,
  File "/usr/local/lib/python3.7/dist-packages/icloudpd/email_notifications.py", line 22, in send_2sa_notification
    smtp.starttls()
  File "/usr/lib/python3.7/smtplib.py", line 771, in starttls
    server_hostname=self._host)
  File "/usr/lib/python3.7/ssl.py", line 412, in wrap_socket
    session=session
  File "/usr/lib/python3.7/ssl.py", line 846, in _create
    owner=self, session=self._session,
ValueError: server_hostname cannot be an empty string or start with a leading dot.

But why? Can someone help me?

icloudpd --version
icloudpd, version 1.7.0

Installed over pip install icloudpd

Without the smtp options, works and downloading my photos, after two-factor authentication.

I cannot currently reproduce the problem because the two-factor authentication was successful. It will not occur again until two factor authentication is required again.

Cheers Nico

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions