Surya writes:
- I had created a test domain, test mailing list attached to it and few test users. Now, I am trying to login as test users but its not happening. Is think there might be some email validation. On a development server, where can I hear those?
With users created directly via mailman.client, there is no validation. That is a function of the front-end (Postorius), IIRC.
The easiest thing to do is to create your first test user as a real account on the development server so that there are (almost :) no Internet mail issues to deal with. Then you can read mail on the same host. Your second test user can be on a free mail service or on another host you control. Having both will help you determine whether issues are due to Mailman itself or due to your MTA.
When email is not being delivered, *always* report what MTA you are using.
Having said that, I had looked into the code and noticed the below
- postorius.models.MailmanUser class inherits from a base class which does not belong inherit from AbstractBaseUser of django [Django isn't recognizing these objects as users]
That's usually OK in Python. Python programs are expected to "duck type", meaning that the type of an object is determined by the available attributes and methods. Ensuring that the methods and attributes have appropriate semantics is the responsibility of the programmer.
In Python, actual class inheritance is usually a convenience to avoid having to define most methods. However, typically a Mailman user object doesn't actually exist on the same host as Postorius! So a postorius.models.MailmanUser is actually an empty object which bundles a bunch of methods to extract the necessary information from a remote Mailman instance (I'm guessing, but Postorius has to be able to behave that way -- of course it could cache some information in a Django User, but that could cause problems too if the Django User were incompletely initialized).
But the method postorius.views.user.user_login() expects django User objects to authenticate!
Either the MailmanUser objects "duck type" as AbstractBaseUsers, or the necessary attributes are added elsewhere is my guess.
Is there any doc I can read to get little bit more understanding of codebase would also be great.
If there is, it would be in the src/postorius/doc/ directory. But there probably isn't. Ask here and on #mailman. And take notes :-) because when you commit them to doc/ later developers will love you forever! :-) :-)
BTW, don't absolutely trust anything I say until experience proves it or Terri, Florian or Barry signs off on it. For statements about Python, Barry is the best (he's an acknowledged authority with an established title, FLUFL = Friendly Language Uncle for Life, in the Python pantheon). Terri and Florian are the authorities on Postorius itself. (I do try to mark less reliable statements with "IIRC" and the like, but I'm not perfect.)
Steve