From: Carlos E. R. <rob...@te...> - 2017-06-04 11:17:05
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday, 2017-05-19 at 20:55 +0200, Matthias Andree wrote: > Be sure that whatever runs your 50 fetchmail processes with the > individual configuration data: > > 1. also gives each process their own .fetchids file and .pid file > location, easiest done through the FETCHMAILHOME environment variable > (also see the env(1) manual page) which flips the whole set of > directories in one go; > > 2. you run fetchmail from an unprivileged user account, not root or toor > or similar. I went ahead and distributed my fetchmail run in two processes, but it can be easily expanded, manually. I created two directories: cer@Telcontar:~> ls -a .fetchmail_0* .fetchmail_01: . .. .fetchmailrc .fetchmailrc~ .fetchmail_02: . .. .fetchmailrc cer@Telcontar:~> Each directory contains one .fetchmailrc file with a part of the original .fetchmailrc, different on each file so the is no interference. In my case, one file polls gmail, which is particularly slow, and the other polls the rest. Then I created a script: +++...................... #!/bin/bash function bucle_N() { cd $HOME/.fetchmail_$1 echo "Launching fetchmail $1" FETCHMAILHOME=$HOME/.fetchmail_$1 fetchmail -v --fetchmailrc .fetchmailrc echo "Fetchmail $1 finished." } echo "Launching two fetchmail processes" date --iso-8601=seconds bucle_N 01 & bucle_N 02 & echo "Waiting for the two fetchmail processes to finish" wait echo "All fetchmails processes have finished." date --iso-8601=seconds mailq | grep Requests ......................++- Notice that it may not be worth it to download a lot of emails fast, if one is going to filter for spam using spamassassin, which is heavy and slow. - -- Cheers, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlkz7CUACgkQtTMYHG2NR9UDpQCfZybLgZ+gEXOxbBe1AuVig+vl +scAnAxg+q2X1iJdUHTpuqaaO1XMJy2t =K0M8 -----END PGP SIGNATURE----- |