LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-05-2009, 05:55 PM   #1
shankariyer
Member
 
Registered: Feb 2001
Location: California, USA
Distribution: Ubuntu 6.10[ HP Pavilion dv6000z ]
Posts: 165

Rep: Reputation: 30
Procmail and storing attachments.


Hi,

My request may be opposite to how people typically use 'procmail'.

My mail server has pop access using SSL. I'd like to sniff any incoming
and save those attachments ( CSV's, XLS, XLSX ) in a separate
directory. I do not care much about the mail that was sent, except
that I don't want to delete it.

I've the fetchmail part setup, but am looking for an apt procmailrc.
Please advice.

Thanks.
 
Old 01-06-2009, 11:54 AM   #2
shankariyer
Member
 
Registered: Feb 2001
Location: California, USA
Distribution: Ubuntu 6.10[ HP Pavilion dv6000z ]
Posts: 165

Original Poster
Rep: Reputation: 30
I moved little ahead on this... My procmailrc looks like this

Code:
$ cat .procmailrc 
LOGFILE=~/proc.log
:0H
| ~/check.pl
I'm not completely sure of the code above, but I'm trying to achieve the following
1. Look for a mail, which has CSV attachment, if found direct it ~/csv_files
2. Look for a mail, which has XLS, XLSX attachment, if found direct it ~/xl_files

While doing that, I'd like also like to preserve the attachment name, as I'd suffix it with date-time stamp before moving it to the respective directory.

I'm new to procmail, please advice or give me some sample code.

Thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
procmail or some program to zip email attachments over a given size -HELP- syadnom Linux - Server 1 12-27-2008 11:50 AM
Storing passwords Ze MoreirA Linux - Security 1 08-13-2007 05:41 AM
Problem with mail delivery procmail>cyrus imap (using sendmail,procmail,cyrus,imap) bwana Linux - Software 2 03-24-2005 07:01 PM
Remove attachments with Procmail? ciop Linux - Security 3 06-09-2004 03:11 PM
Procmail & mail attachments PcHammer Linux - Software 1 02-05-2003 08:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration