Closed

POP3 Retrieval

A linux CLI executable to download messages from a POP3 server to a file for each message.

## Deliverables

It's intend to work as any POP3 client, i.e. connect to the server, get the messages list, retrieve new messages (limited by the maximun defined), delete from the server (optional). This cycle must be repeated a definied number of times for each run, retrieving on each a definied max of messages, and closing the connection at the end of the cycle (deleting the messages if the setting is enabled). For each fetched message, it has to create a text file with the entire message (including headers), with the md5 of the message as filename in a specific directory. If a file with this name exists, we're probably in front of a duplicated message, so if it is true, it hasn't to create a new file. To the next cycle, it has to wait a delay time.

The app has to read the configuration XML file from a path received as a parameter; and multiple instances of the app may be running at the same time, each with a different config file.

Also, it has to record a XML log for each cycle, in which is described what has been done (numbers of emails on the UIDL, numbers of UID to fetch, UID fetched successfully, etc), and any error occurred (no network, no response from POP server, etc). The output of the log at the end of the cycle may be a file (named by the date of running) and/or a database (calling a configurable function on a configurable PostgreSQL DB). In error case, the app must be able to send an email with the warning (mail address and subject, configurable in the configuration file; the body, with a description of the error).

In the xml configuration file we can set:

* Connection parameters (host, port, SSL, username, password)

* Pop Retrieval

* * Number of cycles (number of attemps to download message for each run)

* Delay time between cycles (seconds to wait for a new cycle)

* Fetch messages max (the maximum numbers of messages to fetch for each cycle)

* Delete options (delete on download)

* Target

* * Target directory (may be a mounted network volume)

* Target directory max files (the max numbers of files in the directory; if it's reached, will not fetch any message until it has space)

* Alert

* * numbers of error to trigger mail

* email address

* subject

* body

* Log

* * Directory

* * Enable/Disable

* Directory

<!-- -->

* Database

* Enable/Disable

* Server

* Database

* Function

* User

* Password

The typical execution it's like this (where

*italic and underlined* words are parameters in the [url removed, login to view]):

1. read the [url removed, login to view]

2. repeat *cycles* times

1. connect to *host*

2. get the list of messages

3. if messages avaliable number is greater than *maxMessages*

retrieve the oldest *maxMessages* messages from the list

else

retrieve all messages from the list

4. for each message fetched

1. create a text file with the message, named as the md5 of the message

2. if the file exists, check if the message it's the same. If it's true, discard the message

<!-- -->

1. create a text file with the message, named as the md5 of the message

2. if the file exists, check if the message it's the same. If it's true, discard the message

5. delete downloaded messages from server

6. close connection

7. close XML log file, and call the function *function* of the PostgreSQL database *database* passing the XML log as a parameter

8. wait *delay* seconds

Attached:

* [url removed, login to view] example

* [url removed, login to view] example

* * *This broadcast message was sent to all bidders on Wednesday Jun 25, 2008 4:11:42 PM:

The requierements has changed. Please review it,and check if your bids still valid. It's fundamentally drop the UID message getting, and replace it for md5 of the message for identifiyng it.

Skills: Engineering, Linux, MySQL, PHP, Software Architecture, Software Testing

See more: pop3 retrieval, maximum path, app get linux, postgresql any, check new messages, pop3 email, cli, call log app, database connection app config, php download email pop3, mail config php, linux email config, maximum execution time, pop3 mail server, cli list files, server client php ssl, linux pop3, read file error number, php pop3 client, database error linux server, call record app, trigger email, uid email, php cli server, please check log files

About the Employer:
( 14 reviews ) Chile

Project ID: #3001907

12 freelancers are bidding on average $426 for this job

vsedelnik

See private message.

$765 USD in 14 days
(47 Reviews)
6.8
angelq2advm

See private message.

$425 USD in 14 days
(30 Reviews)
6.1
b0tivw

See private message.

$293.25 USD in 14 days
(17 Reviews)
5.1
casinoengineer

See private message.

$850 USD in 14 days
(7 Reviews)
4.9
csigvw

See private message.

$425 USD in 14 days
(25 Reviews)
4.9
pascalit

See private message.

$212.5 USD in 14 days
(13 Reviews)
4.8
jeremiahdodds

See private message.

$127.5 USD in 14 days
(26 Reviews)
4.9
nusoftware

See private message.

$1530 USD in 14 days
(20 Reviews)
4.4
zjt

See private message.

$127.5 USD in 14 days
(2 Reviews)
3.4
iadnah

See private message.

$102 USD in 14 days
(8 Reviews)
2.5
skotagiri

See private message.

$127.5 USD in 14 days
(0 Reviews)
0.0
jaredquinn

See private message.

$127.5 USD in 14 days
(0 Reviews)
0.0