mail2telegram icon indicating copy to clipboard operation
mail2telegram copied to clipboard

Regex Whitelist Fails

Open maggyium opened this issue 1 year ago • 16 comments

I want to approve all the email coming into the domain , i've added the following regex: ^(([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+([;.](([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+)*$ & \w*@\w*.\w* Neither one is working so i tested the one shown in example image added \[email protected] and trying the test email function it doesn't show up anything when i enter [email protected]

image image Only adding the complete email address seems to work

maggyium avatar Sep 07 '24 13:09 maggyium

Its not just the test page tho i'm not receiving emails unless i keep the complete address

maggyium avatar Sep 07 '24 15:09 maggyium

image

It seems that my parameters are written in reverse.

TBXark avatar Sep 07 '24 15:09 TBXark

Plus there's another bug , so i have two chat ids one group and another personal, emails do get sent to both but commands only work in personal.

maggyium avatar Sep 07 '24 15:09 maggyium

You must @ the bot in the group for it to take effect.

TBXark avatar Sep 07 '24 15:09 TBXark

Oh, it may not work, I haven't specifically adapted it for groups.

TBXark avatar Sep 07 '24 15:09 TBXark

You must @ the bot in the group for it to take effect.

I tried the command with @ tg auto fills that in group it didnt work, tried replying to bot's msg with command, still didn't work tho

maggyium avatar Sep 07 '24 15:09 maggyium

Maybe /start @botname will work, the command must be in front.

TBXark avatar Sep 07 '24 15:09 TBXark

You can create a separate issue and I will specifically adapt the group command for it.

TBXark avatar Sep 07 '24 15:09 TBXark

That aside, so with .* regex entry even if test mail fails it should receive the email right ?

maggyium avatar Sep 07 '24 15:09 maggyium

  1. First, test the whitelist.
  2. Then test the blacklist.
  3. The rest can be directly allowed.

TBXark avatar Sep 07 '24 15:09 TBXark

I am using "https://sendtestemail.com/" to test if i can receive emails or not , its showing status : bounced(few hrs ago i did receive emails from thsi), and i tried the youtube signup email too, i receive it on my another email but not getting it here.

maggyium avatar Sep 07 '24 15:09 maggyium

You can check the logs in the Cloudflare backend, and it's best to set up FORWARD_LIST for easier testing.

TBXark avatar Sep 07 '24 15:09 TBXark

FORWARD_LIST is to fwd the email to another email address for backup am i right ? , is there other process thats needs to be done or i can just add the email to this env var

maggyium avatar Sep 07 '24 16:09 maggyium

Need to add the addresses in FORWARD_LIST to the trusted list in Cloudflare.

TBXark avatar Sep 07 '24 16:09 TBXark

Yeah found the issue while doing that , apparently cloudflare had toggled catch-all off by itself :) now its working

maggyium avatar Sep 07 '24 16:09 maggyium

want me to close this or just convert this into the grp commands not working issue ?

maggyium avatar Sep 07 '24 16:09 maggyium