procmail
[Top] [All Lists]

extract the attachments into a directory named by the email adress of the sender

2004-12-09 23:37:05
What i want to do is to extract the attachment files into a directory named by the email adress of the sender (in order to reply him), so for each incoming email , i create a new directory (if the directory doesn't existe ) like /../email_adress_for_reply and i extract the attachment files into this directory

for example if i receive an email (with attachment) from joe(_dot_)rollings(_at_)domaine(_dot_)com, i have to create a directory named /../joe(_dot_)rollings(_at_)domaine(_dot_)com and i have to extract the attachment into this directory

my .procmailrc is:
*******************************************************
SHELL=/bin/sh
FROM=`formail -x from |tail -1`
D="/root/folder/"$FROM

:0c
* ^Subject: polyjob
|(mkdir -p $D&&METAMAIL_TMPDIR=$D /usr/bin/metamail -r -y -w -q -x 2>/dev/null)

**************************************************************
but, it doesn't create the expected directory (e.g /../sos_linux(_at_)hotmail(_dot_)com), and it create other directories like (/../robert) and (/../ guru") and (/../<sos_linux(_at_)hotmail(_dot_)com>) and when i try to display $FROM it contains: "robert guru" <sos_linux(_at_)hotmail(_dot_)com>

what i have to do??????

thanks

_________________________________________________________________
MSNŽ Calendar keeps you organized and takes the effort out of scheduling get-togethers. http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines Start enjoying all the benefits of MSNŽ Premium right now and get the first two months FREE*.


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail


<Prev in Thread] Current Thread [Next in Thread>