Re: Getmail and Fetchmail
Volker Wysk <[email protected]>
| Newsgroups | gmane.mail.getmail.user |
|---|---|
| Message-ID | <5244468.SJYCD9dG5i@desktop> |
Am Donnerstag, 25. Januar 2018, 13:43:45 CET schrieb Charles Cazabon: > Volker Wysk <[email protected]> wrote: > > > > > > What would you like to happen instead, and why is it necessary instead of > > > simply running a few copies of getmail (if you want to IDLE with multiple > > > IMAP servers)? > > > > I'd like it to run out of the box. :-) Of course you can start multiple > > instances of getmail, when you have an init script or something similar. > > That's how I'm using fetchmal right now. > > My favourite way of running getmail - and other utilities that need to run on > a repeating basis - is daemontools' svscan/supervise programs. I don't > include a service script (known as a "run" script with daemontools) in the > getmail package either, but it's trivial enough that probably no one would > need me to. I've dug into daemontools. It's very simple and elegant. Guess it would be my favourite too - if I could get logging working. I really don't know why it isn't working as expected, in my case. I have: desktop /etc/service/test % find /etc/service/test /etc/service/test /etc/service/test/supervise /etc/service/test/supervise/lock /etc/service/test/supervise/status /etc/service/test/supervise/ok /etc/service/test/supervise/control /etc/service/test/log /etc/service/test/log/main /etc/service/test/log/main/lock /etc/service/test/log/main/current /etc/service/test/log/main/state /etc/service/test/log/run /etc/service/test/run desktop /etc/service/test % cat /etc/service/test/run #! /bin/bash echo "hello" echo "hello" >> /tmp/runtest sleep 2 desktop /etc/service/test % cat /etc/service/test/log/run #! /bin/bash exec multilog t ./main desktop /etc/service % ll /etc/service/test/run /etc/service/test/log/run -rwxr--r-- 1 root root 36 Jan 31 14:20 /etc/service/test/log/run* -rwxr--r-- 1 root root 63 Jan 31 14:37 /etc/service/test/run* Line 3 in /etc/service/test/run is there to verify that the service is working at all. It does - /tmp/runtest gets created and filled. The log script /etc/service/test/log/run runs only when started directly. It then logs the stdin to /etc/service/test/log/main/current. The thing is so simple, I'm wondering how an error with the setup could go unnoticed. It must be something stupid. :-( > Not everything should be "in the box". The Unix tool philosophy is do one > thing, and do it well, and let the user hook different programs together as > they see fit, with simple, reliable interfaces. getmail adheres to that > design philosophy. Sometimes the software should encapsulate the complexity, and hide it from the user. Rather than hand it over to the user. Doesn't Daemontools do that? Systemd does that, AFAIK. > If the book says there is a significant performance penalty associated with > invoking an external MDA that speaks LMTP rather than having your program > speak LMTP directly, the book is flat-out wrong. You can safely ignore > anything it says like that. The book addresses large installations, which thoudands of mail accounts. Where some milliseconds make a difference... Of course you're right, that it won't be slow on small installations. Bye Volker