can I use one of them as SMTP server
Well, yes and no.
You can write your own SMTP server, or modify an existing one. BUT - you cannot use the standard SMTP port (25, IIRC) You will have to check for an unused port in the appropriate range (for debian.polarhome.com 30000 - 34999; there should be a couple spare...) and modify your client(s) to connect on that port.
Seems a bit like re-inventing the wheel, IMHO
If you need the programming practise - go ahead, knock yourself out! If you need an actual SMTP server I suggest you contact your ISP who probably already has one. If you need a server under your control for nafarious purposes you're looking in the wrong place.
Note: some of this is from personal experience. I have written a server
much simpler than SMTP and had to learn more than I ever wanted to know about socket programming. (Theres a QOTD server on alpha.polarhome running on
http://gate.polarhome.com:3017/ see my sig.)
MikeR