I think that you have a problem with the correct settings.
In thunderbird you have to specify mail.test.lan since your domain is test.lan and your host (the server) is named mail
So at the IMAP and SMTP fields you have to enter the correct full qualified domain name mail.test.lan.
If the server name is not mail replace mail with the proper hostname! or just try by putting the ip instead of name
Best regards
Bogdan