Save attachment from incoming email to specific folder

I have installed owncloud on my linux server. I need functionality - where I send email with attachment to my dedicated email (can be on remote server, not she same where owncloud is located) and all attachments are stored automatically in specific folder in owncloud. No idea, if to use cronjob or how to do it. many thanks in advance.

I would script this on the mail server to use the owncloudcmd.

FYI: I moved this topic from server to development

1 Like

unfortunately, mailserver is accessibe only via imap, so I have no privilige to run scripts there. I thought about some other scritp on owncloud server to connect to imap and “download” all attachments to specific directory.

Yes, this sounds good. Have your script connect to IMAP and fetch the attachments, you can “upload” them via WebDAV call, see https://doc.owncloud.com/server/user_manual/files/access_webdav.html#accessing-files-using-curl

3 Likes

Maybe any sample please? :slight_smile: I am dealing with how to download attachments from new unread emails only, then mark it as read.

pete, I’m afraid I cannot help you with that.

There are no official ownCloud scripts which could achieve that, so your wish is out of scope here.
Depending on the script language you are using there are plenty of examples on stackoverflow etc. - google is your friend :slight_smile:

Best wishes for your project and feel free to open new issues, when it comes to ownCloud questions.

2 Likes