Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FETCHMAIL CHECK INTERVALS??

Status
Not open for further replies.

jonnybb1

Technical User
Oct 25, 2000
89
0
0
US
I have setup fetchmail and have setup the mail boxes, but how do I set the check interval in fetmail? In Exchange you can set the pop3 connector to check every 15 minutes. any ideas?? I am using the latest linux 7.3 and using webmin as the configurator.

thanks

john@lantexco.com
 
Go to terminal & look for the .fetchmailrc in the root directory. Look for or add a 'set daemon 900' before the poll line.
Then as root start fetchmail, and leave it alone!
...the set daemon is how many seconds.
BTW - I use webmin & fetchmailconf and have to edit the 'poll mail.server.whatever'. So if your .fetchmailrc works now, be sure to save it as .fetchmail.sav so you can paste the rest back. I use pico to edit my .fetchmailrc after the bulk is configured with webmin. Works great!
'luck
Keith
PS: I'm still futzing with this. I need to know how to add fetchmail to auto start when I bounce my server. Currently I start server then type fetchmail. The rc file will work though, until you restart, then you have to goto console & type fetchmail.
 
Ok I got that setup, BUT I have a few more Q's.

How do I get this fetchmail to drop the differant names (i.e bob@lantexco.com, linux@lantexco.com, admin!lantexco.com...) to automatically drop into their respective local mailboxes? I can send locaslly without a hitch, but all inbound mail from fetchmail gets dumped into the postmaster (root) mailbox.

Also, do I have to run the fetchmail command everytime I reboot? In case of power failure or reboot, I would like it to bo automatic...

Any ideas??

Thanx a bunch!

john@lantexco.com
 
If you own lantexco.com domain, then you shouldn't have to use fetchmail to pop from isp server. The isp should have a mx that points strait to your mail server. Otherwise, I use sendmail at home & comcast doesn't deliver without fetchmail. So...
Setup the mailboxes in webmin, and you have the passwords, then you just add:
poll pop3.lantexco.com with proto POP3
user 'whoever1' there with password 'whatever1' is 'po_box1' here
user 'whoever2' there with password 'whatever2' is 'po_box2' here
user 'whoever3' there with password 'whatever3' is 'po_box3' here

Be sure of what the pop server at the isp is named. Also, the users can't change the passwords on pop3. If they have an account at lantexco.com, then they gotta trust you. Otherwise, you probably own the domain, so you can set up the po_box & password, then plug it in to their client, like outlook.
I'm still trying to find the ans to run the fetchmail command everytime I reboot. You don't have to reboot often, so I just start it from the term window, logout & forget about it.
Good luck - this linux is fun.
Keith
 
Ok, Sorry for the bad info. I have a webhost provider, so I am polling a pop3 account that has multiple aliases. So what I want is to send an email to *(anybody)@lantexco.com, then login using linux@lantexco.com & a password, and then have sendmail distibute the emails to the respective emial boxes. I have setup the email boxes both on the local and the webosting side. I cannot for the life of me get it!

John@lantexco.com
 
Hey John. Sounds like what I'm doing with my isp at home. I'm not sure why fetchmail isn't pulling mail for you. Somebody in this forum has the answer. Meanwhile, I wonder if you take a look in the \var\spool\mail directory will you see your mail users there?
A good thing to try is run fetchmailconf from an x session. This will allow you to actully fire off fetchmail & monitor its progress as if runs down the .fetchmailrc. Possibly you will see where it's bombing. Make a copy of your current \root\.fetchmailrc first. Let me know what happens here.
For testing, I use a yahoo mail account to send mail to my isp account. After I send a msg, I log back on to linux as root and type fetchmail. (Even tho it's already polling every 5 minutes, you can wake it up now if your impatient).
Good luck, I'll try to help if I can.
Keith
 
Ok, I have found the great fetchmailconf command and ran the setup process and can distribute the email.

When I enter fetchmail it checks and does the maildrop feature without a hitch, BUT when I run the following command it seems to go to sleep [fetchmail -d 600] (without the brackets. It does not recheck every 600 seconds (10 minutes). Any ideas??

Thanx a bunch!
john@lantexco.com
 
helo,

Don't know anything about fetchmail sorry, but if you want to run it at boot just chuck the command line in /etc/rc.local

This is run after all the other initialisation scripts and is probably the best way to do it. (unless someone tells me I'm incorrect :)

Hope this helps.
[smurf]
01101000011000010110010001110011
 
Congratulation on the success! I'm going to try hads suggestion about adding it to the rc.local tonight. The following is in my \root\.fetchmailrc:
# Configuration created Sun Jul 14 23:32:48 2002 by fetchmailconf
set postmaster "postmaster"
set bouncemail
set no spambounce
set properties ""
set daemon 900
poll pop3.comcast.net with proto POP3

All this is right before the 'user whoever...' lines. After you reboot your linux box, logon as root and in a terminal window type fetchmail. Then fetchmail will automatically run as a daemon and check (in my situation) every 900 seconds. I'm not sure what happens if fetchmail is already running as deamon & you run it again with the:fetchmail -d 600. Maybe you now have two processes running?
Anyway, once it's running as daemon, all you have to do is type fetchmail by itself (as root), & it will 'wake up' fetchmail to check for mail now. Then it will automatically fall back to checking every 900 seconds.
BTY, I use ssh (putty) from my win box to log into my linux box. This way I don't have to physically be at the linux console to test this stuff. You should check it out if you're not already using ssh.
Anyway, sounds like you're good to go!
Cya - Keith
 
Ok it seems there are two ways of running the flag commands, either in the .fetchmailrc file or at the shell prompt. I was playing around with both, and found the sweet spots:

# Configuration created Wed Sep 18 19:33:28 2002 by fetchmailconf
set syslog
set daemon 300
set postmaster "postmaster"
set bouncemail
set no spambounce
set properties ""
poll mail.abcxyz.com via mail.abcxyz.com
with proto POP3 interval 0 timeout 60
localdomains abcxyz.com
user 'USER1' there with password 'IaintThatSupid' is 'bob' 'webmaster' 'sales' 'info' 'mike' here
______________
I my case, when I ran the set commands as flags from the shell, the stupid fetchmail would go to sleep?! Maybe a bug, or my mixture of Hware & Sware. The drama is finally over. I hope the above posts helps other as much as they did me Thanx Keith!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top