From d4084eaf486dc0587e429f961d75db2bdeb82cfd Mon Sep 17 00:00:00 2001 From: SJ Date: Wed, 3 Sep 2014 11:59:31 +0200 Subject: [PATCH] contrib script to batch import from a pop3 account without deleting emails --- contrib/pop3/batch-import-without-removing.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 contrib/pop3/batch-import-without-removing.sh diff --git a/contrib/pop3/batch-import-without-removing.sh b/contrib/pop3/batch-import-without-removing.sh new file mode 100644 index 00000000..95065638 --- /dev/null +++ b/contrib/pop3/batch-import-without-removing.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +counter_file="pop3-position" +COUNTER=0 +STEPS=10 + +export PATH=$PATH:/usr/bin:/usr/local/bin + +if [ ! -f $counter_file ]; then COUNTER=1; else COUNTER=`cat $counter_file`; fi + + +pilerimport -K pop3.youromain.com -u username -p password -s `cat $counter_file` -b $STEPS + + +COUNTER=`expr $COUNTER + $STEPS` + +printf "%d" "$COUNTER" > $counter_file