* [gentoo-user] fcron & fetchmail & procmail and the "why not?"
@ 2009-09-20 15:34 meino.cramer
2009-09-20 18:21 ` Ward Poelmans
2009-09-21 13:02 ` [gentoo-user] " Stroller
0 siblings, 2 replies; 11+ messages in thread
From: meino.cramer @ 2009-09-20 15:34 UTC (permalink / raw
To: Gentoo
Hi,
I have used for testing the following combo:
Configured fetchmail for my user account and configured
procmail to deliver the mail.
I called fetchmail by hand:
It works.
In my fetchmailrc there is the line
mda "/usr/bin/procmail -d %T"
as said: When started by hand everything is fine.
Also fcron is installed and my personal fcrontab contains
the line:
@ 5 mrxvt -fn 10x20 -display :0.0 -g 30x5+0+0 -e dialog --yesno "TEST" 10 30
which also works: Every five minutes a dialog box pops up.
BUT!
When using the line:
@ 5 fetchmail -a
nothing happens: The mail remains on the server and can be downloaded
with
fetchmail -a
from the commandline.
May be I am a little overhacked today...but what the hack I am doing
wrong here?
Thank you very much for any help in advance!
mcc
--
Please don't send me any Word- or Powerpoint-Attachments
unless it's absolutely neccessary. - Send simply Text.
See http://www.gnu.org/philosophy/no-word-attachments.html
In a world without fences and walls nobody needs gates and windows.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] fcron & fetchmail & procmail and the "why not?"
2009-09-20 15:34 [gentoo-user] fcron & fetchmail & procmail and the "why not?" meino.cramer
@ 2009-09-20 18:21 ` Ward Poelmans
2009-09-21 2:05 ` [gentoo-user] " Harry Putnam
2009-09-21 13:02 ` [gentoo-user] " Stroller
1 sibling, 1 reply; 11+ messages in thread
From: Ward Poelmans @ 2009-09-20 18:21 UTC (permalink / raw
To: gentoo-user
On Sun, Sep 20, 2009 at 17:34, <meino.cramer@gmx.de> wrote:
>
> When using the line:
>
> @ 5 fetchmail -a
>
> nothing happens: The mail remains on the server and can be downloaded
> with
>
> fetchmail -a
>
> from the commandline.
>
> May be I am a little overhacked today...but what the hack I am doing
> wrong here?
Are you sure the cron job runs? Check the logs. Or try adding:
*/5 * * * * fetchmail -a
in your cron file.
Ward
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-user] Re: fcron & fetchmail & procmail and the "why not?"
2009-09-20 18:21 ` Ward Poelmans
@ 2009-09-21 2:05 ` Harry Putnam
2009-09-21 2:29 ` meino.cramer
0 siblings, 1 reply; 11+ messages in thread
From: Harry Putnam @ 2009-09-21 2:05 UTC (permalink / raw
To: gentoo-user
Ward Poelmans <wpoely86@gmail.com> writes:
> On Sun, Sep 20, 2009 at 17:34, <meino.cramer@gmx.de> wrote:
>>
>> When using the line:
>>
>> @ 5 fetchmail -a
>>
>> nothing happens: The mail remains on the server and can be downloaded
>> with
>>
>> fetchmail -a
>>
>> from the commandline.
>>
>> May be I am a little overhacked today...but what the hack I am doing
>> wrong here?
>
> Are you sure the cron job runs? Check the logs. Or try adding:
> */5 * * * * fetchmail -a
> in your cron file.
Another way to go at it might be to use fetchmails' built in daemon
mode (fetchmail -d INTERVAL). And forget about cron.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Re: fcron & fetchmail & procmail and the "why not?"
2009-09-21 2:05 ` [gentoo-user] " Harry Putnam
@ 2009-09-21 2:29 ` meino.cramer
2009-09-21 6:39 ` Johám-Luís Miguéns Vila
0 siblings, 1 reply; 11+ messages in thread
From: meino.cramer @ 2009-09-21 2:29 UTC (permalink / raw
To: gentoo-user
Harry Putnam <reader@newsguy.com> [09-09-21 04:25]:
> Ward Poelmans <wpoely86@gmail.com> writes:
>
> > On Sun, Sep 20, 2009 at 17:34, <meino.cramer@gmx.de> wrote:
> >>
> >> When using the line:
> >>
> >> @ 5 fetchmail -a
> >>
> >> nothing happens: The mail remains on the server and can be downloaded
> >> with
> >>
> >> fetchmail -a
> >>
> >> from the commandline.
> >>
> >> May be I am a little overhacked today...but what the hack I am doing
> >> wrong here?
> >
> > Are you sure the cron job runs? Check the logs. Or try adding:
> > */5 * * * * fetchmail -a
> > in your cron file.
>
> Another way to go at it might be to use fetchmails' built in daemon
> mode (fetchmail -d INTERVAL). And forget about cron.
>
>
fcron does run (see my previous mail).
I will try the daemon mode. What will be the best place to fire up
fetchmail then?
...but I am still curious what prevents the call by fcron, since this
is also recommended by some howtos...
--
Please don't send me any Word- or Powerpoint-Attachments
unless it's absolutely neccessary. - Send simply Text.
See http://www.gnu.org/philosophy/no-word-attachments.html
In a world without fences and walls nobody needs gates and windows.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Re: fcron & fetchmail & procmail and the "why not?"
2009-09-21 2:29 ` meino.cramer
@ 2009-09-21 6:39 ` Johám-Luís Miguéns Vila
2009-09-21 15:43 ` meino.cramer
0 siblings, 1 reply; 11+ messages in thread
From: Johám-Luís Miguéns Vila @ 2009-09-21 6:39 UTC (permalink / raw
To: gentoo-user
meino.cramer@gmx.de writes:
> Harry Putnam <reader@newsguy.com> [09-09-21 04:25]:
>> Ward Poelmans <wpoely86@gmail.com> writes:
>>
>> > On Sun, Sep 20, 2009 at 17:34, <meino.cramer@gmx.de> wrote:
>> >>
>> >> When using the line:
>> >>
>> >> @ 5 fetchmail -a
>> >>
>> >> nothing happens: The mail remains on the server and can be downloaded
>> >> with
>> >>
>> >> fetchmail -a
>> >>
>> >> from the commandline.
>> >>
>> >> May be I am a little overhacked today...but what the hack I am doing
>> >> wrong here?
>> >
>> > Are you sure the cron job runs? Check the logs. Or try adding:
>> > */5 * * * * fetchmail -a
>> > in your cron file.
>>
>> Another way to go at it might be to use fetchmails' built in daemon
>> mode (fetchmail -d INTERVAL). And forget about cron.
>>
>>
>
> fcron does run (see my previous mail).
> I will try the daemon mode. What will be the best place to fire up
> fetchmail then?
> ...but I am still curious what prevents the call by fcron, since this
> is also recommended by some howtos...
Have you tried to write a shell script calling fetchmail and call that from fcron?
@ 5 /wherever/your/script/is.sh
--
I loathe people who keep dogs. They are cowards who haven't got the guts
to bite people themselves.
-- August Strindberg
- This message may be digitally signed: GPG KeyID:0x9D2FD6C8 || FNMT SSL cert
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] fcron & fetchmail & procmail and the "why not?"
2009-09-20 15:34 [gentoo-user] fcron & fetchmail & procmail and the "why not?" meino.cramer
2009-09-20 18:21 ` Ward Poelmans
@ 2009-09-21 13:02 ` Stroller
2009-09-21 16:06 ` meino.cramer
1 sibling, 1 reply; 11+ messages in thread
From: Stroller @ 2009-09-21 13:02 UTC (permalink / raw
To: gentoo-user
On 20 Sep 2009, at 16:34, meino.cramer@gmx.de wrote:
> ...
> When using the line:
>
> @ 5 fetchmail -a
>
> nothing happens: The mail remains on the server and can be downloaded
> with
>
> fetchmail -a
>
> from the commandline.
Here my crontab says:
0-59/4 * * * * /usr/bin/fetchmail > /dev/null 2>&1
I suggest trying the full path, but you may also be able to redirect
to somewhere other than /dev/null & perhaps see something useful?
Stroller.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Re: fcron & fetchmail & procmail and the "why not?"
2009-09-21 6:39 ` Johám-Luís Miguéns Vila
@ 2009-09-21 15:43 ` meino.cramer
2009-09-21 15:46 ` Ward Poelmans
0 siblings, 1 reply; 11+ messages in thread
From: meino.cramer @ 2009-09-21 15:43 UTC (permalink / raw
To: gentoo-user
Johám-Luís Miguéns Vila <galiza.ceive@gmail.com> [09-09-21 17:13]:
> meino.cramer@gmx.de writes:
>
> > Harry Putnam <reader@newsguy.com> [09-09-21 04:25]:
> >> Ward Poelmans <wpoely86@gmail.com> writes:
> >>
> >> > On Sun, Sep 20, 2009 at 17:34, <meino.cramer@gmx.de> wrote:
> >> >>
> >> >> When using the line:
> >> >>
> >> >> @ 5 fetchmail -a
> >> >>
> >> >> nothing happens: The mail remains on the server and can be downloaded
> >> >> with
> >> >>
> >> >> fetchmail -a
> >> >>
> >> >> from the commandline.
> >> >>
> >> >> May be I am a little overhacked today...but what the hack I am doing
> >> >> wrong here?
> >> >
> >> > Are you sure the cron job runs? Check the logs. Or try adding:
> >> > */5 * * * * fetchmail -a
> >> > in your cron file.
> >>
> >> Another way to go at it might be to use fetchmails' built in daemon
> >> mode (fetchmail -d INTERVAL). And forget about cron.
> >>
> >>
> >
> > fcron does run (see my previous mail).
> > I will try the daemon mode. What will be the best place to fire up
> > fetchmail then?
> > ...but I am still curious what prevents the call by fcron, since this
> > is also recommended by some howtos...
>
> Have you tried to write a shell script calling fetchmail and call that from fcron?
>
> @ 5 /wherever/your/script/is.sh
> --
> I loathe people who keep dogs. They are cowards who haven't got the guts
> to bite people themselves.
> -- August Strindberg
> - This message may be digitally signed: GPG KeyID:0x9D2FD6C8 || FNMT SSL cert
No I havent, since I see no difference to calling a "real" executable
-- but I will give it try.
By the way: Calling fetchmal -d from ~/.openbox/autostart.sh also does
not work, but other programs started from there do have no problems.
--
Please don't send me any Word- or Powerpoint-Attachments
unless it's absolutely neccessary. - Send simply Text.
See http://www.gnu.org/philosophy/no-word-attachments.html
In a world without fences and walls nobody needs gates and windows.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Re: fcron & fetchmail & procmail and the "why not?"
2009-09-21 15:43 ` meino.cramer
@ 2009-09-21 15:46 ` Ward Poelmans
0 siblings, 0 replies; 11+ messages in thread
From: Ward Poelmans @ 2009-09-21 15:46 UTC (permalink / raw
To: gentoo-user
On Mon, Sep 21, 2009 at 17:43, <meino.cramer@gmx.de> wrote:
> By the way: Calling fetchmal -d from ~/.openbox/autostart.sh also does
> not work, but other programs started from there do have no problems.
Try running fetchmail -d -v --logfile ~/fetchmail.log in your
autostart or cron and see if fetchmail gets started and if it gives
any kind of error.
Ward
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] fcron & fetchmail & procmail and the "why not?"
2009-09-21 13:02 ` [gentoo-user] " Stroller
@ 2009-09-21 16:06 ` meino.cramer
2009-09-22 11:46 ` Stroller
0 siblings, 1 reply; 11+ messages in thread
From: meino.cramer @ 2009-09-21 16:06 UTC (permalink / raw
To: gentoo-user
Stroller <stroller@stellar.eclipse.co.uk> [09-09-21 17:13]:
>
> On 20 Sep 2009, at 16:34, meino.cramer@gmx.de wrote:
> >...
> >When using the line:
> >
> > @ 5 fetchmail -a
> >
> >nothing happens: The mail remains on the server and can be downloaded
> >with
> >
> > fetchmail -a
> >
> >from the commandline.
>
> Here my crontab says:
>
> 0-59/4 * * * * /usr/bin/fetchmail > /dev/null 2>&1
>
> I suggest trying the full path, but you may also be able to redirect
> to somewhere other than /dev/null & perhaps see something useful?
>
> Stroller.
>
Ha! :)
To not to involve stdout was the hack!
Currently I am running fetchmail via fcron and does what it should
since fetchmail directly reports to /dev/null.
I think I will change the whole suff to run in daemon mode, since I
think (to be read as: "...not know for sure...") that it is a little
bit more performant. Or?
Thanks for the help! :)
Keep hacking!
mcc
--
Please don't send me any Word- or Powerpoint-Attachments
unless it's absolutely neccessary. - Send simply Text.
See http://www.gnu.org/philosophy/no-word-attachments.html
In a world without fences and walls nobody needs gates and windows.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] fcron & fetchmail & procmail and the "why not?"
2009-09-21 16:06 ` meino.cramer
@ 2009-09-22 11:46 ` Stroller
2009-09-22 13:16 ` Neil Bothwick
0 siblings, 1 reply; 11+ messages in thread
From: Stroller @ 2009-09-22 11:46 UTC (permalink / raw
To: gentoo-user
On 21 Sep 2009, at 17:06, meino.cramer@gmx.de wrote:
> ...
> To not to involve stdout was the hack!
>
> Currently I am running fetchmail via fcron and does what it should
> since fetchmail directly reports to /dev/null.
Sorry to seem like a numptie, but are you saying you fixed it?
The problem was solved merely by adding the redirect?
> I think I will change the whole suff to run in daemon mode, since I
> think (to be read as: "...not know for sure...") that it is a little
> bit more performant. Or?
I run as user, 2 users, each with their own .fetchmailrc & each
adding their own entry into their own crontab. I.E. just like you have
it now. I have been running my system this way for years.
The notion of daemon mode bothers me, because it must be run by root
(IIRC) and the various users all put their separate private email
passwords in a single file in /etc OTOH, the daemon mode
configuration file is readable only by root, and if the root account
is compromised then the users' private .fetchmailrc files can be read
anywhere.
Fetchmail is a bit of a kludge, really. I wouldn't worry too much
about being best conformant.
Stroller.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] fcron & fetchmail & procmail and the "why not?"
2009-09-22 11:46 ` Stroller
@ 2009-09-22 13:16 ` Neil Bothwick
0 siblings, 0 replies; 11+ messages in thread
From: Neil Bothwick @ 2009-09-22 13:16 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 937 bytes --]
On Tue, 22 Sep 2009 12:46:27 +0100, Stroller wrote:
> The notion of daemon mode bothers me, because it must be run by root
Users can run in daemon mode too, although that means you'll have one
daemon running for each user.
> (IIRC) and the various users all put their separate private email
> passwords in a single file in /etc
You can omit the passwords from fetchmailrc and include them in individual
user's .netrc files,according to the man page.
"If you do not specify a password, and fetchmail cannot extract one from
your ~/.fetchmailrc file, it will look for a ~/.netrc file in your
home directory before requesting one interactively; if an entry matching
the mailserver is found in that file, the password will be used.
Fetchmail first looks for a match on poll name; if it finds none, it
checks for a match on via name."
--
Neil Bothwick
Unsupported service (adj): Broken (see Demon)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2009-09-22 13:16 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-20 15:34 [gentoo-user] fcron & fetchmail & procmail and the "why not?" meino.cramer
2009-09-20 18:21 ` Ward Poelmans
2009-09-21 2:05 ` [gentoo-user] " Harry Putnam
2009-09-21 2:29 ` meino.cramer
2009-09-21 6:39 ` Johám-Luís Miguéns Vila
2009-09-21 15:43 ` meino.cramer
2009-09-21 15:46 ` Ward Poelmans
2009-09-21 13:02 ` [gentoo-user] " Stroller
2009-09-21 16:06 ` meino.cramer
2009-09-22 11:46 ` Stroller
2009-09-22 13:16 ` Neil Bothwick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox