Skip to content

sctg-development/email-setting-extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Email Settings Extractor

This Python script extracts IMAP and SMTP login parameters from a .mobileconfig file, which is a configuration file used by Apple devices for email accounts.

Prerequisites

  • Python 3 (accessible as python3)
  • OpenSSL (usually installed on macOS and Linux)

Usage

  1. Place the .mobileconfig file in the same directory as the script, or provide the full path.

  2. Run the script from the command line:

    python3 extract_imap.py <path_to_mobileconfig_file>
    

    Replace <path_to_mobileconfig_file> with the actual path to your .mobileconfig file.

Example

Assuming you have a file named firstname_lastname_imap.mobileconfig in the current directory:

python3 extract_imap.py firstname_lastname_imap.mobileconfig

This will output something like:

Extracted IMAP Settings:
account_type: IMAP
email_address: [email protected]
server_hostname: wmailetu.univ-artois.fr
server_port: 993
use_ssl: True
username: [email protected]
authentication: EmailAuthPassword

Extracted SMTP Settings:
server_hostname: thq01.univ-artois.fr
server_port: 587
use_ssl: True
username: [email protected]
authentication: EmailAuthPassword

What the Script Does

  • Uses OpenSSL to extract the property list (plist) content from the signed .mobileconfig file.
  • Parses the plist data to find the email account configuration.
  • Extracts and displays key IMAP and SMTP settings such as server hostname, port, username, and authentication method.

Notes

  • The script assumes the .mobileconfig file contains IMAP and SMTP email account configurations.
  • If the file is not properly signed or formatted, the script may fail.
  • This script is for educational purposes and demonstrates file parsing and data extraction in Python.

About

imap mobileconfig simple parser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages