| .github | ||
| docs | ||
| igw_includes | ||
| igw_languages | ||
| igw_template | ||
| mailbackup | ||
| mailbackup_drafts | ||
| mailbackup_notes | ||
| mailbackup_sents | ||
| mailbackup_spam | ||
| mailbackup_trash | ||
| .gitignore | ||
| .htaccess_sample | ||
| .htpasswd_sample | ||
| administrators.php | ||
| allow_image_url.php | ||
| autobot.php | ||
| backupmail.sampledb.sql | ||
| CODE_OF_CONDUCT.md | ||
| composer.json | ||
| composer.lock | ||
| configuration.php | ||
| CONTRIBUTING.md | ||
| cron_mail.php | ||
| cron_mail_test.php | ||
| index.php | ||
| LICENSE | ||
| mail_reader.php | ||
| README.md | ||
| SECURITY.md | ||
| stats.php | ||
| status.php | ||
| tags.php | ||
What is BackupMail?
I have a lot of mails accounts, I think it's a problem, but that is another question. One day thinking about backups my info I thounght how it will be to backups all my mails in my mail accounts, phisically.
User demo: admin | Pass demo: backupmail
» Explore the docs «
·
» View Demo «
·
» Report Bug «
·
» Request Feature «
Send a sample email to: backupmail@iguannaweb.com
Table of Contents
About The Project
Screenshots
This is just a temporal home page screenshot.
This is just a temporal tag page screenshot.
This is just a temporal login page screenshot.
This is a work in progress!
Built With
Getting Started
To get your own backup mail working, you need a server with PHP7 and extension Mailparse installed. Yo need to install composer to fetch dependencies.
Prerequisites
Install mailparse extension
Remember PHP compability
- Tested to PHP 7.4.33
Ubuntu, Debian & derivatives
sudo apt install php-cli php-mailparse
Others platforms
sudo apt install php-cli php-pear php-dev php-mbstring
pecl install mailparse
From source
AAAAMMDD should be php-config --extension-dir
git clone https://github.com/php/pecl-mail-mailparse.git
cd pecl-mail-mailparse
phpize
./configure
sed -i 's/#if\s!HAVE_MBSTRING/#ifndef MBFL_MBFILTER_H/' ./mailparse.c
make
sudo mv modules/mailparse.so /usr/lib/php/AAAAMMDD/
echo "extension=mailparse.so" | sudo tee /etc/php/7.1/mods-available/mailparse.ini
sudo phpenmod mailparse
Windows
You need to download mailparse DLL from http://pecl.php.net/package/mailparse and add the line "extension=php_mailparse.dll" to php.ini accordingly.
Installation
- Clone the backupmail repository
git clone https://github.com/Iguannaweb/backupmail.git
- Run composer install to fetch dependencies
php composer.phar install
-
Create a mysql database and import the file backupmail.sampledb.sql
-
Modify dbc.sample.php with the database credentials and rename to dbc.php
-
Login to access with user admin and password backupmail
Usage
- First of all you need to protect the access to your domain. if it will be public. We recomend create a .htaccess/.htpassword files to add an extra layer of security.
- Config one mail on the mail.config.sample.php, rename to mail.config.php and check the connection con ./cron_mail.php.
- In that file you can set
$display_remote_imagesto0to avoid loading external images when reading mails. - Copy
igw_includes/config/allowed_image_urls.sample.jsontoallowed_image_urls.jsonto enable the allow list. Edit this file to manage additional remote image domains that will always be allowed. - When viewing an email, blocked domains are shown in a warning message. Click the provided link to add a domain to the allow list.
- Test the folder imap structure with cron_mail_test.php
- Start fetching your mails, navigate and tag them all!
- Create task or favorite your preferred mails.
For more examples, please refer to the Documentation
Cron
- From terminal write this
crontab -e
- Write down this to backup your mails every hour
0 * * * * curl https://yourdomain.com/cron_mail.php
Roadmap
See the open issues for a list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE for more information.
Contact
Francisco Gálvez - Write me an email!
If you want to contact me, the best way is write an email or open an issue here, I'm not really active on social networks.
Project Link: https://github.com/Iguannaweb/backupmail


