Results 1 to 4 of 4

Thread: Modifying to Send Email on Email Recieved

Hybrid View

  1. #1
    Join Date
    Aug 2011
    Posts
    1
    Rep Power
    4

    Default Modifying to Send Email on Email Recieved

    I need Zimbra to detect an incoming email and run some code. I'm new to Zimbra and am still learning how it all fits together, but from what I can tell there are a few ways to go about this.

    1. Does Zimbra already run a script when an email is received? If so I could just add a few lines.
    2. Does Zimbra log incoming email? If so I could check that every so often and see what new emails have come in.
    3. Could create a scheduled job to query the database for new emails since last check.

    Any ideas on where to go with this?

    --
    Some boring specifics: The people in the office don't check their work emails enough and are missing important stuff. My job is to send a notification email to their personal email address when they get new mail

  2. #2
    Join Date
    Dec 2006
    Location
    Minneapolis MN
    Posts
    777
    Rep Power
    9

    Default

    Hello,

    Zimbra does not run an external script when new email comes in.

    The MTA logs incoming email in /var/log/zimbra.log, and Zimbra logs when it is written to the user(s) mailboxes in /opt/zimbra/log/mailbox.log
    01 Networks, LLC / Cybernetik.net
    Zimbra NE and OSS Cloud Hosting
    Shared Web Hosting
    Consulting Services

  3. #3
    Join Date
    Oct 2009
    Location
    Tokyo
    Posts
    113
    Rep Power
    6

    Default

    As far as I know, you can do that by creating a Java class which implemnts com.zimbra.cs.lmtpserver.LmtpCallback interface's afterDelivery method
    and adding that to com.zimbra.cs.lmtpserver.ZimbraLmtpBackend with addCallback method.
    So that every time Zimbra Store receives an email with lmtp from ZimbraMTA, the afterDelivery method is called.
    Actually there are two lmtpcallback implematations already included in Zimbra Source Code.
    One is com.zimbra.cs.mailbox.Notification. The other is com.zimbra.cs.mailbox.QuotaWarning. (I think both Class names tell you what those are for.)
    Those must be some guide for you to do implementation.

    I think I wrote about this some months ago.
    Maybe I better write about this on Wiki.

    Anyway, I hope it will help you.

  4. #4
    Join Date
    Oct 2009
    Location
    Tokyo
    Posts
    113
    Rep Power
    6

    Default

    As I mentioned at the previous comment in this thread,
    I have started writing wiki about the functionality you can customize in ZimbraStore.

    Yutaka-Notes about Extensible Classes In ZimbraStore - Zimbra :: Wiki

Similar Threads

  1. [SOLVED] vCenter cannot use Zimbra to send email
    By bhwong in forum Administrators
    Replies: 2
    Last Post: 11-02-2010, 09:44 PM
  2. need advice on configuring zimbra to work with fax server
    By pheonix1t in forum Administrators
    Replies: 0
    Last Post: 07-11-2007, 08:46 PM
  3. upgrade to 4.0.3 antispam does'nt work
    By lucanannipieri in forum Administrators
    Replies: 14
    Last Post: 11-07-2006, 03:56 AM
  4. cannot send email to sina/yahoo
    By koolokamba in forum Administrators
    Replies: 2
    Last Post: 06-20-2006, 09:03 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •