Procmail for email notification to cell phone


#1

I have an email adress that I can forward email to to get them sent as sms/text messages to the phone. That way I get a notification of new mail.

All the spam is making the function rather useless (or at least tiresome). I’d like to have razor screen the emails and then only have the not spam-marked emails forwarded to my cell.

Seems like the mail filter set up in the admin panel doesn’t allow me to do it the way I thought of doing it:

  1. Have razor add “[SPAM]” to subject of spam email
  2. Filter out the emails whose Subject does not contain “[SPAM]”
  3. Send a COPY of these emails to another adress (the one with the sms service)

I guess i would need to set up my own procmail-file to do that?
It could be done with an intricate system of email addresses and mailboxes, but that seems like overkill and overly complicated.

Any suggestions?
Thanks
/jonaz


#2

Just filter messages tagged as spam by razor to another folder, and put a rule after that to forward remaining messages to your phone.

Note, though, that Razor isn’t really a very effective spam filter, so you’ll still probably get spam to your cell phone.

If you want to write your own procmail recipes, see the procmail article in kbase.


#3

Well, hopefully less spam at least…

Two thoughts though:

  • I’m POPping my mail, so moving spam to another folder would mean I would need to IMAP to review/delete (or use webmail)?

  • “forward remaining messages”… I would need to keep a copy of the messages in the mailbox for POP-retrival, since the phone address is only for notification (SMS-service only sends the first 255 chars)

/jonaz


#4

[quote]I’m POPping my mail, so moving spam to another folder would mean I would need to IMAP to review/delete (or use webmail)?

[/quote]

Yup. Or switch to IMAP in your regular mail client (which is a good idea anyway, especially if you ever use webmail at all).

[quote]“forward remaining messages”… I would need to keep a copy of the messages in the mailbox

[/quote]

Hrm - good point - I’m not sure if that’s possible to do with our mail filters. It is easy to do if you use procmail directly though. I used to do this with a recipe like this:

[ other rules ]

forward remaining messages to mobile, but leave a copy

:0c
! someaddress@example.com