The dodmca.sh script automates the process of logging into an email account via IMAP, scanning for specific emails that match predefined criteria, and performing actions based on those criteria. Specifically designed to handle DMCA notices, security alerts, and abuse reports from DigitalOcean, this script filters emails for certain keywords in the sender address, subject, and body of the email. When a matching email is found, the script creates a text file with details of the email and offers the option to notify a user via Telegram.
- IMAP email login and processing
- Filtering emails based on sender, subject, and body content
- Creation of detailed log files for matching emails
- Optional Telegram notifications
- Configuration of IMAP server, port, and credentials
- Customizable search keywords and logic
- Management of log file size and verbosity
Before you install and run the dodmca.sh script, ensure you have the following prerequisites installed on your system:
muttor a similar utility for handling email contentmailutilsfor email processing- An IMAP server and credentials for accessing the email account
- Clone the repository to your local machine:
git clone https://github.com/drhdev/dodmca.git- Navigate to the
dodmcadirectory:
cd dodmca- Make the script executable:
chmod +x dodmca.sh- (Optional) If you intend to use the Telegram notification feature, ensure
totelgram.shis also in the directory and executable.
To run the dodmca.sh script, use the following command:
./dodmca.sh [options]The script supports several options for customization:
-eEmail address to check-sIMAP server-pIMAP port-wPassword for IMAP login-kKeywords to search in the sender's email address-lKeywords to search in the email subject-mKeywords to search in the email body-nEnable/disable sending to Telegram (on/off)-oPath to store the text files-qMaximum number of text files to keep-rPath for the log file-tOutput verbosity (verbose/silent)
For detailed descriptions of each option, refer to the script's inline documentation.
Contributions are welcome! If you have suggestions for improvements or bug fixes, please open an issue or submit a pull request.
This project is licensed under the GNU Public License - see the LICENSE file for details.
- Special thanks to the DigitalOcean community for inspiring this project.
- Thank you to all contributors and users of this script.
For more information, issues, and feature requests, please visit the repository issues page.