• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 339
  • Last Modified:

Fetchmail always fetches all the mails instead of only new ones

The target mail server is on an NT system. The configured fetchmail when run always gets all the mails over and over again. Is there a configuration parameter that is being missed. The operating system is RedHat 8.0 and the system is runing on an Intel PC.
0
vkvisva
Asked:
vkvisva
3 Solutions
 
arvindCommented:
U need to use following option in fecthmail command.

-K, --nokeep
       (Keyword: nokeep) Delete  retrieved  messages  from
       the   remote   mailserver.    This   option  forces
       retrieved mail to be deleted.  It may be useful  if
       you  have  specified  a  default  of  keep  in your
       .fetchmailrc.  This option is forced on  with  ETRN
       and ODMR.

-F, --flush
       POP3/IMAP  only.  Delete old (previously retrieved)
       messages from the mailserver before retrieving  new
       messages.  This  option  does not work with ETRN or
       ODMR.  Warning: if your local MTA hangs and  fetch-
       mail  is  aborted, the next time you run fetchmail,
       it will delete mail that  was  never  delivered  to
       you.   What  you  probably want is the default set-
       ting: if you don't  specify  `-k',  then  fetchmail
       will automatically delete messages after successful
       delivery.


0
 
pjedmondCommented:
set postmaster "test@mydomain.co.uk"
set daemon 600
poll pop3.keme.net
        localdomains mydomain.co.uk
        proto pop3
        envelope "To:"
        qvirtual ""
        user "user"
        pass "pass"
        to * here
        smtpaddress "mydomain.co.uk"
        fetchall
        set syslog


Above is my /root/.fetchmailrc file to collect all mails correctly from a POP3 server and delever them to a local smtp server.

The above daemonised fetchmail is invoked with:
fetchmail -v -f /root/.fetchmailrc

Hope that helps:)

0
 
RahmathCommented:
You just create a file where ever you wish. here for example iam creating a file known as "kmr" in /tmp directory . in that file put the following entries
   poll mail.yahoo.com
        proto pop3
        user "siva"
        pass "vkvsiva"
        is siva
        fetchall

then run the command fetchmail -f /tmp/kmr

   Replace  the following on the file kmr.
            mail.yahoo.com --> your mailserver
            siva           --> your username
            vkvsiva        --> your password
            is siva        --> your username in the linux  machine
         
0
 
CleanupPingCommented:
vkvisva:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
TheWeakestLinkCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Split points between arvind and pjedmond and Rahmath
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheWeakestLink
EE Cleanup Volunteer
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now