Fetchmail - setup question

This is a discussion on Fetchmail - setup question within the Linux Networking forums, part of the Linux Forums category; Greetings I have set up fetchmail to retrieve my emails from an external server and deliver them to my small ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-13-2004
Greg Gailer
 
Posts: n/a
Default Fetchmail - setup question

Greetings
I have set up fetchmail to retrieve my emails from an external server and
deliver them to my small home network. I have a broadband connection and
have set fetchmail up in an hourly cron job. It works wonderfully well.
However, fetchmail sends an email to my internal user each time it is run. I
cannot find any reference to this in the manual pages and my internal
mailbox is rapidly filling up! Does anyone know of a way to turn this off? I
would be quite satisfied with it only putting an entry in the syslog (which
it is doing) and not sending the emails. Any help is greatly appreciated.

Greg Gailer
g_gailer@yahoo.com.au


Reply With Quote
  #2 (permalink)  
Old 04-13-2004
Maurice Janssen
 
Posts: n/a
Default Re: Fetchmail - setup question

In comp.os.linux.networking, Greg Gailer wrote:
>Greetings
>I have set up fetchmail to retrieve my emails from an external server and
>deliver them to my small home network. I have a broadband connection and
>have set fetchmail up in an hourly cron job. It works wonderfully well.
>However, fetchmail sends an email to my internal user each time it is run.


It's not fetchmail that is sending those emails, but cron. Any output
from a cron job is 'captured' by cron and sent to the owner of the cron
job.
If you redirect the standard output from fetchmail to /dev/null (by
adding "> /dev/null" to the end of the fetchmail command) no output from
fetchmail is seen by cron and no email will be sent.

--
Maurice mauricej (at) xs4all (dot) nl
Reply With Quote
  #3 (permalink)  
Old 04-13-2004
Gregory Toomey
 
Posts: n/a
Default Re: Fetchmail - setup question

Maurice Janssen wrote:

> adding "> /dev/null" to the end of the fetchmail command) no output from
> fetchmail is seen by cron and no email will be sent.



You can also send stderr & stdout to /dev/null by appending 2>&1 . In
addition you can set the shell, email address and default directory for
cron.


SHELL=/bin/bash
MAILTO=spam_me_not@site.com
HOME=/home/gmt/

10 * * * * fetchmail ... >/dev/null 2>&1


gtoomey
Reply With Quote
  #4 (permalink)  
Old 04-13-2004
Ingo Strauch
 
Posts: n/a
Default Re: Fetchmail - setup question

On Tue, 13 Apr 2004 16:51:11 +1000, Greg Gailer wrote:
>
> I have set up fetchmail to retrieve my emails from an external server and
> deliver them to my small home network. I have a broadband connection and
> have set fetchmail up in an hourly cron job. It works wonderfully well.
> However, fetchmail sends an email to my internal user each time it is run. I
> cannot find any reference to this in the manual pages and my internal
> mailbox is rapidly filling up! Does anyone know of a way to turn this off? I
> would be quite satisfied with it only putting an entry in the syslog (which
> it is doing) and not sending the emails. Any help is greatly appreciated.


Why not start it in daemon mode via

fetchmail <otheropts> -d 3600

Cheers,
Ingo

--
Ingo Strauch ---- Registered Linux User #227900 (http://counter.li.org/)
http://www.the-one-brack.org/

Reply With Quote
  #5 (permalink)  
Old 04-13-2004
Antoine EMERIT
 
Posts: n/a
Default Re: Fetchmail - setup question

Ingo Strauch <strauch@mail.desy.de> wrote
news:slrnc7nfse.rcp.strauch@togo.desy.de:
>> wonderfully well. However, fetchmail sends an email to my internal
>> user each time it is run. I cannot find any reference to this in the


I think the mail is comming from the cron daemon.

Trah the output of your cron command :

0 * * * * * root fetchmail .... 2&>1 /dev/null

or set the MAILTO cron parameter to nothing :

MAILTO=
0 * * * * * root fetchmail .... 2&>1 /dev/null

But fetchmail is supposed to run in background without the help of cron :

fetchmail -d <sleep time>

or 'set daemon 300' dans le fichier fetchmailrc.


Regards
Reply With Quote
  #6 (permalink)  
Old 05-10-2004
Phill Edwards
 
Posts: n/a
Default Re: Fetchmail - setup question

"Greg Gailer" <g_gailer@yahoo.com.au> wrote in message
news:407b8bf2$0$27649$61ce578d@news.syd.swiftdsl.c om.au...
> Greetings
> I have set up fetchmail to retrieve my emails from an external server and
> deliver them to my small home network. I have a broadband connection and
> have set fetchmail up in an hourly cron job. It works wonderfully well.
> However, fetchmail sends an email to my internal user each time it is run.

I
> cannot find any reference to this in the manual pages and my internal
> mailbox is rapidly filling up! Does anyone know of a way to turn this off?

I
> would be quite satisfied with it only putting an entry in the syslog

(which
> it is doing) and not sending the emails. Any help is greatly appreciated.
>
> Greg Gailer
> g_gailer@yahoo.com.au


You don't have to run fetchmail form cron. In the fetchmailrc file you can
make it run in daemon mode and tell it how often to poll the mail servers.
Eg:

set daemon 300

makes it run in daemon mode and poll every 5 minutes. No cron required.

Regards,
Phill


Reply With Quote
  #7 (permalink)  
Old 05-12-2004
Martin
 
Posts: n/a
Default Re: Fetchmail - setup question

Phill Edwards wrote:
[...]
> You don't have to run fetchmail form cron. In the fetchmailrc file you can
> make it run in daemon mode and tell it how often to poll the mail servers.
> Eg:
>
> set daemon 300
>
> makes it run in daemon mode and poll every 5 minutes. No cron required.



If you run fetchmail as a service, eg: "service fetchmail start", then
you must also edit the /etc/rc.d/init.d/fetchmail script to delete the
"-d nn" on the command line there.

See "man fetchmail" about "-d".

Good luck,
Martin

--
---------- Give a man a fish and you have fed him for today.
- Martin - Teach him how to fish and he won't bother you for weeks!
- 53N 1W - - Anon
----------
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 01:09 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0