mail2ticker tickertape.org

Showing email subjects in Tickertape

There are essentially two current ways of doing this from a unix mail server: both involve editing your .forward to run a program (slocal, or procmail). What we really want to do is use sendmail (using libmilter) but that's another project. In the meantime.

These instructions are for elvin4 and require tick. For detail on tick you can read the man page contained in the distribution.

Using procmail

Create a .forward file in your home directory with the entry:

"|exec /path/to/procmail/bin/procmail || exit 75"

Create a .procmailrc file in your home directory with the entry:

SUBJECT=`formail -xSubject:`   
FROM=`formail -rt -xTo:`   

:0 c
*
| /path/to/tick-2.0/bin/tick -e elvin://dstc-elvin -g USER_mail
  -s "$SUBJECT" -f "$FROM" -t 10 -m 'message/rfc822'
  -a '*****  MAIL  *****'

Using slocal (only at DSTC cos it requires an slocal hack :-)

Create a .forward file in your home directory with the entry:

"|exec /path/to/slocal/bin/slocal || exit 75"

Create a .maildelivery file in your home directory with the entry:

default - | R "/path/to/tick-2.0/bin/tick -e elvin://dstc-elvin
  -g USER_mail -f '$(reply-to)' -s '$(subject)'
  -m 'message/rfc822' -a '*****  MAIL  *****'"

Note that the ~/.maildelivery file must not be group or world writable.

The '|| exit 75' bit is important. If Elvin can't answer, this makes the mail get left in the spool directory. It's sendmail magic and ensures you don't lose mail.

Commentary

The URL you want to pass tick (that's the bit that looks like elvin://dstc-elvin needs to have the dstc-elvin bit replaced with the hostname of your Elvin server.

The -g groupname argument to tick i sued to define the tickertape group your emssages are sent to. You'll want to tailor this.

Then add a subscription in your favourite tickertape client to add the group you specifed above.

Remember this is currently insecure (as the tickertape clients don't support Elvin4 security) so people could conceivably see the email of sender and subject of your mails (as if anybody cares :-). In the longer term tick actually has a -k argument and will allow you to attach keys for access control. Unfortunately tickertape doesn't support Elvin4 keys yet.

This bits above that look like: -m 'message/rfc822' -a '***** MAIL *****' are used to create an attachment to the ticker message so that folks like outlook users can click on it. I use mh-e and use this magic to make it talk to my emacs instead. There are other possibilities as well.