I'm trying to build a system that analyzes incoming emails and automatically removes emails that fail permanently. But I never receive those emails that you usually receive when you send an email to an address that is not valid.
To test my system I use the command
mail -s "test mail" firstname.lastname@example.org
I receive the email on my mailbox email@example.com from firstname.lastname@example.org
I reply to email@example.com to say hello, and I receive the email on myserverdomain.com.
Then I try this :
mail -s "test mail" firstname.lastname@example.org
And I never receive this email that tells you it's not a valid address.
If I'm sending an email from a "classic" email client (gmail for example) to email@example.com, I receive almost immediately this email telling me it's not a valid address.
So am I missing something? I think yes.
I'm using Postfix latest version on debian. It's configured on port 6666 (not 25 actually). I'm using another smtp server on the same machine on port 25, it's a python script that receives external emails and analyzes them.