mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-24 19:20:12 +01:00
contrib script to batch import from a pop3 account without deleting emails
This commit is contained in:
parent
9b279af0c6
commit
d4084eaf48
17
contrib/pop3/batch-import-without-removing.sh
Normal file
17
contrib/pop3/batch-import-without-removing.sh
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user