Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

IsADirectoryError: [Errno 21] Is a directory: '/var/spool/mail/telegram' #1

Closed
df8oe opened this issue May 22, 2021 · 1 comment
Closed

Comments

@df8oe
Copy link

df8oe commented May 22, 2021

I am trying to setup this nice service. I followed all instructions - and created an (empty) folder /var/spool/mail/telegram. After firing up systemd service and look at status of email-to-telegram I see the message above (but the service is running). I copied a message to the folder but nothing happens API token and chat_id are set correctly.

Here the complete systemd-status messages:

`Mai 22 10:53:59 myserver email-to-telegram[914750]: event_handler.consume_emails()

Mai 22 10:53:59 myserver email-to-telegram[914750]: File "/usr/lib/python3.9/site-packages/email_to_telegram/email.py", line 18, in consume_emails

Mai 22 10:53:59 myserver email-to-telegram[914750]: emails, delete_count = get_emails(self.mail_path)

Mai 22 10:53:59 myserver email-to-telegram[914750]: File "/usr/lib/python3.9/site-packages/email_to_telegram/utils.py", line 9, in get_emails

Mai 22 10:53:59 myserver email-to-telegram[914750]: mbox = mailbox.mbox(mail_path)

Mai 22 10:53:59 myserver email-to-telegram[914750]: File "/usr/lib/python3.9/mailbox.py", line 850, in init

Mai 22 10:53:59 myserver email-to-telegram[914750]: _mboxMMDF.init(self, path, factory, create)

Mai 22 10:53:59 myserver email-to-telegram[914750]: File "/usr/lib/python3.9/mailbox.py", line 584, in init

Mai 22 10:53:59 myserver email-to-telegram[914750]: f = open(self._path, 'rb+')

Mai 22 10:53:59 myserver email-to-telegram[914750]: IsADirectoryError: [Errno 21] Is a directory: '/var/spool/mail/telegram'`

@df8oe
Copy link
Author

df8oe commented May 23, 2021

I solved it by myself. The explanation in the config.ini was misleading me. The path should point to the mailbox-file... After changing this everything works like a charm.

@df8oe df8oe closed this as completed May 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant