Using a Gmail Account as a MailFlow Message Source

Tuesday, September 16, 2008

"How to collect mail from Gmail with MailFlow", courtesy of Kevin Fortune, Deerfield.com technician.

In its current form, VisNetic MailFlow does not support Secure POP3 or IMAP connections. However using a 3rd party program called Stunnel this process can be completed quite easily.

Follow these steps from within Gmail to allow POP3 Collection:
  1. Log into Gmail
  2. Click on Settings at the top
  3. Click on the Forwarding and POP/IMAP option
  4. Enable the option Enable POP for all mail (even mail that's already been downloaded) This option will allow you to collect all the mail that is stored in your Gmail account
  5. Specify under option 2 to keep Gmail's copy in the Inbox. This option keeps your mail as it currently is in Gmail
  6. Click Save Changes

Screenshot: https://support.deerfield.com/kayakov3/images/VMFGmailSettings.JPG

Now MailFlow is creating a POP3 Connection from itself to Stunnel. Stunnel is then creating the Secure connection to the Gmail Servers and collecting the mail. All logging will be accessible via the MailFlow log file.



Now we will need to download Stunnel
Once downloaded follow these steps:
  1. Run the installation, which will install the program and all required files, by default, to c:\program files\stunnel\
  2. After Stunnel has been installed, open Windows Explorer and navigate to the c:\program files\stunnel\ directory
  3. There should be a file installed called stunnel.conf. Open this file with Notepad
  4. Delete all the contents of the file and paste in the following:
    ; Sample stunnel configuration file by Michal Trojnara 2002-2006
    ; Some options used here may not be adequate for your particular configuration

    ; Certificate/key is needed in server mode and optional in client mode
    ; The default certificate is provided only for testing and should not
    ; be used in a production environment
    cert = stunnel.pem
    ;key = stunnel.pem

    ; Some performance tunings
    socket = l:TCP_NODELAY=1
    socket = r:TCP_NODELAY=1

    ; Workaround for Eudora bug
    ;options = DONT_INSERT_EMPTY_FRAGMENTS

    ; Authentication stuff
    ;verify = 2 ; Don't forget to c_rehash CApath ;CApath = certs
    ; It's often easier to use CAfile
    ;CAfile = certs.pem
    ; Don't forget to c_rehash CRLpath
    ;CRLpath = crls
    ; Alternatively you can use CRLfile
    ;CRLfile = crls.pem

    ; Some debugging stuff useful for troubleshooting
    ;debug = 7
    ;output = stunnel.log

    ; Use it for client mode
    client = yes

    ; Service-level configuration

    # SERVICE-LEVEL OPTIONS

    [SMTP Gmail ]
    accept = 127.0.0.1:1099
    connect = smtp.gmail.com:465

    [POP3 Gmail ]
    accept = 127.0.0.1:111
    connect = pop.gmail.com:995

    ;[https]
    ;accept = 443
    ;connect = 80
    ;TIMEOUTclose = 0

    ; vim:ft=dosini

  5. Save the file
  6. Click on Start then go to Programs Then go to stunnel
  7. Select Service Install
  8. Once the Service is Installed the setup of Stunnel is complete


Now onto VisNetic MailFlow
  1. Log into MailFlow as an Administrator
  2. Click on the Administration button on the left hand side
  3. Expand Message Handling and select Message Sources
  4. Create a new Message Source
  5. Set the Server Address to be localhost
  6. Enter in a Description
  7. Set the Port to 111
  8. For the Username enter in your Gmail Username
  9. For the Password enter in your Gmail Password
  10. Configure the rest of the options as needed
  11. Click Save

Screenshot: https://support.deerfield.com/kayakov3/images/VMFGmailMessageSource.JPG

Now MailFlow is creating a POP3 Connection from itself to Stunnel. Stunnel is then creating the Secure connection to the Gmail Servers and collecting the mail. All logging will be accessible via the MailFlow log file.

0 comments