No description
Find a file
2021-05-21 07:51:02 +02:00
.vscode [feat] remove python-messaging 2021-05-19 19:21:20 +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
Makefile [feat] Add Makefile to automate installation 2021-05-21 07:51:02 +02:00
mms2mail [feat] remove python-messaging 2021-05-19 19:21:20 +02:00
mms2mail.ini [feat] Delete MMS is now a config entry 2021-05-19 08:15:58 +02:00
mms2mail.service [feat] Add Makefile to automate installation 2021-05-21 07:51:02 +02:00
README.md [feat] Add Makefile to automate installation 2021-05-21 07:51:02 +02:00
requirements.txt [feat] Add Makefile to automate installation 2021-05-21 07:51:02 +02:00
TODO.md [feat] Convert stored mms on init 2021-05-19 08:08:09 +02:00

mms2mail

Mail bridge for mmsd.

mms2mail:

  • convert incoming mms from mmsd to mail and store it in unix mbox.
  • provide a smtp server converting mail to mms with mmsd.

By default:

  • store mails 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
  • listen on localhost port 2525 for mail

installation

dependency

  • python3
  • python3-aiosmtpd
  • python3-pydbus

setup

Install the dependency and mms2mail (on debian based distribution):

make deb-deps install

For other distribution:

make pypy-deps install

To enable the daemon mode in systemd user :

make configure start

Depending on your distribution, you might have to add your account to the mail group to be able to lock and use the system mbox. On Debian based distribution :

sudo addgroup $(whoami) mail

manual install

Install the dependency and mms2mail (on debian based distribution):

sudo apt-get install python3
sudo apt-get install python3-pydbus
sudo apt-get install python3-aiosmtpd

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

Depending on your distribution, you might have to add your account to the mail group to be able to lock and use the system mbox. On Debian based distribution :

sudo addgroup $(whoami) mail

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
delete_from_mmsd = false   ; delete mms from mmsd storage upon successful conversion

[smtp]
hostname = localhost
port = 2525

usage

reference

mms2mail [-h] [--disable-smtp] [--disable-mms-delivery] [--force-read] [--force-unlock] [-l {critical,error,warning,info,debug}]

optional arguments:
  -h, --help            show this help message and exit
  --disable-smtp
  --disable-mms-delivery
  --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

Sending MMS

To send MMS, mail address not in the following format would be ignored : +123456789@domain with phone number in international format.

with Mutt :

To be able to send mms with mutt you need it to be built with SMTP support. And and the following line in your $HOME/.muttrc:

set smtp_url = "smtp://localhost:2525"
set ssl_starttls = no
set ssl_force_tls = no