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: [email protected]
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!
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.
Remember PHP compability
- Tested to PHP 7.4.33
sudo apt install php-cli php-mailparse
sudo apt install php-cli php-pear php-dev php-mbstring
pecl install mailparse
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
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.
- 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
- 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.
- 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
- From terminal write this
crontab -e
- Write down this to backup your mails every hour
0 * * * * curl https://yourdomain.com/cron_mail.php
See the open issues for a list of proposed features (and known issues).
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
Distributed under the MIT License. See LICENSE
for more information.
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