[opensuse] Cron, where and how to start
Looking for a daily mailcheck on one of my accounts I am thinking of running cron. Read the man page of cron, crontab and are as ever after reading man pages, totally confused. Wiki was the second choice. Still confused. Is there a gui for cron? And how can I let Kmail check one mail client once a day? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Constant Brouerius van Nidek wrote:
Looking for a daily mailcheck on one of my accounts I am thinking of running cron. Read the man page of cron, crontab and are as ever after reading man pages, totally confused. Wiki was the second choice. Still confused. Is there a gui for cron? And how can I let Kmail check one mail client once a day?
I'm looking into cron lately myself, but haven't got it sorted out yet. There is kcron (and kcron4) in KDE. I beleive kcron is installed by default. I'm not sure, you may have to log in as root to get anything in kcron to work?? Jim -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Jim Flanagan wrote:
Constant Brouerius van Nidek wrote:
Looking for a daily mailcheck on one of my accounts I am thinking of running cron. Read the man page of cron, crontab and are as ever after reading man pages, totally confused. Wiki was the second choice. Still confused. Is there a gui for cron? And how can I let Kmail check one mail client once a day?
I'm looking into cron lately myself, but haven't got it sorted out yet. There is kcron (and kcron4) in KDE. I beleive kcron is installed by default. I'm not sure, you may have to log in as root to get anything in kcron to work??
In current distributions, cron is normally turned off for normal users. This is a security precaution. To allow non-root users to run cron jobs create a file /etc/cron.allow, containing the login name of the non-root accounts which you want to allow to run cron jobs. To understand cron, cd to /etc/crontabs and look around.
Jim
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon, Jun 16, 2008 at 8:07 AM, Constant Brouerius van Nidek
Looking for a daily mailcheck on one of my accounts I am thinking of running cron. Read the man page of cron, crontab and are as ever after reading man pages, totally confused. Wiki was the second choice. Still confused. Is there a gui for cron? And how can I let Kmail check one mail client once a day? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
There is more than one man page for crontab. The one you want is man 5 crontab The easiest way to set one of these up is kcron in kde but you can also do it with any text editor. A crontab file can be named anything, because the file is only used to as a backup and a source for installing your actual crontab. So I have a cron job that I want to run periodically to virus scan files in my home directory just in case a virus wanders in there or gets transferred from my windows machine. My crontab contains this line: 05 3 * * Tue,Fri /usr/bin/clamscan -r -i --exclude-dir=VirtualMachines --no-archive /home/jsa That says at 5 minutes after 3 am on Tuesdays and Fridays it should run the clamscan job. After carefully coding the above after reading man 5 crontab I save it to a file, in this case jsacrontab. Next I install it by reading man 1 crontab with a line like this: crontab jsacrontab Done. Now As for checking mail, if Kmail is up and running it can be set up to check the mail for any accounts on the schedule you set. The specific "once per day" thing is best set on the Accounts tab in Config Kmail. Check the box for "Checkmail on startup" and then enter 1440 in interval mail checking. Or there is fetchmail. Its another can of worms, but I think Yast has settings for it buried in the mail setup stuff. It will fetch mail on any schedule you want. -- ----------JSA--------- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon, Jun 16, 2008 at 10:18 AM, John Andersen
On Mon, Jun 16, 2008 at 8:07 AM, Constant Brouerius van Nidek
wrote: Looking for a daily mailcheck on one of my accounts I am thinking of running cron. Read the man page of cron, crontab and are as ever after reading man pages, totally confused. Wiki was the second choice. Still confused. Is there a gui for cron? And how can I let Kmail check one mail client once a day? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
There is more than one man page for crontab. The one you want is man 5 crontab
The easiest way to set one of these up is kcron in kde but you can also do it with any text editor.
A crontab file can be named anything, because the file is only used to as a backup and a source for installing your actual crontab.
So I have a cron job that I want to run periodically to virus scan files in my home directory just in case a virus wanders in there or gets transferred from my windows machine. My crontab contains this line:
05 3 * * Tue,Fri /usr/bin/clamscan -r -i --exclude-dir=VirtualMachines --no-archive /home/jsa
Note that the above is one long line that got wrapped by gmail. -- ----------JSA--------- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday 17 June 2008, John Andersen wrote:
On Mon, Jun 16, 2008 at 10:18 AM, John Andersen
wrote: On Mon, Jun 16, 2008 at 8:07 AM, Constant Brouerius van Nidek
wrote: Looking for a daily mailcheck on one of my accounts I am thinking of running cron. Read the man page of cron, crontab and are as ever after reading man pages, totally confused. Wiki was the second choice. Still confused. Is there a gui for cron? And how can I let Kmail check one mail client once a day? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
There is more than one man page for crontab. The one you want is man 5 crontab
The easiest way to set one of these up is kcron in kde but you can also do it with any text editor.
A crontab file can be named anything, because the file is only used to as a backup and a source for installing your actual crontab.
So I have a cron job that I want to run periodically to virus scan files in my home directory just in case a virus wanders in there or gets transferred from my windows machine. My crontab contains this line:
05 3 * * Tue,Fri /usr/bin/clamscan -r -i --exclude-dir=VirtualMachines --no-archive /home/jsa
Note that the above is one long line that got wrapped by gmail. -- ----------JSA--------- Thanks, that was a fast and clear instruction. Now first man 5 crontab ;)
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
John Andersen wrote:
On Mon, Jun 16, 2008 at 8:07 AM, Constant Brouerius van Nidek
wrote: Looking for a daily mailcheck on one of my accounts I am thinking of running cron. Read the man page of cron, crontab and are as ever after reading man pages, totally confused. Wiki was the second choice. Still confused. Is there a gui for cron? And how can I let Kmail check one mail client once a day? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
There is more than one man page for crontab. The one you want is man 5 crontab
Note also that if you do "man cron", you will see near the bottom of the cron man page that the section 5 manpage listed as a related reference under SEE ALSO.
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, 17 Jun 2008 07:21:04 Matt Archer wrote:
John Andersen wrote:
On Mon, Jun 16, 2008 at 8:07 AM, Constant Brouerius van Nidek
wrote: Looking for a daily mailcheck on one of my accounts I am thinking of running cron. Read the man page of cron, crontab and are as ever after reading man pages, totally confused. Wiki was the second choice. Still confused. Is there a gui for cron? And how can I let Kmail check one mail client once a day? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
There is more than one man page for crontab. The one you want is man 5 crontab
Note also that if you do "man cron", you will see near the bottom of the cron man page that the section 5 manpage listed as a related reference under SEE ALSO.
Hint: crontab -e will edit the crontab entries for the current user (using vi). If you are root then crontab -e will edit root's entries. If you are another user then only that user's entries will be shown. Similarly, crontab -l will list the cron jobs for the current user. -- =================================================== Rodney Baker VK5ZTV rodney.baker@iinet.net.au =================================================== Losing your drivers' license is just God's way of saying "BOOGA, BOOGA!"
That's right but you can do as root:
crontab -u <user> -e
to edit other user crontab.
On Mon, Jun 16, 2008 at 6:19 PM, Rodney Baker
On Tue, 17 Jun 2008 07:21:04 Matt Archer wrote:
John Andersen wrote:
On Mon, Jun 16, 2008 at 8:07 AM, Constant Brouerius van Nidek
wrote: Looking for a daily mailcheck on one of my accounts I am thinking of running cron. Read the man page of cron, crontab and are as ever after reading man pages, totally confused. Wiki was the second choice. Still confused. Is there a gui for cron? And how can I let Kmail check one mail client once a day? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
There is more than one man page for crontab. The one you want is man 5 crontab
Note also that if you do "man cron", you will see near the bottom of the cron man page that the section 5 manpage listed as a related reference under SEE ALSO.
Hint: crontab -e will edit the crontab entries for the current user (using vi). If you are root then crontab -e will edit root's entries. If you are another user then only that user's entries will be shown.
Similarly, crontab -l will list the cron jobs for the current user.
-- =================================================== Rodney Baker VK5ZTV rodney.baker@iinet.net.au ===================================================
Losing your drivers' license is just God's way of saying "BOOGA, BOOGA!"
-- obed.org.mx -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2008-06-17 at 08:49 +0930, Rodney Baker wrote:
Hint: crontab -e will edit the crontab entries for the current user (using vi). If you are root then crontab -e will edit root's entries. If you are another user then only that user's entries will be shown.
Similarly, crontab -l will list the cron jobs for the current user.
The editor used can be changed: EDITOR=/usr/bin/mcedit and then all utilities like the above, vigr, vipw, visudo... will use mcedit instead. ;-) - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFIVveltTMYHG2NR9URAqSNAKCAIvbYN08tgAF+9Bhn/yNg+62UeACfZlwf 3hjfAAk0bCFRHsZ+z/50GuI= =RqlT -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon, Jun 16, 2008 at 4:30 PM, Carlos E. R.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The Tuesday 2008-06-17 at 08:49 +0930, Rodney Baker wrote:
Hint: crontab -e will edit the crontab entries for the current user (using vi). If you are root then crontab -e will edit root's entries. If you are another user then only that user's entries will be shown.
Similarly, crontab -l will list the cron jobs for the current user.
The editor used can be changed:
EDITOR=/usr/bin/mcedit
and then all utilities like the above, vigr, vipw, visudo... will use mcedit instead.
But I never run it that way. I always use my favorite editor, edit a file and then load that file with "crontab filename". The files I create this way are portable (and my favorite editor is much easier to run than any listed above). Its just a preference I've developed over the years. -- ----------JSA--------- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 06/17/2008 07:30 AM, Carlos E. R. wrote:
The editor used can be changed:
EDITOR=/usr/bin/mcedit
and then all utilities like the above, vigr, vipw, visudo... will use mcedit instead. Where do you make this change? I would much prefer mcedit over most other CLI editors. -- Joe Morris Registered Linux user 231871 running openSUSE 10.3 x86_64
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2008-06-17 at 07:43 +0800, Joe Morris wrote:
On 06/17/2008 07:30 AM, Carlos E. R. wrote:
The editor used can be changed:
EDITOR=/usr/bin/mcedit
and then all utilities like the above, vigr, vipw, visudo... will use mcedit instead. Where do you make this change? I would much prefer mcedit over most other CLI editors.
nimrodel:~ # grep EDITOR .* .bashrc:#export EDITOR=/usr/bin/mcedit .bashrc:export EDITOR=/usr/bin/jstar Mr. root doesn't have a "profile". For joe user, I use ".profile". - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFIVwDgtTMYHG2NR9URAoNqAJsEHu0FXs7uAsTDZwuM3XSAcSVw+gCgix8Z N8P+QDjno2ZdBXyHzuBk2b4= =IZFv -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, 17 Jun 2008 09:00:43 Carlos E. R. wrote:
The Tuesday 2008-06-17 at 08:49 +0930, Rodney Baker wrote:
Hint: crontab -e will edit the crontab entries for the current user (using vi). If you are root then crontab -e will edit root's entries. If you are another user then only that user's entries will be shown.
Similarly, crontab -l will list the cron jobs for the current user.
The editor used can be changed:
EDITOR=/usr/bin/mcedit
and then all utilities like the above, vigr, vipw, visudo... will use mcedit instead.
;-)
-- Cheers, Carlos E. R.
But I'm one of those strange twisted people who like vi... ;-) -- =================================================== Rodney Baker VK5ZTV rodney.baker@iinet.net.au =================================================== "The bad reputation UNIX has gotten is totally undeserved, laid on by people who don't understand, who have not gotten in there and tried anything." -- Jim Joyce, owner of Jim Joyce's UNIX Bookstore
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2008-06-17 at 19:41 +0930, Rodney Baker wrote:
The editor used can be changed:
EDITOR=/usr/bin/mcedit
and then all utilities like the above, vigr, vipw, visudo... will use mcedit instead.
;-)
But I'm one of those strange twisted people who like vi... ;-)
Then keep the trick handy till the time comes the default changes to joe :-P - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFIV5OctTMYHG2NR9URArDpAJwKlf13iRH66IJcNQlINKgemjeFBQCfRW7N UsEwc+sqRuPhuNksQDsJBlU= =1tIN -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, 17 Jun 2008 20:06:10 Carlos E. R. wrote:
The Tuesday 2008-06-17 at 19:41 +0930, Rodney Baker wrote:
The editor used can be changed:
EDITOR=/usr/bin/mcedit
and then all utilities like the above, vigr, vipw, visudo... will use mcedit instead.
;-)
But I'm one of those strange twisted people who like vi... ;-)
Then keep the trick handy till the time comes the default changes to joe :-P
Good call. I'll do that. :-) -- =================================================== Rodney Baker VK5ZTV rodney.baker@iinet.net.au =================================================== What this country needs is a good five cent ANYTHING!
On Monday 16 June 2008 16:19, Rodney Baker wrote:
...
Hint: crontab -e will edit the crontab entries for the current user (using vi). If you are root then crontab -e will edit root's entries. If you are another user then only that user's entries will be shown.
Never fear: It will use the environment variable VISUAL, or if that's unset EDITOR. Only if those are not set to an editor program will you end up in Vim, should that not happen to be to your taste.
...
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Rodney Baker wrote:
On Tue, 17 Jun 2008 07:21:04 Matt Archer wrote:
John Andersen wrote:
On Mon, Jun 16, 2008 at 8:07 AM, Constant Brouerius van Nidek
wrote: Looking for a daily mailcheck on one of my accounts I am thinking of running cron. Read the man page of cron, crontab and are as ever after reading man pages, totally confused. Wiki was the second choice. Still confused. Is there a gui for cron? And how can I let Kmail check one mail client once a day?
<snip> Nobody seems to want to tell you about the gui for cron. Actually, it's for crontab. cron is the daemon and you don't need to touch that. You communicate with cron via crontab, which is geek-speak for cron table. There's at least two GUIs for crontab, one for KDE and one for Gnome. The one for KDE is vastly superior. Its name is KCron. Assuming you're running OpenSuSE, KCron should be in your original distribution. Install it if necessary. The icon for KCron should appear in the System section of your applications menu. The icon is labeled "KCron" and its description is "Task Scheduler". I find it virtually self-explanatory. Good luck. Don Henson -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday 17 June 2008, Donald D Henson wrote:
Rodney Baker wrote:
On Tue, 17 Jun 2008 07:21:04 Matt Archer wrote:
John Andersen wrote:
On Mon, Jun 16, 2008 at 8:07 AM, Constant Brouerius van Nidek
wrote: Looking for a daily mailcheck on one of my accounts I am thinking of running cron. Read the man page of cron, crontab and are as ever after reading man pages, totally confused. Wiki was the second choice. Still confused. Is there a gui for cron? And how can I let Kmail check one mail client once a day?
<snip>
Nobody seems to want to tell you about the gui for cron. Actually, it's for crontab. cron is the daemon and you don't need to touch that. You communicate with cron via crontab, which is geek-speak for cron table. There's at least two GUIs for crontab, one for KDE and one for Gnome. The one for KDE is vastly superior. Its name is KCron. Assuming you're running OpenSuSE, KCron should be in your original distribution. Install it if necessary. The icon for KCron should appear in the System section of your applications menu. The icon is labeled "KCron" and its description is "Task Scheduler". I find it virtually self-explanatory. Good luck.
Thanks Don< KDE is the Desktop, Kcron it will be. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2008-06-16 at 22:07 +0700, Constant Brouerius van Nidek wrote:
Looking for a daily mailcheck on one of my accounts I am thinking of running cron. Read the man page of cron, crontab and are as ever after reading man pages, totally confused. Wiki was the second choice. Still confused. Is there a gui for cron? And how can I let Kmail check one mail client once a day?
It is very simple really. But notice you can not start kmail from cron: in fact, you can not run any graphic program from cron, because it has no-where to display. Cron tasks usually send you an email with the output, or write to a file, or something like that. You can not interact with them, they don't display anything. If you really want to fetch mail from cron, you have to use "fetchmail" instead of kmail. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFIVsPqtTMYHG2NR9URAlBQAJ91HDxPoAaHwL8X/5PSMt3r/sAo7ACeIoTW TzHVPgDU9C/6bdnrrnYmKHc= =zOpI -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday 17 June 2008, Carlos E. R. wrote:
The Monday 2008-06-16 at 22:07 +0700, Constant Brouerius van Nidek wrote:
Looking for a daily mailcheck on one of my accounts I am thinking of running cron. Read the man page of cron, crontab and are as ever after reading man pages, totally confused. Wiki was the second choice. Still confused. Is there a gui for cron? And how can I let Kmail check one mail client once a day?
It is very simple really.
But notice you can not start kmail from cron: in fact, you can not run any graphic program from cron, because it has no-where to display. Cron tasks usually send you an email with the output, or write to a file, or something like that. You can not interact with them, they don't display anything.
If you really want to fetch mail from cron, you have to use "fetchmail" instead of kmail.
Dear Carlos and others, Learned a lot about cron. Carlos mentioned that Kmail would not be a good candidate for cron which I was already afraid of. Fetchmail would be the way to go. No man or info pages though. Worked longtime ago with fetchmail but do not remember exactly how to set it up. Remember vaguely that part or all could be done in Yast. Is it possible to only get fetchmail working on one special address? The address gonda.bvn@google.com should be emptied once a day at 3:00 o'clock local time. With the info already there I think that most of the input can be handled by me. Its now only the particular fetchmail command that I am looking for. Or should i use fdm. Looks simpler. Anybody experience? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, 17 Jun 2008 20:39:40 Constant Brouerius van Nidek wrote: [...]
Dear Carlos and others, Learned a lot about cron. Carlos mentioned that Kmail would not be a good candidate for cron which I was already afraid of. Fetchmail would be the way to go. No man or info pages though. Worked longtime ago with fetchmail but do not remember exactly how to set it up. Remember vaguely that part or all could be done in Yast. Is it possible to only get fetchmail working on one special address? The address gonda.bvn@google.com should be emptied once a day at 3:00 o'clock local time. With the info already there I think that most of the input can be handled by me. Its now only the particular fetchmail command that I am looking for. Or should i use fdm. Looks simpler. Anybody experience?
Fetchmail does not require cron. First, make sure fetchmail is installed. The fetchmail checking interval is set in /etc/sysconfig/fetchmail (FETCHMAIL_POLLING_INTERVAL). You then need to edit /etc/fetchmailrc. If you're only polling for mail for a single user then it will only need 1 line: poll "mailserver.isp.domain" proto POP3 user "my_user_name" with pass "my_password" is "my_local_system_username" here forcecr smtpaddress localhost Note - that is all one long line wordwrapped by kmail. Bear in mind that the password for your pop3 account is stored in this file in plain text which may or may not be a security issue for you. On my system the file is owned by the fetchmail user (i.e. the owner is fetchmail) and the group is root the permissions are 0600. Make sure the fetchmail service is set to automatically start on boot (use YaST's runlevel editor) and you should be good to go. One caveat - as soon as you start the service it will poll for your mail and then recheck every FETCHMAIL_POLLING_INTERVAL after that, so if you only want it to run at 3am then you'll need to start the service at 3am and set the polling interval to 86400 (it is set in seconds). Note that fetchmail will deliver the mail to your local mailbox in /var/spool/mail so you'll then need to configure procmail or some other local mail delivery agent to deliver it to your mbox or Maildir store. I use procmail to run each incoming mail through spamassassin and also do some filtering into different mail folders under ~/Maildir. Hope this helps. Rodney. -- =================================================== Rodney Baker VK5ZTV rodney.baker@iinet.net.au =================================================== If God had intended Man to Walk, He would have given him Feet.
* Rodney Baker
Note that fetchmail will deliver the mail to your local mailbox in /var/spool/mail so you'll then need to configure procmail or some other local mail delivery agent to deliver it to your mbox or Maildir store.
add following to the 'single' fetchmail hand off to procmail for local delivery: mda '/usr/lib/sendmail -i -oem -f %F %T'
I use procmail to run each incoming mail through spamassassin and also do some filtering into different mail folders under ~/Maildir.
definitely :^) -- Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://counter.li.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
* Patrick Shanahan
add following to the 'single' fetchmail hand off to procmail for local delivery: mda '/usr/lib/sendmail -i -oem -f %F %T'
doh, shouldbe add following to the 'single' line in fetchmailrc to make fetchmail hand off to procmail for local delivery: mda '/usr/lib/sendmail -i -oem -f %F %T' -- Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://counter.li.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2008-06-17 at 20:58 +0930, Rodney Baker wrote:
Note that fetchmail will deliver the mail to your local mailbox in /var/spool/mail so you'll then need to configure procmail or some other local mail delivery agent to deliver it to your mbox or Maildir store. I use procmail to run each incoming mail through spamassassin and also do some filtering into different mail folders under ~/Maildir.
I think you can tell Kmail to get its mail from there. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFIWA8rtTMYHG2NR9URAlsaAJ9Sbs0DCX84+inqGFpp91q9BlvL2QCeNbnC DTetEcEdymTcRihy0q1+7dA= =m9Hp -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2008-06-17 at 18:09 +0700, Constant Brouerius van Nidek wrote:
Dear Carlos and others, Learned a lot about cron. Carlos mentioned that Kmail would not be a good candidate for cron which I was already afraid of. Fetchmail would be the way to go. No man or info pages though. Worked longtime ago with fetchmail but do not remember exactly how to set it up. Remember vaguely that part or all could be done in Yast. Is it possible to only get fetchmail working on one special address? The address gonda.bvn@google.com should be emptied once a day at 3:00 o'clock local time. With the info already there I think that most of the input can be handled by me. Its now only the particular fetchmail command that I am looking for. Or should i use fdm. Looks simpler. Anybody experience?
Of course it has man pages. Try "man fetchmail". The syntax is very simple: Create a file named ".fetchmailrc" under any user you choose (better not root). Like this: set postmaster "YOUR_USER" set nobouncemail set no spambounce set properties "" set syslog poll pop.gmail.com with proto pop3 timeout 90, and tracepolls user REMOTE_USER@gmail.com, with password SERVERPASSWORD, is YOUR_USER here, and ssl fetchall Or, if the server has imap: poll imap.gmail.com proto imap timeout 90, and tracepolls user REMOTE_USER@gmail.com, with password SERVERPASSWORD, is YOUR_USER here, and ssl fetchall That's all to it. Try running "fetchmail -v" on an xterm of that user. For testing, add the keyword "keep" on the second line (after fetchall), so that email is not deleted from the server yet. Fetchmail gets the email, sends it to your local postfix (to user YOUR_USER), and that will deliver it, typically though procmail for sorting. Once that' running, set up cron: 05 03 * * * /usr/bin/fetchmail -v Done. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFIV6SWtTMYHG2NR9URAvRTAJwI1fU9LXjcRMeDiqYeWCc1Uc+TIQCfY2xa aeRPNqEQ3amupQUD6jOvkzw= =/9AM -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
* Carlos E. R.
That's all to it. Try running "fetchmail -v" on an xterm of that user. For testing, add the keyword "keep" on the second line (after fetchall), so that email is not deleted from the server yet.
Fetchmail gets the email, sends it to your local postfix (to user YOUR_USER), and that will deliver it, typically though procmail for sorting.
Once that' running, set up cron:
05 03 * * * /usr/bin/fetchmail -v
and then there is "fetchmailconf", a tlc script which may be of some assistance in setting up and checking configuration of fetchmail :^) -- Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://counter.li.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, Jun 17, 2008 at 4:48 AM, Carlos E. R.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The Tuesday 2008-06-17 at 18:09 +0700, Constant Brouerius van Nidek wrote:
Dear Carlos and others, Learned a lot about cron. Carlos mentioned that Kmail would not be a good candidate for cron which I was already afraid of. Fetchmail would be the way to go. No man or info pages though. Worked longtime ago with fetchmail but do not remember exactly how to set it up. Remember vaguely that part or all could be done in Yast. Is it possible to only get fetchmail working on one special address? The address gonda.bvn@google.com should be emptied once a day at 3:00 o'clock local time. With the info already there I think that most of the input can be handled by me. Its now only the particular fetchmail command that I am looking for. Or should i use fdm. Looks simpler. Anybody experience?
Of course it has man pages. Try "man fetchmail".
The syntax is very simple:
Create a file named ".fetchmailrc" under any user you choose (better not root). Like this:
set postmaster "YOUR_USER" set nobouncemail set no spambounce set properties "" set syslog
poll pop.gmail.com with proto pop3 timeout 90, and tracepolls user REMOTE_USER@gmail.com, with password SERVERPASSWORD, is YOUR_USER here, and ssl fetchall
Or, if the server has imap:
poll imap.gmail.com proto imap timeout 90, and tracepolls user REMOTE_USER@gmail.com, with password SERVERPASSWORD, is YOUR_USER here, and ssl fetchall
That's all to it. Try running "fetchmail -v" on an xterm of that user. For testing, add the keyword "keep" on the second line (after fetchall), so that email is not deleted from the server yet.
Fetchmail gets the email, sends it to your local postfix (to user YOUR_USER), and that will deliver it, typically though procmail for sorting.
Once that' running, set up cron:
05 03 * * * /usr/bin/fetchmail -v
Done.
Yup, that's the way I used to do it. Now I just let Yast set it up. You DID know that its integrated into Yast now, right Carlos? -- ----------JSA--------- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2008-06-17 at 09:16 -0700, John Andersen wrote:
Yup, that's the way I used to do it. Now I just let Yast set it up.
You DID know that its integrated into Yast now, right Carlos?
I do, but I do not use it. Not for specialized uses, like "I want to check once at 3 AM every day". Now, if he said "I want to check periodically", that would be different ;-) And it has a problem. Fetchmail recommends not using it under root, and the yast setup uses root precisely. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFIWA63tTMYHG2NR9URAjpCAJ9kwaZzIqiKOHk2VHIxw9obYH2hpwCcCIAo fFbEvEu4nYWWBMa0pyJdo4k= =iPiL -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 06/18/2008 03:21 AM, Carlos E. R. wrote:
I do, but I do not use it. Not for specialized uses, like "I want to check once at 3 AM every day". Now, if he said "I want to check periodically", that would be different ;-)
True, as Yast runs it as a daemon, so it would always be running, according to the startup command (which gives it the time interval it "wakes and sleeps".
And it has a problem. Fetchmail recommends not using it under root, and the yast setup uses root precisely.
Not for a while. It runs now by default as a fetchmail user and daemon group. -- Joe Morris Registered Linux user 231871 running openSUSE 10.3 x86_64 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Carlos E. R. wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The Monday 2008-06-16 at 22:07 +0700, Constant Brouerius van Nidek wrote:
Looking for a daily mailcheck on one of my accounts I am thinking of running cron. Read the man page of cron, crontab and are as ever after reading man pages, totally confused. Wiki was the second choice. Still confused. Is there a gui for cron? And how can I let Kmail check one mail client once a day?
It is very simple really.
But notice you can not start kmail from cron: in fact, you can not run any graphic program from cron, because it has no-where to display. Cron tasks usually send you an email with the output, or write to a file, or something like that. You can not interact with them, they don't display anything.
DISPLAY=:0.0 && command_here But that doesn't really address his ACTUAL problem
If you really want to fetch mail from cron, you have to use "fetchmail" instead of kmail.
Yes, this is the solution to his problem. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2008-06-17 at 12:29 -0400, Matt Archer wrote:
But notice you can not start kmail from cron: in fact, you can not run any graphic program from cron, because it has no-where to display. Cron tasks usually send you an email with the output, or write to a file, or something like that. You can not interact with them, they don't display anything.
DISPLAY=:0.0 && command_here
Mmmm! Interesting. Unless the current user is not the one of the cron job. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFIWA98tTMYHG2NR9URAt1RAKCAc6NRHY3AETH3/8cfRFiobTZAxACfT7nE 6bXRmEuULUPgAaS0q3RUngQ= =HHaO -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Monday 16 June 2008 09:07:51 am Constant Brouerius van Nidek wrote:
Looking for a daily mailcheck on one of my accounts I am thinking of running cron. Read the man page of cron, crontab and are as ever after reading man pages, totally confused. Wiki was the second choice. Still confused. Is there a gui for cron? And how can I let Kmail check one mail client once a day?
By now you have cron figured out, so make a cron job to run this command at
the desired time:
dcop kmail KMailIface checkAccount
On Tue, Jun 17, 2008 at 7:19 PM, Jim Barnes
On Monday 16 June 2008 09:07:51 am Constant Brouerius van Nidek wrote:
Looking for a daily mailcheck on one of my accounts I am thinking of running cron. Read the man page of cron, crontab and are as ever after reading man pages, totally confused. Wiki was the second choice. Still confused. Is there a gui for cron? And how can I let Kmail check one mail client once a day?
By now you have cron figured out, so make a cron job to run this command at the desired time: dcop kmail KMailIface checkAccount
See http://www.ibm.com/developerworks/linux/library/l-dcop/ for a good overview of dcop, and of course man dcop
-- Jim Barnes
How in the hell did you find that documentation? It doesn't even appear on the KDE site. -- ----------JSA--------- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wednesday 18 June 2008 01:51:17 am John Andersen wrote:
See http://www.ibm.com/developerworks/linux/library/l-dcop/ for a good overview of dcop, and of course man dcop
-- Jim Barnes
How in the hell did you find that documentation? It doesn't even appear on the KDE site.
Must have been a google search last November as I recall. dcop can even be used across a network to control KDE and KDE applications. -- Jim Barnes -- Certainly the game is rigged. Don't let that stop you; if you don't bet, you can't win. -Lazarus Long -- Linux 2.6.22.17-0.1-default -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wednesday 18 June 2008 07:58, jim barnes wrote:
On Wednesday 18 June 2008 01:51:17 am John Andersen wrote:
See http://www.ibm.com/developerworks/linux/library/l-dcop/ for a good overview of dcop, and of course man dcop
-- Jim Barnes
How in the hell did you find that documentation? It doesn't even appear on the KDE site.
Must have been a google search last November as I recall. dcop can even be used across a network to control KDE and KDE applications.
Do you know how authentication works in that case? A while back I asked if there was a way to let DCOP accept requests from a different UID on the same machine. The only answer I got was "that's a security risk." It seems that if DCOP will accept requests from different machines, it must have an authentication mechanism to prevent unwanted access and that mechanism must be configurable. Do you know what it is and how to configure it?
-- Jim Barnes
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wednesday 18 June 2008 09:16:57 am Randall R Schulz wrote:
Must have been a google search last November as I recall. dcop can even be used across a network to control KDE and KDE applications.
Do you know how authentication works in that case?
A while back I asked if there was a way to let DCOP accept requests from a different UID on the same machine. The only answer I got was "that's a security risk."
It seems that if DCOP will accept requests from different machines, it must have an authentication mechanism to prevent unwanted access and that mechanism must be configurable. Do you know what it is and how to configure it?
I let ssh handle the security, as in: jbarnes@m6n:~> ssh jbarnes@shuttle dcop --user jbarnes kmail KMailIface\ checkAccount venir This also works: jbarnes@m6n:~> ssh root@shuttle dcop --user jbarnes kmail KMailIface\ checkAccount venir But this won't, as would be expected: guest@m6n:~> dcop --user jbarnes kmail KMailIface checkAccount venir WARNING: ICE authority file /home/jbarnes/.ICEauthorityis not readable by you! Please check permissions or set the $ICEAUTHORITY variable manually before calling dcop. DCOPClient::attachInternal. Attach failed Could not open network socket DCOPClient::attachInternal. Attach failed Could not open network socket ERROR: Couldn't attach to DCOP server! But all that may be moot, as KDE apparently is moving to d-bus instead of dcop in KDE 4.x See here: http://www.kdedevelopers.org/node/2058 HTH, -- Jim Barnes -- Certainly the game is rigged. Don't let that stop you; if you don't bet, you can't win. -Lazarus Long -- Linux 2.6.22.17-0.1-default -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wednesday 18 June 2008 11:09, jim barnes wrote:
On Wednesday 18 June 2008 09:16:57 am Randall R Schulz wrote:
Must have been a google search last November as I recall. dcop can even be used across a network to control KDE and KDE applications.
Do you know how authentication works in that case?
...
It seems that if DCOP will accept requests from different machines, it must have an authentication mechanism to prevent unwanted access and that mechanism must be configurable. Do you know what it is and how to configure it?
I let ssh handle the security, as in: jbarnes@m6n:~> ssh jbarnes@shuttle dcop --user jbarnes kmail KMailIface\ checkAccount venir
...
But all that may be moot, as KDE apparently is moving to d-bus instead of dcop in KDE 4.x
See here: http://www.kdedevelopers.org/node/2058
HTH,
Thanks.
-- Jim Barnes
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Constant Brouerius van Nidek wrote:
Looking for a daily mailcheck on one of my accounts I am thinking of running cron. Read the man page of cron, crontab and are as ever after reading man pages, totally confused. Wiki was the second choice. Still confused. Is there a gui for cron? And how can I let Kmail check one mail client once a day?
What you really want is fetchmail. It is available on your opensuse disc. Take a look at http://www.catb.org/~esr/fetchmail/fetchmail-man.html. You can set the check interval in fetchmail and not have to worry about cron. Although cron is quite simple and useful. -- David C. Rankin, J.D., P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (14)
-
Carlos E. R.
-
Constant Brouerius van Nidek
-
David C. Rankin
-
Donald D Henson
-
jim barnes
-
Jim Barnes
-
Jim Flanagan
-
Joe Morris
-
John Andersen
-
Matt Archer
-
obed
-
Patrick Shanahan
-
Randall R Schulz
-
Rodney Baker