Files From Mail

Highest Nextcloud version

Nextcloud 18
Show all releases

Community rating
Author

Maxence Lange

Last updated

4 years, 10 months ago

Categories

Files, Tools

Resources
Interact
Report problem Request feature Ask questions or discuss

Allows an admin to link a drop-mailbox to Nextcloud. This way, you can set a mail address and every mails+attachments send to this mail address will be automatically be saved on the cloud.

Releases

Nextcloud version Stable channel Nightly channel All releases
18 0.4.0 - 18
17 0.3.1 - 17
16 0.3.1 - 16
15 0.3.1 - 15
14 0.2.0 - 14
13 0.2.0 - 13
12 0.2.0 - 12

Comments

Olav Seyfarth
Good
Ok
Bad
1 year, 10 months ago

We managed to install and configure the app – and it saved our day since it provides an easy way to let my Kyocera MFP drop it's scans via SMTP instead of SMB (which since Samba 4.11 no longer functions with many older MFP printers). The documentation quite is insufficient though. What we did (on an Arch server):

  1. Install files_frommail app on your Nextcloud(s). Tweak MailService.php if you don't use FQDN addresses (local delivery) or if you don't want mail body be saved (attachments only).
  2. Configure file names sudo -u http php occ config:app:set --value "Y-m-d_H-i-s" files_frommail filename_id to avoid sync issues.
  3. If the email server is on a different machine, copy NextcloudMailCatcher.php to some directory on that email server. Configure NextcloudMailCatcher.php there using URI, user name and an App-PIN generated from the NC-receipient-user's NC security page.
  4. Install mailparse. You may have to activate it by uncommenting in /etc/php/conf.d/mailparse.ini. Don't forget to restart PHP if you use PHP-FPM.
  5. Add delivery alias that pipes local address to NextcloudMailCatcher.php in your mail server. See the Postfix example below.
  6. Test using telnet or using mailx, like echo testtxt > tst.txt ; echo bodytxt | mail -s 'mff-test' -a tst.txt -r scanner@kyocera kyocera@local
  7. Share the (Sub-)Directory created by the App and optionally rename it to an intuitive name for all users it was shared to.

Notes:

1: We tweaked MailService.php line 366: We (temporarily) added return; prior to throw in order to trick the FQDN check, which is unwanted in our case. We also commented out MailService.php line 149 /** $this…; **/ since storing the mail body is unwanted in our "Kyocera MFP Scan 2 Nextcloud" case.

2: As you see in the screenshot above, filenames created that way may contain colons (:) in the time stamp. While this may not be an issue on the server or Linux clients, Windows clients cannot handle them and the Windows Sync client ignores such files although they are visible in the Web interface.

4: On Arch Linux, you need to install php-mailparse from AUR (or build it manually, or use php-pear). Make sure mbstring is activated in PHP aswell (should be). Remember to use php-legacy-mailparseif you're running Nextcloud on php-legacy.

5: echo 'localaddress: "|/usr/bin/php -f …/cloud/apps/files_frommail/lib/NextcloudMailCatcher.php"' > /etc/postfix/local;postalias /etc/postfix/local. You may want to add a specific log path such as -d error_log=/var/log/php.postfix.

Anonymous
Good
Ok
Bad
2 years, 1 month ago

This app is [abandoned](https://github.com/nextcloud/files_frommail/issues/43#issuecomment-922483930.

Anonymous
Good
Ok
Bad
2 years, 2 months ago

Please remove this app. Hasn't updated in more than 2 years and not working with current NC version 25.

M DT
Good
Ok
Bad
5 years, 11 months ago

Can't make this work, although I really tried.

Unable to install required mailparse and to add adjustments to my mailserver.

Good idea, but really requires more detailed documentation.

Johan B
Good
Ok
Bad
5 years, 11 months ago

This app requires some more documentation. Unless you click on the homepage link and get to github you wont know that you need to do stuff on the host.

The app also requires a fair bit of work to even be usable.

Goethe G
Good
Ok
Bad
6 years, 9 months ago

Missing a proper description and a clear overview over the functions. Sitting here for ten minutes inNextcloud and looking for its settings. I can't even say for now whether the app is good or not.