2021-04-30 15:15:32 +00:00
|
|
|
# mms2mail
|
|
|
|
|
2021-05-01 06:43:13 +00:00
|
|
|
Convert MMSd MMS file to mbox.
|
|
|
|
|
2021-05-01 07:53:32 +00:00
|
|
|
## installation
|
2021-05-01 06:43:13 +00:00
|
|
|
|
2021-05-05 14:25:46 +00:00
|
|
|
### dependency
|
2021-05-01 06:43:13 +00:00
|
|
|
|
|
|
|
- python3
|
2021-05-04 10:58:23 +00:00
|
|
|
- python3-watchdog (pip install watchdog)
|
|
|
|
- python-messaging (pip install python-messaging)
|
2021-05-01 06:43:13 +00:00
|
|
|
- marrow.mailer (pip install marrow.mailer)
|
2021-05-01 07:53:32 +00:00
|
|
|
|
|
|
|
### setup
|
2021-05-04 10:58:23 +00:00
|
|
|
Install the dependency and mms2mail:
|
2021-05-01 07:53:32 +00:00
|
|
|
```
|
2021-05-04 10:58:23 +00:00
|
|
|
pip install --user watchdog # or sudo apt install python3-watchdog
|
2021-05-01 07:53:32 +00:00
|
|
|
pip install --user marrow-mailer
|
2021-05-04 10:58:23 +00:00
|
|
|
pip install --user python-messaging
|
2021-05-01 07:53:32 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
```
|
2021-05-01 06:43:13 +00:00
|
|
|
|
2021-05-01 07:53:32 +00:00
|
|
|
### config
|
|
|
|
An optional configuration file can be put in the home folder : ```$HOME/.mms/modemmanager/mms2mail.ini```. The default value are :
|
2021-05-01 06:43:13 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
[mail]
|
2021-05-01 07:53:32 +00:00
|
|
|
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
|
2021-05-01 06:43:13 +00:00
|
|
|
```
|
2021-05-01 07:53:32 +00:00
|
|
|
|
|
|
|
## usage
|
|
|
|
|
2021-05-05 14:25:46 +00:00
|
|
|
```
|
|
|
|
mms2mail [-h] [-d [{dbus,filesystem}] | -f FILES [FILES ...]] [--delete] [--force-read]
|
2021-05-01 07:53:32 +00:00
|
|
|
|
|
|
|
optional arguments:
|
|
|
|
-h, --help show this help message and exit
|
2021-05-04 10:58:23 +00:00
|
|
|
-d [{dbus,filesystem}], --daemon [{dbus,filesystem}]
|
|
|
|
Use dbus signal from mmsd by default but can also watch mmsd storage folder (useful for mmsd < 1.0)
|
|
|
|
-f FILES [FILES ...], --file FILES [FILES ...]
|
2021-05-05 14:25:46 +00:00
|
|
|
Parse specified mms files and quit
|
|
|
|
--delete Ask mmsd to delete the converted MMS
|
|
|
|
--force-read Force conversion even if MMS is marked as read
|
|
|
|
```
|