Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Feb 2005
    Location
    Georgetown, TX
    Posts
    104

    Default DL e-mail from another POP3 into cPanel

    Our IT department at work has an extremely lousy implementation of SpamAssassin.

    I want to setup my VPS to somehow check/download all e-mail from my work's POP3 account so that my cPanel server can run its own filters/spam checking on those e-mails.

    I would then check my POP3 e-mail from my cPanel server instead of from work.

    Any ideas?

    Thanks,
    Matt

  2. #2
    Member
    Join Date
    Jan 2004
    Posts
    755

    Default

    I take it you cannot simply forward emails from work to your preferred address (using a forward, not by forwarding individual messages)...

  3. #3
    Member
    Join Date
    Feb 2005
    Location
    Georgetown, TX
    Posts
    104

    Default Woo hoo!

    Nope, our IT sucks. They refuse to forward, so I'm forced to work around that fact.

    As it turns out, my VPS hosting company mentioned a program called "fetchmail" to me. Evidently, this is a very popular program that does exactly what I'm needing. (Incidently, fetchmail is used in Horde to get mail from a different account, but it can't be set to run automatically as far as I can tell.)

    It took me about 3 hours to muck around with the user guide and find other people's sample files, but here's what I did:

    1. Logged into my VPS as root.
    2. Eventually created a "~/.fetchmailrc" file structurally identical to this:

    Code:
    set daemon 120  #run as daemon & poll every 2 minutes
    set logfile = "/var/log/fetchmail.log"  #log is only output when no terminal
    set no bouncemail  #not sure
    set no spambounce  #not sure
    set invisible  #makes the e-mail still look like it's to/from the original?
    
    poll mail.mywork.com  #pop3 mail server
            with protocol POP3 no dns  #access via POP3, not sure about the dns
    	#POP3 user/pass, send to diff e-mail...
            username user1 password u1pass is user1@myowndomain.com
    	username user2 password u2pass is user2@myowndomain.com
      	username user3 password u3pass is user3@myowndomain.com
    	username user4 password u4pass is user4@myowndomain.com
    
    flush  #remove downloaded messages from original server
    fetchall  #get all even, if already seen
    fetchlimit 0  #no fetch limit
    fetchsizelimit 0  #no size limitations
    ;
    3. Then, I just ran fetchmail by typing its name at the command line!

    I still need to figure out how to put it in my startup scripts so it's sure to run when my server is rebooted. This is a basic Linux task I've never mastered. Can someone help me with it?

    -- Matt
    Last edited by kemis; 02-09-2006 at 07:39 PM.

  4. #4
    Member
    Join Date
    Mar 2004
    Posts
    710

    Default

    DAEMON MODE

    http://www.catb.org/~esr/fetchmail/f...il-man.html#12

    Now, just trying to see if can be setup so each user can do it. Or - does anyone know if can be setup to check for an include file, if exists and run it? That way, only one file and no admin time needed to update.
    Lloyd F Tennison

  5. #5
    Member
    Join Date
    Feb 2005
    Location
    Georgetown, TX
    Posts
    104

    Default

    I know about the daemon mode. That's how I'm running it now. I just don't know how to make it so that the daemon starts automatically when the server does. I know I need to put a startup script in the init.d or something, but not sure what to name the script, which runlevel, permissions, exact statements, etc.

    Thanks!
    Matt

  6. #6
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Simplest way is to put the required statements into your own script and then call that script from within /etc/rc.d/rc.local with:

    /path-to/my/script.sh
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  7. #7
    Member
    Join Date
    Feb 2005
    Location
    Georgetown, TX
    Posts
    104

    Default

    It works! Thanks so much for the tip on the rc.local file!

    -- Matt

Similar Threads & Tags
Similar threads

  1. Horde POP3 Fetch Mail From Google Apps Mail
    By bEgUnDaL in forum E-mail Discussions
    Replies: 3
    Last Post: 03-11-2012, 09:19 PM
  2. Mail POP3 - Timeout
    By nucleo in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 10-03-2005, 02:55 PM
  3. Pop3 dies with cpanel updates, does the new pop3 fix this?
    By DWHS.net in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-29-2004, 06:44 AM
  4. Accessing POP3 mail
    By santame in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 01-25-2004, 04:32 AM
  5. Problem with pop3 mail.
    By }{iJacK in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 01-08-2004, 03:00 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube