After installing python on Linux, smtpd.py will be installed under /usr/bin directory. Why does this module exist here? How about the other one under directory /usr/lib/python2.x? What's the difference?
The one in /usr/bin is in your PATH and can be executed by calling its filename in a shell.
The second one is in library directory referenced by PYTHONPATH or sys.path and can be used as a module in python scripts.
They are probably hard or symlinks if they have the same content.
Why two smtpd.py are installed?