FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Red Hat Linux

 
 
LinkBack Thread Tools
 
Old 01-12-2011, 05:59 PM
Matty Sarro
 
Default Best way to automatically copy out attachments from an email

As of now here is my situation:
I am working on a system to aggregate IT data and logs. A number of
important data are gathered by a third party system. The only
immediate way I have to access the data is to have their system
automatically email me updates in CSV format every hour. If I set up a
mail client on the server, this shouldn't be a huge issue.

However, is there a way to automatically open the emails, and copy the
attachments to a directory based on the filename? Kind of a weird
project, I know. Just looking for some ideas hence posting this on two
lists.

Thanks all, and happy hump day!
-Matty

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 01-12-2011, 06:16 PM
 
Default Best way to automatically copy out attachments from an email

Matty Sarro wrote:
> As of now here is my situation:
> I am working on a system to aggregate IT data and logs. A number of
> important data are gathered by a third party system. The only
> immediate way I have to access the data is to have their system
> automatically email me updates in CSV format every hour. If I set up a
> mail client on the server, this shouldn't be a huge issue.
>
> However, is there a way to automatically open the emails, and copy the
> attachments to a directory based on the filename? Kind of a weird
> project, I know. Just looking for some ideas hence posting this on two
> lists.

Well, they are presumably in std. MIME format, so you can strip it off,
maybe with a filter either in your mail tool, or in the delivery system.
procmail comes to mind.

mark

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 01-16-2011, 02:59 AM
Cameron Simpson
 
Default Best way to automatically copy out attachments from an email

On 12Jan2011 14:16, m.roth@5-cent.us <m.roth@5-cent.us> wrote:
| Matty Sarro wrote:
| > As of now here is my situation:
| > I am working on a system to aggregate IT data and logs. A number of
| > important data are gathered by a third party system. The only
| > immediate way I have to access the data is to have their system
| > automatically email me updates in CSV format every hour. If I set up a
| > mail client on the server, this shouldn't be a huge issue.
| >
| > However, is there a way to automatically open the emails, and copy the
| > attachments to a directory based on the filename? Kind of a weird
| > project, I know. Just looking for some ideas hence posting this on two
| > lists.
|
| Well, they are presumably in std. MIME format, so you can strip it off,
| maybe with a filter either in your mail tool, or in the delivery system.
| procmail comes to mind.

1: Install metamail.
2: Try this script:
http://www.cskk.ezoshosting.com/cs/css/bin/mailunpack

The particular metamail command you want is "metamail -w -x"; see the
man page for details.

The mailunpack script above just does a lot of the housekeeping and
automation you will doubtless want to do anyway; it does need a bunch of my
other scripts, see:

http://www.cskk.ezoshosting.com/cs/css/

to get the lot, typically installing them in /opt/css for easy use.

Then all you need to do is use procmail to filter you email, and have it
pass the relevant emails to mailunpack with the right arguments (or of
course directly to "metamail -w -x" with some wrapping).

Anyway, you're welcome to the script for use or for inspection.

Cheers,
--
Cameron Simpson <cs@zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

If you push something hard enough, it will fall over.
[Fudd's first law of opposition]

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 

Thread Tools




All times are GMT. The time now is 06:08 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org