Skip to content

yodog/zimbra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

About

This repository is a collection of Zimbra scripts created in the past years of email server administration. While Zimbra is the main focus, you will also find cyrus, postfix, sendmail and others.

Disclaimer: this README.md file is generated by AI.

File Manifest

  • README.md: This documentation file.
  • zmb-domain-summary.py: script used for retrieving Zimbra account summaries.
  • test-connection.py: script to test connectivity to the Zimbra server.

zmb-domain-summary.py

The zmb-domain-summary.py script generates a summary report of Zimbra accounts, categorized by domain. The report includes counts of active, closed, locked, maintenance, total, admin, delegated admin, system, and pending accounts. This tool can be particularly useful for administrators looking to manage and audit user accounts effectively.

  1. Establish LDAP Connection: The script connects to the Zimbra LDAP server using specified credentials.
  2. Retrieve User Accounts: It fetches all Zimbra user accounts and their relevant attributes, filtering out non-user accounts.
  3. Create Domain Database: Constructs a database indexed by domain, categorizing users based on their email addresses.
  4. Generate Summary: Compiles a summary of user accounts, counting active, closed, locked, and other account status types.
  5. Print and Send Results: Formats the summary for display and can optionally send it via email.

Key Functions:

  • createLdapConn(): Establishes a connection to the LDAP server.
  • zmbGetAllAccounts(): Retrieves all user accounts from the Zimbra server.
  • createDomainDatabase(): Constructs a database indexed by email domains.
  • createSummaryArray(): Generates a summary of accounts by status.
  • printTable(): Formats and prints the summary as a table.
  • sendMail(): Sends the summary report via email if requested.

test-connection.py

The test-connection.py script is intended to verify connectivity to the Zimbra server. Although the exact implementation details are not available, it typically performs the following tasks:

  1. Establish Connection: The script attempts to connect to the Zimbra server using provided credentials and server details.
  2. Check Response: It checks whether the server responds appropriately, indicating whether the connection is successful.
  3. Output Result: Outputs the result of the connection test, providing feedback to the user on the connection status.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages