PDA

View Full Version : Email to web directory



keefe007
02-27-2007, 12:38 PM
One of my clients would like me to setup an email account in which all attachments going into that account are copied to a web folder on the same server.

More explicitly, they want to send emails containing .pdf attachments to scan@domain.com and have it placed in http://www.domain.com/scan.

I'm thinking of making a forward and pointing it to a script. Does anyone have a script that would serve this function?

keefe007
03-08-2007, 01:12 PM
anyone have any ideas?

floyd
03-08-2007, 01:51 PM
I'm thinking of making a forward and pointing it to a script.

That should work. Basically you need to look for a script that will extract the attachment and save it to a folder. There should be something out there on Google.

Mik3yZ
03-09-2007, 12:05 AM
you should use procmailrc

on your machine do:

man procmailrc

- Mike

floyd
03-09-2007, 05:49 AM
I think the main problem keefe007 needed solved is getting a script to extract attachments.

I think using procmail is essentially doing the same thing as a forward in this case. You are still piping it to a script either way.

nobaloney
03-09-2007, 07:55 AM
Procmail is installed on your server because some older MTAs (for example, sendmail) cannot deliver mail on the local server themselves, and need procmail to do that for them. Exim can send mail anywhere you need it, and doesn't need procmail.

This thread actually doesn't belong in the E-Mail forum but in the scripting forum; I've moved it.

Jeff