LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-10-2009, 08:17 AM   #1
elvisious
Member
 
Registered: Sep 2003
Distribution: Debian 5.0
Posts: 45

Rep: Reputation: 15
Question Howto run fetchmail twice with different options....


Hi,

I want to run fetchmail for several different e-mail accounts. At some of the accounts fetchmail doesn't have to leave a copy on the server. This is easy to do, because it's the standard.

But for the other accounts I want fetchmail to leave a copy on the server. I tried this:

Code:
fetchmail --fetchmailrc /etc/fetchmailrc -d 30
fetchmail --fetchmailrc /home/user/.fetchmailrc -d 30 -k
The -k option should do the trick but it doesn't. The problem is this:

Code:
fetchmail: can't accept options while a background fetchmail is running.
Is there a way to do this in the fetchmailrc files?
That would be the solution I guess....

Greetz
FrankY
 
Old 11-10-2009, 08:41 AM   #2
elvisious
Member
 
Registered: Sep 2003
Distribution: Debian 5.0
Posts: 45

Original Poster
Rep: Reputation: 15
I already found the answer. This is a line in the fetchmailrc:

Code:
poll server.nl with proto pop3:
user "user@domain.nl",     with password "pass",       is user here keep
the option 'keep' does the trick
 
Old 11-10-2009, 08:44 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,073

Rep: Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971
Hi,

You can create 2 different cronjobs with the 2 commands you've posted, each one running in turn every 5 minutes for example.

***EDIT***
Never mind as you've found a solution yourself.
 
Old 11-10-2009, 08:45 AM   #4
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by elvisious View Post
Hi,

I want to run fetchmail for several different e-mail accounts. At some of the accounts fetchmail doesn't have to leave a copy on the server. This is easy to do, because it's the standard.

But for the other accounts I want fetchmail to leave a copy on the server. I tried this:

Code:
fetchmail --fetchmailrc /etc/fetchmailrc -d 30
fetchmail --fetchmailrc /home/user/.fetchmailrc -d 30 -k
The -k option should do the trick but it doesn't. The problem is this:

Code:
fetchmail: can't accept options while a background fetchmail is running.
Is there a way to do this in the fetchmailrc files?
That would be the solution I guess....

Greetz
FrankY
best way would be to create a .fetchmailrc for each account and then run fetchmail as a daemon
so the keep option must be in the fetchmailrc file.


for an example, see

Code:
https://calomel.org/fetchmailrc.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Run Command Options in KDE Menu Editor Raymond C. Glassford Mandriva 2 11-19-2008 09:24 AM
Gentoo emerge howto do ./configure --options-stuff via portage humbletech99 Linux - Distributions 7 05-08-2008 05:06 AM
gtk appl to run in firefox on other host -- options? glaubstas Linux - Software 3 07-22-2007 08:11 AM
fetchmail ignoring options beniwtv Linux - Server 2 07-04-2007 02:26 AM
Howto change boot-up options to launch KDE or gnome? flipwils11 Linux - Software 3 01-13-2005 11:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration