Page 1 of 5 123 ... LastLast
Results 1 to 10 of 44

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

  1. #1
    marcmac is offline Expert Member
    Join Date
    Sep 2005
    Posts
    2,103
    Rep Power
    13

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

    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.
    Attached Files Attached Files
    Last edited by marcmac; 01-25-2006 at 05:19 PM.

  2. #2
    timothyp is offline Member
    Join Date
    Mar 2006
    Posts
    12
    Rep Power
    9

    Default Why can't we just use fetchmail?

    Hi,

    I'm not sure yet how zimbra stores its mails,
    but can't we just use the normal fetchmail tool
    and make procmail drop the mail somewhere.
    Because, currently, a lot of filtering is done with procmail on our systems
    for mail fetched from other servers.

  3. #3
    KevinH's Avatar
    KevinH is offline Expert Member
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    18

    Default

    You need to deliver via LMTP or SMTP. If you can do that then you can use your current setup.
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  4. #4
    zzzzsg is offline Senior Member
    Join Date
    Nov 2005
    Posts
    73
    Rep Power
    9

    Default

    Hi marcmac

    I'm a newbie, and don't quite understand your post.

    Do you mean that your fetchmail script will import mails from other non-Zimbra mail servers (imap and pop3) into Zimbra mailboxes?

    I want to use zimbra as a webmail (like squirrelmail) for other non-Zimbra imap servers, instead of migrating the mails from the non-Zimbra servers to the Zimbra server- but I don't think this can be done, right? Maybe your script is a solution to my problem?

    Thank you very much in anticipation.

    gui
    Last edited by zzzzsg; 04-16-2006 at 12:55 PM.

  5. #5
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,201
    Rep Power
    56

    Default

    Yes, fetchmail gets mail from other servers and downloads them to the Zimbra server. It's used for getting mail that's in, let's say, your ISPs mailserver.

    You can't use zimbra as a front-end to other mail servers as it's meant to be a complete mail/groupware solution and runs it's own postfix instance.

    What you can do is migrate all your mail using something like imapsync, have a search of the forums and see how it's been done by others.
    Last edited by phoenix; 04-16-2006 at 01:12 PM.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  6. #6
    zzzzsg is offline Senior Member
    Join Date
    Nov 2005
    Posts
    73
    Rep Power
    9

    Default

    Thanks, Bill.

    Yes, I've used imapsync to import mailboxes from one imap server to another.

    Although Zimbra is not built to be like web front-end like Squirrelmail, can we use this fetchmail script to import mails from other imap servers into Zimbra server whenever an user logs on to Zimbra? In this way, Zimbra is like a front-end although the mails will be imported into its database. Will it take a long time?

    Zimbra is fantastic but seems kind of slow, and requires a more powerful server than the one we have now. That's why I'm thinking of Zimbra as a 'front-end' (even if it is via fetchmail) for my sendmail/imap-uw mail server, until I have a more powerful server.

    gui



    Quote Originally Posted by phoenix
    Yes, fetchmail gets mail from other servers and downloads them to the Zimbra server. It's used for getting mail that's in, let's say, your ISPs mailserver.

    You can't use zimbra as a front-end to other mail servers as it's meant to be a complete mail/groupware solution and runs it's own postfix instance.

    What you can do is migrate all your mail using something like imapsync, have a search of the forums and see how it's been done by others.

  7. #7
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,201
    Rep Power
    56

    Default

    I don't know if there would be an easy way to use Zimbra to imort mail when a user logs-on. If you're saying that your server is 'slow' then I would suggest that importing mail at each logon wouldn't be an effective answer. Zimbra should only appear slow at first logon as it has to cache a lot in the browser, after that it should be acceptable. What are the specs of the server you're running zimbra on? Some of the users in the forum have Zimbra on relatively slow systems and seem to get reasonable performance, you could always reduce the resources that zimbra uses - have a search of the forums for some some info. Do you also have enough ram on the Zimbra server?
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  8. #8
    zzzzsg is offline Senior Member
    Join Date
    Nov 2005
    Posts
    73
    Rep Power
    9

    Default

    Hi bill

    thanks for the reply. so the fetchmail script here won't import mails from other non-zimbra imap servers when user logs on?

    yes, you are right, it will probably be slow if I use fetchmail to import mails.

    My zimbra server is only Pentium III 550MHz, 1 GB Ram.
    My existing mail server (sendmail, imap-uw) is Pentium 4 2GHz 1GB RAM.

    Zimbra is great, but I guess I have to buy a new server.
    Last edited by zzzzsg; 04-17-2006 at 12:20 PM.

  9. #9
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,201
    Rep Power
    56

    Default

    I'm not quite saying you couldn't use fetchmail to import mail, rather that it would be painfully slow. I'm also still fairly new to Linux so I don't know if it could be incorporated but I wouldn't go down that route.

    That is a very slow processor you have on that system and way below the recommended spec. Apart from some of the techniques described in the forums for reducing the resources used by Zimbra I don't really know what to suggest other than the obvious, get a new server.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  10. #10
    teamdc is offline Junior Member
    Join Date
    May 2006
    Posts
    7
    Rep Power
    8

    Default

    Okay I have a question about this.. are there two files I'm creating? I tried to follow the instructions, but I'm getting an error:
    Code:
    fetchmail:/opt/zimbra/conf/zmfetcheracct.conf:1: parse error at /opt/zimbra/conf/zmfetchercfg

Page 1 of 5 123 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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
  •