|
|
|
@ -2,29 +2,54 @@
|
|
|
|
|
|
|
|
|
|
Convert MMSd MMS file to mbox. |
|
|
|
|
|
|
|
|
|
## usage |
|
|
|
|
|
|
|
|
|
mms2mail [-h] [-d | -f FILE] |
|
|
|
|
## installation |
|
|
|
|
|
|
|
|
|
optional arguments: |
|
|
|
|
-h, --help show this help message and exit |
|
|
|
|
-d, --daemon watch for new mms in the mmsd storage folder |
|
|
|
|
-f FILE, --file FILE parse a single mms file |
|
|
|
|
|
|
|
|
|
## dependancy |
|
|
|
|
### 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 |
|
|
|
|
```$HOME/.mms/modemmanager/mms2mail.ini``` |
|
|
|
|
### 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/mobian |
|
|
|
|
account = mobian |
|
|
|
|
domain = "mobian.lan" |
|
|
|
|
attach_mms = false |
|
|
|
|
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] |
|
|
|
|
|
|
|
|
|
optional arguments: |
|
|
|
|
-h, --help show this help message and exit |
|
|
|
|
-d, --daemon watch for new mms in the mmsd storage folder |
|
|
|
|
-f FILE, --file FILE parse a single mms file |
|
|
|
|
|
|
|
|
|