hi, have searched forum but cannot find any thread that discusses this. surely it's easy to do?
how are attachments stored on the server? i want to be able to periodically move all attachment files received from one postoffice to another.
thanks,
rich talbot
copy attachments to folder
-
- Posts: 560
- Joined: Mon Nov 03, 2003 7:48 am
- Location: Cape Town
-
- Posts: 7
- Joined: Mon Dec 12, 2005 11:14 am
code to strip message header?
Thanks Brett,
I've looked at a mail message with attachment in Notepad and can see what you mean.
Does anyone know a script or easy way to strip the attachments to individual mail files?
Regards, Rich
PS. I am trying to allow spam messages to be sent as attachments from a genuine user to spam@ so that the attachments can be extracted and copied to the spam@ folder ready for spam auto-learning.
I've looked at a mail message with attachment in Notepad and can see what you mean.
Does anyone know a script or easy way to strip the attachments to individual mail files?
Regards, Rich
PS. I am trying to allow spam messages to be sent as attachments from a genuine user to spam@ so that the attachments can be extracted and copied to the spam@ folder ready for spam auto-learning.
You need to be able to read the S/MIME format. Look this up in your language of choice.
On my server i am currently using perl, after finding it better supported than VB, (And maybe faster? ) to catch messages in the MTA.
I use the MIME decode and mime read functions and literally take the messages apart complelty, then rebuild them into a template to look nicer !
You can then extract files and write them to disk !
i am just BETA testing an option to grab large attachements out of the SMTP to stop them clogging clients email, then allow them to download from a web page. Maybe I should release this as a seperate app
On my server i am currently using perl, after finding it better supported than VB, (And maybe faster? ) to catch messages in the MTA.
I use the MIME decode and mime read functions and literally take the messages apart complelty, then rebuild them into a template to look nicer !
You can then extract files and write them to disk !
i am just BETA testing an option to grab large attachements out of the SMTP to stop them clogging clients email, then allow them to download from a web page. Maybe I should release this as a seperate app
John D
JD Projects
Developer of E-Mailing Systems
West of England
Check out our email service built on mailenable
www.proserviceemail.co.uk
www.jdprojects.co.uk
www.smarterweb.co.uk
JD Projects
Developer of E-Mailing Systems
West of England
Check out our email service built on mailenable
www.proserviceemail.co.uk
www.jdprojects.co.uk
www.smarterweb.co.uk
-
- Posts: 7
- Joined: Mon Dec 12, 2005 11:14 am
Does anybody have some sample code that could be used for this? I'd like to use the catch-all feature to implement an automatic document scanner server that can export the attachments to a folder based upon the recipient e-mail address.
For example:
1. Scanned pdf file is e-mailed to 01295@domain.com
2. PDF file is exported from e-mail to D:\elig_docs\01295\datescanned_01295.pdf
3. Email is deleted
Don't care if this is done via DOS, vbscript, or MTA.
For example:
1. Scanned pdf file is e-mailed to 01295@domain.com
2. PDF file is exported from e-mail to D:\elig_docs\01295\datescanned_01295.pdf
3. Email is deleted
Don't care if this is done via DOS, vbscript, or MTA.
You need to put an app in the MTA and catch the emails while they are in the queue.
I write in coldfusion but still use php to work on file while in the MTA.
standard PHP supports the mime operation to extract emails and then the file options to copy the collected part to whatever directory.
what are you using to get the scanned apps into an email first?
I write in coldfusion but still use php to work on file while in the MTA.
standard PHP supports the mime operation to extract emails and then the file options to copy the collected part to whatever directory.
what are you using to get the scanned apps into an email first?
John D
JD Projects
Developer of E-Mailing Systems
West of England
Check out our email service built on mailenable
www.proserviceemail.co.uk
www.jdprojects.co.uk
www.smarterweb.co.uk
JD Projects
Developer of E-Mailing Systems
West of England
Check out our email service built on mailenable
www.proserviceemail.co.uk
www.jdprojects.co.uk
www.smarterweb.co.uk
I'll be using our copy machine. It can scan documents into PDF format and then e-mail them as attachments to a pre-defined e-mail address or an e-mail address you manually enter when you are scanning.
I was hoping to just use a WinXP VM for MailEnable and then have a batch file process the e-mail and copy the attachment to our main file server. I would prefer not to have to work with PHP, perl, etc. if possible but am willing to if that is the only way.
I was hoping to just use a WinXP VM for MailEnable and then have a batch file process the e-mail and copy the attachment to our main file server. I would prefer not to have to work with PHP, perl, etc. if possible but am willing to if that is the only way.