diff --git a/README.md b/README.md index 6a544f8..af0b473 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,48 @@ Convert MMSd MMS file to mbox. +## installation + +### dependancy + + - python3 + - python3-watchdog (apt install python3-watchdog) + - python-messaging (https://www.github.com/davegermiquet/python-messaging.git) + - marrow.mailer (pip install marrow.mailer) + +### setup +Install the dependancy and mms2mail: +``` +sudo apt install python3-watchdog # pip install --user watchdog +pip install --user marrow-mailer + +git clone https://www.github.com/davegermiquet/python-messaging.git +cd python-messaging +python3 setup.py install --user + +mkdir -p ~/.local/bin +cp mms2mail ~/.local/bin +``` +To enable the daemon mode in systemd user : +``` +mkdir -p ~/.config/systemd/user +cp mms2mail.service ~/.config/systemd/user/ +systemctl --user daemon-reload +systemctl --user enable mms2mail +systemctl --user start mms2mail +``` + +### config +An optional configuration file can be put in the home folder : ```$HOME/.mms/modemmanager/mms2mail.ini```. The default value are : + +``` +[mail] +mailbox = /var/mail/$USER ; the mailbox where mms are appended +user = $USER ; the user account specified as recipient +domain = $HOSTNAME ; the domain part appended to phone number and user +attach_mms = false ; whether to attach the full mms binary file +``` + ## usage mms2mail [-h] [-d | -f FILE] @@ -11,20 +53,3 @@ optional arguments: -d, --daemon watch for new mms in the mmsd storage folder -f FILE, --file FILE parse a single mms file -## dependancy - - - python3 - - python3-watchdog (apt install python3-watchdog) - - python-messaging (https://www.github.com/davegermiquet/python-messaging.git) - - marrow.mailer (pip install marrow.mailer) - -## config -```$HOME/.mms/modemmanager/mms2mail.ini``` - -``` -[mail] -mailbox = /var/mail/mobian -account = mobian -domain = "mobian.lan" -attach_mms = false -``` diff --git a/mms2mail.service b/mms2mail.service index 34579e3..4f24954 100644 --- a/mms2mail.service +++ b/mms2mail.service @@ -3,7 +3,7 @@ Description=Multimedia Messaging Service to Mail converter Daemon After=mmsd.service [Service] -ExecStart=mms2mail -d +ExecStart=python3 %h/.local/bin/mms2mail -d Restart=on-failure RestartSec=10s