Results 1 to 10 of 44

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

Threaded View

  1. #1
    Join Date
    Sep 2005
    Rep Power

    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:

    zmfetchercfg -a -u -H -l -p 'remote_pass' -s -P IMAP -f "Inbox" -k -c /opt/zimbra/conf/my_fetchrc
    zmfetchercfg -a -u -H -l -p 'remote_pass' -s -P IMAP -f "Work/Other folder" -k -c /opt/zimbra/conf/my_fetchrc
    zmfetchercfg -a -u -H -l -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
    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.

    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 04:19 PM.

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