Skip to content

IPv6: Failed to send Telegram message: Timed out #18

@hans-mayer

Description

@hans-mayer

Dear All,
I am running Debian bookworm 12.6 with Python 3.11.2 and dual IP stack with IPv4 and IPv6
I installed python3-python-telegram-bot and python3-imaplib2 and I did the configuration in /etc/mail-to-telegram-forwarder/mailToTelegramForwarder.conf
When I started mailToTelegramForwarder and I received an e-mail I got the following error:
<2> Mail to Telegram Forwarder: Failed to send Telegram message: Timed out [/usr/local/bin/mailToTelegramForwarder:449 in 'send_message']
I saw with tcpdump there is some network traffic on https with IPv6 address of api.telegram.org 2001:67c:4e8:f004::9
But of course the message didn't arrive. I have a simple shell script using curl which works perfectly but this is using the IPv4 address of api.telegram.org for some reason
So what I did, I made an entry in /etc/hosts
149.154.167.220 api.telegram.org
This solved the issue and mailToTelegramForwarder works fine.
But of course I want to get rid off this entry.

I seems there is an issue with IPv6 in one of these scripts or modules.
BTW: I am still wondering. IPv6 is more than 20 years old and there are still some programs which cannot work successfully.

// Hans

--

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions