Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This is something I haven't done before... So not sure what some good resources or a solid starting point would be.

What I want to do... is on my Ubuntu Server 10.10 box, I need to setup a mailbox... lets call it: OnCall. When this mail-box receives a messages, I want to process it with something (bash most likely, although I'm not averse to learning something in something else).

Say I get a message:

From: Program@localhost
To: OnCall@localhost
Subject: Error Message
My Program generated an error that you should know about... #page JDoe

It would then process the message through a secondary system (Log into secondary system using an already existing pager system, that includes a scheduler for the OnCall person, phone numbers, etc).

Logon to remote system >>
Page: JDoe
Subject: Error Message
Body My Program generated an error that you should know about...

If something already exists (doesn't it always?) that would be awesome... otherwise, I need to roll something simple of my own. Rather than fumbling around, figured I'd get expert advice first.

share|improve this question

1 Answer 1

For the first part of the problem you can use procmail or maildrop to pipe incoming messages to external programs based on filter rules.

This will allow you to capture messages coming in and discriminate about what to forward on.

The second part, I think that would require custom scripting on your part to handle your specific implementation details. Once you have it written you can pipe the mail to it using your procmail or maildrop rules.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.