RE: [otrs] Accessing Attachments saved to FS outside of OTRS

Thanks Victor. Of course I'm using Winblows. I'm curious whether this method would work on binaries. I tried something on Windows with GNU SED for Windows, but no joy (at least on the binaries). I suspect the problem may lie in the whole LF => CR/LF problem along with the prepended line. Ended up writing the attachments to the DB and writing ASP code to write out the BLOBs to Files... -----Original Message----- From: otrs-bounces@otrs.org [mailto:otrs-bounces@otrs.org]On Behalf Of Victor Rodriguez Cortes Sent: Friday, July 22, 2005 6:02 AM To: User questions and discussions about OTRS.org Subject: RE: [otrs] Accessing Attachments saved to FS outside of OTRS Hi!! On 21 Jul 2005 at 10:45, Keith Mitchell wrote:
*bump* never got an answer on this one...
I remember thinking about replying, but I didn't! Lets go...
-----Original Message-----
Is there an easy way to access attachments saved to the FS from outside of OTRS?
BTW, if you're using filesystem as article storage, they can be located at: $OTRSHOME/var/article/[year]/[month]/[day]/[dont know]/file
I notice that OTRS prepends the first line of the attachment with the MIME type and filename. Is there an easy way to change this behavior so I can manipulate the files via the filesystem without having to tail them?
If you're using Linux/unix, a good solution could be to create an alias: alias otrscat='sed 1d $1' Then, using otrscat against any OTRS article file will remove the first line and display the file in your terminal. With: otrscat otrsfile.ext > otrsfile.stripped.ext Or simply use "sed 1d otrsfile.ext > otrsfile.stripped.ext" ;-) You can redirect the output and have a new file on your disk identical to the one attached to the original mail. It's also possible to make a script to copy the article tree to a different directory (OTRS needs the files as it stores them), and then removes the first line of the all the files in the directory tree... Do it every night and you'll have all your attachments available ;) Regards, --- Victor R. Rodriguez Departamento de Sistemas Valoraciones del Mediterraneo, S.A. --- _______________________________________________ OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs Support oder Consulting f?r Ihr OTRS System? => http://www.otrs.de/
participants (1)
-
Keith Mitchell