1

In Github, you can reply directly to the mails that they send you.

Their mail servers will "detect" that you sent it, and then my python script will act accordingly.

I'm looking for a good overview answer or a link to a tutorial that goes through this.

What is this setup called?

3
  • Are you asking how to have your mail server automatically respond to new mail arriving locally, or to respond automatically to new mail arriving somewhere else?
    – MadHatter
    Mar 30, 2013 at 8:16
  • I have a mail server. I use it to send and receive emails (postfix and dovecot). When this mail server receives an email (for example: [email protected]), I want my postfix to catch messages sent to this email. Then, my python script will act accordingly. My python script would probably check the messages ID in the subject, and do an API POST request to my API servers.
    – Alex
    Mar 30, 2013 at 8:33
  • I'm just looking for the best practice to implement something like this. When Github sends you a message, you can "reply directly to this email", and their mail server catches it, inserts the message into the database.
    – Alex
    Mar 30, 2013 at 8:34

3 Answers 3

2

For simple automated responses, Dennis' suggestion is sound. The vacation program is also an ancient, honourable and extensively-tested piece of software to build simple autoresponses around, and it has all the necessary tests to avoid autoresponder storms (where two autoresponders start talking to each other, very very fast, and fill up your email spool).

For something more sophisticated, which you seem to be alluding to, where multiple emails are related to each other, something like RT might be a good place to start: emails to particular recipients are ducted into RT, and the first in the chain creates an autoresponse with a custom Subject: line, and as long as anyone who replies to that email preserves the RT token in the subject line, future replies will end up in the right thread inside the RT database.

1

Postfix can do what you want, by creating custom transports. Make this email address an alias to an address on a nonexistent domain, and define your script as transport for this domain. If you also want to receive the mail yourself, make it an alias to yourself and that nonexistent domain. I used this trick to send mails to an autoreply script when employees are on holiday.

4
  • Is there a step-by-step tutorial on this?
    – Alex
    Mar 31, 2013 at 0:47
  • Can't think of any. Just read transport(5) and master(5) and go from there :) Mar 31, 2013 at 8:11
  • Why do I need a "Nonexistent" domain? what does that mean?
    – Alex
    Mar 31, 2013 at 8:24
  • You need to use a separate domain, as transports are easiest done per domain. Why waste a real domain on it when something like alex.automates.mail works too as domain? Mar 31, 2013 at 8:40
0

I'm using alias | piping. This seems to work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .