3

Is it possible to have emails received by postfix delivered to a java program? I have a Linux system which uses Postfix to receive emails. I would like to use a Java program to process the raw email messages. In other words, I don't want to deal with protocols such as SMTP, IMAP, etc. I just want to the Postfix to pass the raw email message text to the Java program.

auser
  • 6,307
  • 13
  • 41
  • 63

1 Answers1

3

You can create a command alias in /etc/aliases, which has the form:

my-alias: "|/path/to/my/command param param"

Mail to my-alias@example.com will then be piped to command.

beerbajay
  • 19,652
  • 6
  • 58
  • 75