Restrict ActiveSync usage by domain or user/email #106
-
Hello, I have a running server with dovecot and z-push. This server host multiple mail domains and I don't now how to allow some specific domains to use the ActiveSync (z-push) instance. For example: I want to make an ISPConfig plugin (no problem with this) where I can set in the DB if this domain/user can use z-push to login. If the user are login from dovecot IMAP/POP3 let it go, but if it comes from z-push, apply the restrictions. The problem is I don't know how to identify if the login comes from dovecot or z-push because z-push use dovecot as the login backend and I can't get any Header or flag to identify from where the login comes from. The only thing that comes to my mind is that z-push use a query to the DB for login and if the user or domain is allowed, then let the user/domain go and use the IMAP/POP3 protocol. It's like a pre-login event but I think this is not possible with z-push, or am i wrong? Thank you very much for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You may be able to adapt this solution to your needs. #29 |
Beta Was this translation helpful? Give feedback.
-
Thank you @matidau for your response. The only problem is I don't want to hack the core code. Another idea but I don't know if this works. Looking into the code I found the "SYNC_FOLDER_TYPE_DUMMY" constant. I can make a new backend and extend the "Backend" class, for example:
Then, in the combined Backend I can assign this backend (BackendISPConfig) to the "SYNC_FOLDER_TYPE_DUMMY", for example:
but I don't know if I should/can do that or not and what consequences it may have. |
Beta Was this translation helpful? Give feedback.
Thank you @matidau for your response. The only problem is I don't want to hack the core code.
Another idea but I don't know if this works.
Looking into the code I found the "SYNC_FOLDER_TYPE_DUMMY" constant. I can make a new backend and extend the "Backend" class, for example:
Then, in the combined Backend I can assign this backend (BackendISPConfig) to the "SYNC_FOLDER_TYPE_DUMMY", for example: