I disagree with the approach from experience.
Rather write a simple shell script that does a few things.
*** set a pid in /var/run/ to prevent the script from spawning multiple
times..
Your idea is to spawn a new process every 15mins.. however the
pilerimport could still be running... this will eventually lead to a
lock of either the imap server or your pilerimport host.
Never use the harddrive as a store for temporary files, you will lag
your disk i/o and cause excessive wear.
*** set the tempory directory to /var/shm this is a "ram drive"
available on all linux systems, so the temp files will be stored in
memory reducing disk i/o to zero and reducing lag.
*** in the script create a temp dir with mkdir -p /var/shm/pilerimport
and set the permission to 777, to avoid any permission errors.
Make sure piler import is run as piler user
*** su piler -c "pilerimport"
Hello Philip,
On 2015-02-02 15:20, Philip Deubner wrote:
I just installed the Mailpiler 1.1.0 on a VM using Debian 7.8. After
the first struggles that were caused by me, finally my "historic" data
is included and indexed.
As piler won't always be online, my setup for collecting the emails is
to bcc each written or received email to a specified inbox and to
import these messages into piler using the pilerimport tool.
To do so, I created a cronjob looking like:
*/15 * * * * cd /home/piler && pilerimport -i host -u user -p
verysecretandstrongpassword
As piler needs write access to the directory where pilerimport is
executed, my idea was to cd it to /home/piler which is in the
ownership of piler. The syslog shows that the cronjob is done without
errors, but no emails were imported according to mail.log.
Any suggestions on how to fix it (or explanations what I did wrong)?
Thank you in advance,
your approach may work out, however pilerimport doesn't syslog much, so
I suggest to check out the metadata table if it has newer entries. If
yes, then it works.
Janos