No description
Find a file
2021-05-10 10:33:33 +02:00
.gitignore Initial commit 2021-04-30 15:15:32 +00:00
COPYING [feat] Add license 2021-05-02 08:40:30 +02:00
LICENSE [feat] Add license 2021-05-02 08:40:30 +02:00
mms2mail [fix] Remove marrow.mailer dirtyfix 2021-05-10 10:33:33 +02:00
mms2mail.ini [fix] Watch the mmsd folder instead of a test folder 2021-05-02 08:40:30 +02:00
mms2mail.service [feat] Remove Filesystem based watcher 2021-05-07 12:12:08 +02:00
README.md [feat] Remove marrow.mailer 2021-05-10 10:30:37 +02:00

mms2mail

Convert mmsd MMS file to mbox.

mms2mail can convert mms in batch mode, or wait for new mms via a dbus signal sent by mmsd. By default it store them in the current user mbox (/var/mail/$USER) in case the mbox is locked by another process the output could be found in : $HOME/.mms/failsafembox

installation

dependency

  • python3
  • python-messaging (pip install python-messaging)

setup

Install the dependency and mms2mail:

sudo apt-get install python3
pip install --user python-messaging

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 FILES [FILES ...]] [--delete] [--force-read]
                [--force-unlock] [-l {critical,error,warning,info,debug}]

optional arguments:
  -h, --help            show this help message and exit
  -d, --daemon          Use dbus signal from mmsd to trigger conversion
  -f FILES [FILES ...], --file FILES [FILES ...]
                        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
  --force-unlock        BEWARE COULD LEAD TO WHOLE MBOX CORRUPTION Force unlocking the
                        mbox after a few minutes /!\
  -l {critical,error,warning,info,debug}, --logging {critical,error,warning,info,debug}
                        Define the logger output level