Re: fetchmail tip (was Re: [opensuse] Dovecot 2.0)
Anton Aylward wrote:
James Knott said the following on 09/23/2011 05:31 AM:
David C. Rankin wrote:
What I do with fetchmail is set up the user ~/.fetchmailrc as:
I run fetchmail as a daemon and use /etc/fetchmailrc to contain all the users.
Oh?
What's the format of /etc/fetcmailrc then? Just the user names? And each use has his/her own .fetchmailrc?
The one file contains everyone. You just add "poll" lines for each user. No need for a .fetchmailrc per user. # Configuration created Wed Sep 21 15:50:50 2011 by fetchmailconf 1.57 set postmaster "jknott" set bouncemail set no spambounce set softbounce set properties ""op set daemon 120 poll mail.xxxxxxx.com protocol POP3 user "jknott@xxxxxxx.com" there with password "yyyyy" is jknott here -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
James Knott said the following on 09/23/2011 02:40 PM:
Anton Aylward wrote:
James Knott said the following on 09/23/2011 05:31 AM:
David C. Rankin wrote:
What I do with fetchmail is set up the user ~/.fetchmailrc as:
I run fetchmail as a daemon and use /etc/fetchmailrc to contain all the users.
Oh?
What's the format of /etc/fetcmailrc then? Just the user names? And each use has his/her own .fetchmailrc?
The one file contains everyone. You just add "poll" lines for each user. No need for a .fetchmailrc per user.
And if each user ALREADY has their own .fetchmailrc (which they can edit, unlike the /etc/fetchmailrc) (and which if they buqqer-up, won't affect other users) then there's no need for a /etc/fetchmailrc. Right? You could say its about 'delegation'. You could say its about 'risk management'. -- There's a tendency today to absolve individuals of moral responsibility and treat them as victims of social circumstance. You buy that, you pay with your soul. -Tom Robbins, Still Life with Woodpecker -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Anton Aylward wrote:
The one file contains everyone. You just add "poll" lines for each user. No need for a .fetchmailrc per user.
And if each user ALREADY has their own .fetchmailrc (which they can edit, unlike the /etc/fetchmailrc) (and which if they buqqer-up, won't affect other users) then there's no need for a /etc/fetchmailrc.
Right?
You could say its about 'delegation'. You could say its about 'risk management'.
Do they all have to run their own instance of fetchmail? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
James Knott said the following on 09/23/2011 04:47 PM:
Do they all have to run their own instance of fetchmail?
Yes and no. Yes they do and no its done via crontab. -- It is an error to imagine that evolution signifies a constant tendency to increased perfection. That process undoubtedly involves a constant remodelling of the organism in adaptation to new conditions; but it depends on the nature of those conditions whether the directions of the modifications effected shall be upward or downward. Thomas H. Huxley -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Anton Aylward wrote:
James Knott said the following on 09/23/2011 04:47 PM:
Do they all have to run their own instance of fetchmail?
Yes and no. Yes they do and no its done via crontab.
The way I run it, fetchmail is enabled in system services and started automagically in run levels 3 & 5. It's set to run as a damon and checks the mail every 120 seconds. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
James Knott said the following on 09/23/2011 10:36 PM:
Anton Aylward wrote:
James Knott said the following on 09/23/2011 04:47 PM:
Do they all have to run their own instance of fetchmail?
Yes and no. Yes they do and no its done via crontab.
The way I run it, fetchmail is enabled in system services and started automagically in run levels 3& 5. It's set to run as a damon and checks the mail every 120 seconds.
The issue with fetchmail that both of us face is this: Who Maintains the fetchmailrc? Our policy is that the sysadmin DOES NOT. So there are two categories of users: 1 That only have this mailbox and so don't need fetchmail. These are the unsophisticated ones They don't know about fetchmail or what IMAP is. 2 That have mailboxes everywhere. We don't care if they use fetchmail or if they get their MUAs to access those other mailboxes directly. They are smart enough to configure their own .fetchmailrc and crontab. HOW they read mail, what GUI is up to them. It is a separate issue and nothing to do with which imap server we use. In fact when we changed from courier to IMAP no-one noticed :-) -- In science it often happens that scientists say, 'You know, that's a really good argument; my position is mistaken,' and then they actually change their minds and you never hear that old view from them again. They really do it. It doesn't happen as often as it should, because scientists are human and change is sometimes painful. But it happens every day. I cannot recall the last time something like that happened in politics or religion. -- Carl Sagan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Anton Aylward wrote:
Our policy is that the sysadmin DOES NOT.
In our system, I am the one who sets up the email accounts for users (and builds servers, sets up VPNs etc.), so this is just part of that. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 2011-09-23 at 21:43 -0400, Anton Aylward wrote:
James Knott said the following on 09/23/2011 04:47 PM:
Do they all have to run their own instance of fetchmail?
Yes and no. Yes they do and no its done via crontab. -- I was in the assumption that one should not run fetchmail from cron. If you want to fetch it regularly, use the "-d 1500" option, so that fetchmail runs as a deamon.
One of the problems one )might_ encounter, when using cron, is that you have the risc that one is started up, before the previous has finished, while this is avoided by using the daemon option from fetchmail. hw -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hans Witvliet said the following on 09/24/2011 08:58 AM:
On Fri, 2011-09-23 at 21:43 -0400, Anton Aylward wrote:
James Knott said the following on 09/23/2011 04:47 PM:
Do they all have to run their own instance of fetchmail?
Yes and no. Yes they do and no its done via crontab. -- I was in the assumption that one should not run fetchmail from cron. If you want to fetch it regularly, use the "-d 1500" option, so that fetchmail runs as a deamon.
One of the problems one )might_ encounter, when using cron, is that you have the risc that one is started up, before the previous has finished, while this is avoided by using the daemon option from fetchmail.
Not a problem :-) $ crontab -l @reboot fetchmail -d 300 @hourly (fetchmail -q; sleep 5; fetchmail -d 300) >/dev/null 2>&1 Why, you ask? We've found fetchmail sometimes does strange things, is very sensitive to errors in the rc file. What it really needs is something that does a SIGUSER1 or better, something that re-reads the config file rather than just restarting the polling sequence. Or better still, detects that the rc file has changed and re-reads it. Yes I am aware that the man page says <quote> If you touch or change the ~/.fetchmailrc file while fetchmail is running in daemon mode, this will be detected at the beginning of the next poll cycle. When a changed ~/.fetchmailrc is detected, fetchmail rereads it and restarts from scratch (using exec(2); no state information is retained in the new instance). Note that if fetchmail needs to query for passwords, of that if you break the ~/.fetchmailrc file's syntax, the new instance will softly and silently vanish away on startup. </quote> But read that again and you'll see why CRON is being used to ensure robustness. Fetchmail also has problems with DNS errors at startup. I'd hope that some kind of 'dependency' mechanism such as 'systemd' will eventually address this. As for running fetchmail as a system daemon rather than a per user daemon, I think the current way of having ALL the scripts in /etc/fetchmailrc is wrong-headed. I think that the system daemon should spawn off child processes that read the per user ~/.fetchmail files and carry them out. That way the individual users can add and edit their own .fetchmail files and not compromise the system. Yes the sysadmin can still edit them as well. Nothing new there. How is this different from the system-level Apache recognising users ~/public_html and spawning of sub-processes to deal with them? As for sysloging; fetchmail produces a lot of nose but is often silent about errors. As the man page says, it sometimes 'softly and silently' vanishes. No software is perfect, sometimes we need wrappers to increase robustness. Why? In essence we don't have a 'Sysadmin on call'. If an experienced user can take care of his or her own problems in their own space we let them. But we try to make sure that they can't screw up the system for everyone else. We're not paranoid about it. We think our users are responsible people. Of course YMMD. -- If the errors of the past were good enough for our ancestors, they re good enough for us! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Anton Aylward wrote:
As for running fetchmail as a system daemon rather than a per user daemon, I think the current way of having ALL the scripts in /etc/fetchmailrc is wrong-headed. I think that the system daemon should spawn off child processes that read the per user ~/.fetchmail files and carry them out. That way the individual users can add and edit their own .fetchmail files and not compromise the system.
As I mentioned, most of the users are not particularly computer literate. They wouldn't have a clue about setting up .fetchmailrc. Since I am the one who has to maintain this, a single file is much better. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Anton Aylward wrote:
You could say its about 'delegation'. You could say its about 'risk management'.
Forgot to mention, many of the users (including my boss) are not that computer literate, so I have to keep things simple for them. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
James Knott said the following on 09/23/2011 04:59 PM:
Anton Aylward wrote:
You could say its about 'delegation'. You could say its about 'risk management'.
Forgot to mention, many of the users (including my boss) are not that computer literate, so I have to keep things simple for them.
That's OK. The ones who do use fetchmail are the sophisticated ones, they have mailboxes all over the place and consolidate; the 'dumb' ones just have the one mailbox -- If a better system is thine, impart it; if not, make use of mine. - Horace -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Anton Aylward wrote:
James Knott said the following on 09/23/2011 04:59 PM:
Anton Aylward wrote:
You could say its about 'delegation'. You could say its about 'risk management'.
Forgot to mention, many of the users (including my boss) are not that computer literate, so I have to keep things simple for them.
That's OK. The ones who do use fetchmail are the sophisticated ones, they have mailboxes all over the place and consolidate; the 'dumb' ones just have the one mailbox
The reason we're running IMAP is everyone has a Blackberry too and with POP, you have to worry about trying to keep the BB in sync with the computer mail. Also, with IMAP, the mail will be stored on the server, which means all the messages will be backed up as well. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
James Knott said the following on 09/23/2011 10:32 PM:
Also, with IMAP, the mail will be stored on the server, which means all the messages will be backed up as well.
Well, of course; but that applies whatever IMAP server you use. -- Farming looks mighty easy when your plow is a pencil, and you're a thousand miles from the corn field. Dwight D. Eisenhower, September 11, 1956 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday, 2011-09-23 at 15:54 -0400, Anton Aylward wrote:
And if each user ALREADY has their own .fetchmailrc (which they can edit, unlike the /etc/fetchmailrc) (and which if they buqqer-up, won't affect other users) then there's no need for a /etc/fetchmailrc.
Who calls fetchmail? Each usser? - -- Cheers, Carlos E. R. (from 11.4 x86_64 "Celadon" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAk59D/UACgkQtTMYHG2NR9V05ACfQDwt74by+0BPoTGx3PTKfFDr ITkAn32knYC2U0H1WMXEX7mid6kPpn4j =C8xp -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (4)
-
Anton Aylward
-
Carlos E. R.
-
Hans Witvliet
-
James Knott