[fetchmail]Re: fetchmail's last run

Michelle Konzack linux4michelle@freenet.de
Mon, 28 Mar 2005 15:31:38 +0200


--74hf9PSALuoWtOh/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Am 2005-03-28 07:46:03, schrieb Payal Rathod:

> You didn't say how you got this output. What does tdfetchmail consist=20
> of?

'tdfetchmail' is a wraper script which looks into each $USER
~/.tdfetchmail/ directory and if it finds a fetchmailrc it
execut it.

So you see in the output, when the cronjob was startet and then
when each $USER was fetched and on which fetchmailrc it was working
on. The last line was the errorstatus of fetchmail.

This all is done by the tdfetchmail wraper script.

Please not, that it works perfectly on a FileServer where $USER have
only access to ther $HOME and no shell for executing fetchmail manaly.

  __( command 'ls -AlG /usr/bin/fetchmail' )____________________________
 /
| -rwx------    1 root       189512  4. Jul 2004  /usr/bin/fetchmail
 \______________________________________________________________________

  __( command 'ls -AlG /usr/sbin/tdfetchmail' )_________________________
 /
| -rwx------    1 root         9940 22. Jan 18:57 /usr/sbin/tdfetchmail
 \______________________________________________________________________

  __( '/etc/cron.d/tdfetchmail' )_______________________________________
 /
| SHELL=3D/bin/bash
| PATH=3D/sbin:/bin:/usr/sbin:/usr/bin
| MAILTO=3Dxxxxxx.xxxxxxx.xxxxx@xxxxxxx.xx
|=20
| */15 * * * * root /usr/sbin/tdfetchmail
 \______________________________________________________________________

Oh yes, 'tdfetchmail' fetchs messages one after one and your system
will never overloaded by virusscanners, spamassassin or RBL lookups.

So if you want, you can write the output to individualy logfiles, e.g.,
all 15 minutes one and send it with:

  __( 'send_logfile' )______________________________________
 /
| #!/bin/bash
|=20
| TEMPFILE=3D`tempfile`
|=20
| echo "From: fetchmail <root@yourserver.tld>" >>$TMPFILE
| echo "To: Your Chef <chef@yourserver.tld>"   >>$TMPFILE
| echo "Date: `date -R`"                       >>$TMPFILE
| echo "Subject: fetchmail log"                >>$TMPFILE
| echo ""                                      >>$TMPFILE
| cat $LOGFILE                                 >>$TMPFILE
|=20
| cat $TMPFILE |ssmtp -t
|=20
| rm $TMPFILE
 \__________________________________________________________

I think, this is what you need...

> With warm regards,
> -Payal

Greetings
Michelle

--=20
Linux-User #280138 with the Linux Counter, http://counter.li.org/=20
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSM LinuxMichi
0033/3/88452356    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

--74hf9PSALuoWtOh/
Content-Type: application/pgp-signature; name="signature.pgp"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFCSAc6C0FPBMSS+BIRAhiRAJ0aYncpiEAEnME2Zw1xDVlEdvSH0wCfd7tJ
Kw1195/mmukU4J7ckZspTL0=
=D3Fp
-----END PGP SIGNATURE-----

--74hf9PSALuoWtOh/--