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.