Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-13-2009, 03:11 PM
Active Member
 
Posts: 41
Default imap admin access

I'm trying to do some automated mail processing. I have a python script that loads the emails via imap and processes them; it's all basically working nicely. Something like this:

from imaplib import *
import email, email.parser
server=IMAP4_SSL("mail.example.com")
server.login("user", "password")
mboxes=server.list()[1]
...

Instead of hardcoding the user's name and password here, I'd like to log in as admin with admin's password. Some IMAP servers allow authenticating as admin but logging onto user's mailbox using usernames like this:
server.login("user*admin", "adminpassword")
I.e. real user, "*", admin username. I've tried this on Zimbra and it doesn't seem to work. I also tried proxyauth but it didn't work either (at least in my test). I can't find a lot of documentation on Zimbra's IMAP client.

Is there any way to do this? You can do it in the web admin client, so I'm thinking there must be a way.

Thanks,

-- Gary Oberbrunner
Reply With Quote
  #2 (permalink)  
Old 01-14-2009, 12:03 AM
Moderator
 
Posts: 6,237
Default

I'm not sure how that particular python imaplib works (can you do TLS/SSL easily?) but:
Quote:
Originally Posted by dkarp
Zimbra does support AUTH=PLAIN. You should be able to authenticate as a target user using only an admin username/password and the target username -- no user passwords are referenced in this case.
Example with imapsync:
Quote:
Originally Posted by mmorse
imapsync --host1 source.server.com --user1 username --authuser1 adminusername --password1 adminpassword --ssl1 --port1 993 --host2 destination.server.com --user2 username --password2 password --authmech2 PLAIN --ssl2 --port2 993 --syncinternaldates --subscribe --nosyncacls

or

imapsync --syncinternaldates --subscribed --host1 sourceserver --host2 destinationserver --user1 userAcctSrc --authuser1 adminUserSrc --password1 adminPassDest --user2 useracctondest --authuser2 adminUserDest --password2 adminPassDest --ssl1 --port1 num --ssl2 --port2

(Be sure zimbraImapSSLServerEnabled is set to TRUE.)

I believe AUTH=PLAIN requires TLS encoding, so an IMAPs or STARTTLS command on a normal IMAP connection.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.