mail_tools's Introduction
Some tools I wrote to handle pop3/imap mail box stuff I needed to do. Yes, it's PHP... so what. pop_to_imap.php - This script connects to a pop3 mailbox as a source and copies all the mail present to an imap mailbox in to the INBOX folder. It attempts to preserve flags on the messages. Configuration is maintained in mail_copy.inc.php file. You'll need to copy mail_copy.inc.php_dist to mail_copy.inc.php and adjust the options for your system. The script requires pear's MDB2 module, mysqli and a mysql database. This is to preserve a copy history so the script can be run multiple times and not attempt to sync mail that's already be copied but may no longer be present on the destination server. Config options of note - $config['clear_destination'] = false; This deletes all messages in the destination INBOX and pruges it before any mail is copied over. $config['do_copy_anyway'] = false; This copies all messages without consulting the SQL table to see if the message has been copied in the past. This WILL do an INSERT on dupe UPDATE of the SQL table for the messages. $config['attempt_sync'] = false; When this option is set to true it builds a list of messages from the source plus the messages that have been copied according to the SQL table. It will then compare that to what messages are on the destination side and remove messages from the destination that are in the SQL table as having been copied but are no longer present on the source side. Why would you use this? If you have a large number of accounts with a large amount of mail, it's fairly quick to get a list of message id's but much slower to download and upload each message. So, this will allow you to copy the mail over before the system cut over date. Once the system is cut over the script can be run again and it should run much quicker because it's only copying the missing mail and removing mail that's been removed.
mail_tools's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.