Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ac000/recmail

Save off mime-parts from an email message passed to it
https://github.com/ac000/recmail

Last synced: 7 days ago
JSON representation

Save off mime-parts from an email message passed to it

Awesome Lists containing this project

README

        

Overview
========

recmail is a simple utility to receive email passed to it from a MDA,
saving off any mime-parts and also storing a copy of the original message.

Building
========

It requires gmime 2.6.x and libuuid, on Fedora, these can be installed via

$ sudo dnf install gmime gmime-devel libuuid libuuid-devel

To build simply type make

Use
===

Add a symlink in /etc/smrsh pointing to /usr/local/sbin/recmail
e.g

# cd /etc/smrsh
# ln -s /usr/local/sbin/recmail globocom

Add an entry for the sender to /etc/mail/virtusertable pointing to an alias
for which you put an alias in /etc/aliases.

In /etc/mail/virtusertable add an entry

[email protected] globocom

Running make after making that change.

Then in /etc/aliases add an entry

globocom: |/etc/smrsh/globocom

Running newaliases after making that change.

Whenever email is sent to that address it is piped through recmail

recmail will look at argv[0] to see who it has been called as (stripping off
the pathname). It will use this to determine where to store the data.

It will split the message up into its parts and store them under
/data/maildata//YYYY/MM/DD/part-xxx.obj along with the original
email stored under /data/maildata//YYYY/MM/DD/UUID/maildata.dat

There is also an index file created (00INDEX) that links original attachment
filenames to their part-xxx.obj counterparts.

Multiple messages sent in the same day will be stored under separate UUID/
directories, where UUID is e.g 33faa523-d10f-4162-9876-ba30476a155c.

You can run recmail manually e.g

./recmail /path/to/somedir < mailfile

Where /path/to/somedir is instead of /data/maildata and mailfile is a full
email message.