pilerimport utility + log save to file + more human readable progress

Issue #1052 closed
Adam Nadolski created an issue

it would be nice if pilerimport utility would have a switch for logging to file as sometimes rediricting output is not desired due to built complex command for example with ‘find’. i tried redirecting standart output of pilerimport to file but it did not import email, only save them (mails, not logs) in file i tried to setup to log output usually pilerimport outputs

command i am using and it is working with importing emails:
\$EMLPATH='/dir/to/mailserver/mail/store'
\$EMLPATHSIZE=$(du -sb "$URL" | awk '{print $1}')
find "$EMLPATH" -type f -path "#msgs" -name ".eml" -not ( -path "__" -o -path "Calendar" -o -path "Contacts" -o -path "RSS" -o -path "Drafts" -o -path "Notes" -o -path "Journal" -o -path "Tasks" -o -path "Sugerowane kontakty" -o -path "&AXk-r&APM-d&AUI-a wiadomo&AVs-ci*" ) -exec pilerimport -e {} 2>/dev/null \; -exec cat {} \; | pv --size=$EMLPATHSIZE >/dev/null

--

OS: Debian 10
sphinx ver: 3.2.1
mailpiler ver: 1.3.7 (installed from .deb, with some additional postinstall steps)

Comments (3)

  1. Janos SUTO repo owner

    Well, pilerimport should be quiet when importing a single eml file. Also you may use -q to be quiet. Any possible issues should be syslogged by pilerimport.

    Note that pilerimport itself doesn’t save the email, it merely reads and processes it. So the mentioned accidental saving may be some problem in the assembled find command. Which is impressive anyway :-)

  2. Log in to comment