Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 44

Thread: [SOLVED] Fetchmail from other servers (aka account aggregation)

  1. #31
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Quote Originally Posted by rungsan
    I have tested with Sun JES Messaging by following fetchmail config.

    poll mail.oldmail.com port 143 protocol IMAP user user1@oldmail.com password 'password' smtpname user1@newmail.com folder "Sent" fetchall keep

    The result is all messages in Sent folder are fetched to Inbox in newmail and Received date are changed to curent time. How can I migrate Sent to Sent not to Inbox and not change received date?
    You need to use imapsync to migrate mail and keep the original dates, do a search of the fourms and wiki for information on how to use imapsync.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  2. #32
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    12

    Default imapsync should work better for you...

    You'll probably want to use imapsync instead. Search the forums for details!
    Bugzilla - Wiki - Downloads - Before posting... Search!

  3. #33
    Join Date
    May 2007
    Posts
    2
    Rep Power
    8

    Default Fetchmail and Zimbra Received Date

    Hi all - I didn't want to make a new thread, so I resurrected this one.

    I've got zimbra (4.5.5) running fine on Ubuntu Server 6.06lts, and I'm using fetchmail to aggregate my multiple mail accounts, setup through webmin.

    My question is this, regarding the web interface: everything seems to be working properly, except Zimbra is reporting messages as being received when fetchmail polls the mail servers, not the original time the message was sent. Now, the original time the message was sent is still in the header, and it is listed in the reading pane "sent by" field. However, in the list of messages itself, in the "Received" field, the time and dates are shown as the time of fetchmail polling (in my case, every 15 minutes) and not the original send time.

    Now the real oddity - I ran zimbra in a test setup under Ubuntu Desktop 6.10 for about a month and I didn't notice this happening. As a matter of fact, I'm fairly certain the list of messages was showing the original send date as found in the header.

    Any ideas? I understand Zimbra's MTA is receiving the mail at the time fetchmail is polling - and hence that's when the message is actually "being received" by Zimbra - but I swear this wasn't the functionality in my test.

    Thanks!
    Last edited by javamon; 06-14-2007 at 06:31 AM.

  4. #34
    Join Date
    May 2009
    Posts
    1
    Rep Power
    6

    Default fectchmail not required in Zimbra

    Logic of fetchmail is taken care by zimbra, i guess cause in particular accounts preferences , there is way of combining internal and external acount, so it solves the purpose of fetchmail

    Thanks zimbra

  5. #35
    Join Date
    Apr 2009
    Location
    Zimbabwe
    Posts
    27
    Rep Power
    6

    Default Fetchmail Script OK

    Quote Originally Posted by marcmac View Post
    NOTE: this should all happen on an MTA server, or the deliveries will fail (eg, server should be running the mta service)

    I've attached a fetchmail config creation script to this post - remove the .txt extension, make it executable, and you can use this for account aggregation.

    (All of this can be done as the zimbra user)

    Here how it works - you use it to configure fetchmail to grab a number of external accounts, and deliver them to a local account:

    Code:
    zmfetchercfg -a -u account@remote.domain.com -H remote.server.com:993 -l account@zimbra.local.com -p 'remote_pass' -s -P IMAP -f "Inbox" -k -c /opt/zimbra/conf/my_fetchrc
    
    zmfetchercfg -a -u account@remote.domain.com -H remote.server.com:993 -l account@zimbra.local.com -p 'remote_pass' -s -P IMAP -f "Work/Other folder" -k -c /opt/zimbra/conf/my_fetchrc
    
    zmfetchercfg -a -u gmail.user@gmail.com -H pop.gmail.com:995 -l other_account@zimbra.local.com -p 'remote_gmail_pass' -s -P POP3 -k -c /opt/zimbra/conf/my_fetchrc
    
    chmod 710 /opt/zimbra/conf/my_fetchrc
    This sets up 3 accounts - 2 IMAP from the same server (different folders) and a pop account from gmail (delivered to a different local user). The -k tells it to leave the mail on the server. Also, all of my accounts use SSL to connect - the '-s' flag. If you don't need that, you can omit it (but you'll probably have to change the ports, too).

    To test it out
    Code:
    HOME=/some/dir/I/can/write/to fetchmail -v -c -f /opt/zimbra/conf/my_fetchrc
    If everything looks good, remove the '-c' and it will really grab the mail.

    Things to be careful about: the local account (-l option) needs to exist, or you'll bounce all your mail, which is bad.

    Adding the -d option to the fetchmail call will cause this to run as a daemon, and periodically check your mail.

    The folder options apply to the remote account, NOT the local account - if you want to control where it gets delivered, set up a filter.


    OTHER STUFF:
    Yes, this is horribly insecure. Yes, you're going to be storing your email passwords on disk in an easily readable format. This is more intended for the home/hobby user, not for any serious enterprise deployment.
    i managed to follow all that you said and it worked fine, i am now left with 1 Question, the my fetchmail script is taking emails from pop.gmail.com (POP3) so when i log into the gmail.com account via the web, im seing that the emails are still in my gmail account although i have managed to fetch them to my local email-server. isnt there a way where by they are automatically deleted from Gmail so that I dont have to visit gmail to delete them afterwards?

    regards
    buggz

  6. #36
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    Change the lower case to upper case and it will remove the emails from the remote server. A quick search for fetchmail, via any reputable engine, would have found that

  7. #37
    Join Date
    Apr 2009
    Location
    Zimbabwe
    Posts
    27
    Rep Power
    6

    Default

    Quote Originally Posted by uxbod View Post
    Change the lower case to upper case and it will remove the emails from the remote server. A quick search for fetchmail, via any reputable engine, would have found that
    i have tried to Put the Capital F for flush, but its not working

    if i say vi /opt/zimbra/conf/my_fetchrc i get, poll pop.gmail.com port 995 protocol POP3 plugin "openssl s_client -quiet -connect pop.gmail.com:995" user myaccount@gmail.com password 'mypassword' smtpname bonnie@bbszw.com keep

    i see that automatically a keep is put at the bottom, so i had tried to remove it and put a flush there but stil the emails keep remaining in my gmail account,

    fetchmail -d 900 -F -v -f /opt/zimbra/conf/my_fetchrc is this the correct way of doing it? i need it to run as a Daemon underground after every 15 minutes but deleting the mails from my gmail account


    regards

    buggz

  8. #38
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    Put it in the fetchrc file as I think that over writes the command line.

  9. #39
    Join Date
    Apr 2009
    Location
    Zimbabwe
    Posts
    27
    Rep Power
    6

    Default maybe gmail has a problem

    you know i have tried to use "flush" or "nokeep" via webmin, but still mesages are remaining in my gmail account, i think its a gmail problem, not the fetchmail script dont you think so?


    buggz

  10. #40
    Join Date
    Aug 2013
    Posts
    2
    Rep Power
    2

    Default

    Hi all,
    Today, I found this thread. I'm downloaded 2 files config above
    - The file zmfetchercfg.txt I changed to zmfetchercfg.conf and copy to /opt/zimbra/conf/
    - The file my_fetchrc copy to /opt/zimbra/conf/
    But when i run command
    fetchmail -v -c -f /opt/zimbra/conf/my_fetchrc
    I saw an error
    fetchmail:/opt/zimbra/conf/my_fetchrc:1: syntax error at zmfetchercfg
    What is wrong in my config. I'm running CentOS 64bit version 6 and Zimbra 8.0.4
    Please help me. Thank you.
    Last edited by trannghia86; 08-26-2013 at 02:12 AM.

Similar Threads

  1. One account not receving email
    By EnglishDude in forum Administrators
    Replies: 12
    Last Post: 04-30-2010, 06:19 AM
  2. fetchmail: SMTP< 250 Ok: queued as
    By daly1 in forum Installation
    Replies: 4
    Last Post: 08-04-2006, 04:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •