Results 1 to 4 of 4

Thread: Best way to send email from command line?

  1. #1
    Join Date
    Jan 2012
    Posts
    5
    Rep Power
    3

    Default Best way to send email from command line?

    Okay, I'm getting a series of emails from another program that need to be loaded into Zimbra somehow. I tried using Postfix directly, but that seems to randomly drop emails (emails the system is receiving will be randomly lost between the other program and Zimbra). So what's the best way to load emails into Zimbra from an outside program via command line? Is there some sort of command in Zimbra's binaries for this?

  2. #2
    Join Date
    Aug 2010
    Posts
    40
    Rep Power
    5

    Default

    (echo "Subject: SUBJECT_TO_BE_CHANGED";echo "MESSAGE_TO_BE_EDITED") | /opt/zimbra/postfix/sbin/sendmail user@domain.com


    Don't remove the "Subject:", it's a keyword, or your mail won't have any subject.

    Cheers

  3. #3
    Join Date
    Jan 2012
    Posts
    5
    Rep Power
    3

    Default

    Quote Originally Posted by nameless' View Post
    (echo "Subject: SUBJECT_TO_BE_CHANGED";echo "MESSAGE_TO_BE_EDITED") | /opt/zimbra/postfix/sbin/sendmail user@domain.com


    Don't remove the "Subject:", it's a keyword, or your mail won't have any subject.

    Cheers
    Like I said, I tried that, but it appears to randomly drop email (or at least, every once in a while an email won't appear in the system at all).

  4. #4
    Join Date
    Dec 2012
    Posts
    2
    Rep Power
    2

    Default ? recommended way to install /opt/zimbra/postfix/sbin/sendmail

    Quote Originally Posted by Dark Phoenix View Post
    Like I said, I tried that, but it appears to randomly drop email (or at least, every once in a while an email won't appear in the system at all).


    (echo "Subject: SUBJECT_TO_BE_CHANGED";echo "MESSAGE_TO_BE_EDITED") | /opt/zimbra/postfix/sbin/sendmail user@domain.com

    This is supposed to work, right? What is the recommended way of installing this sendmail on systems? Can I just copy the executable without going through and perform a whole install? I have a lot of systems that don't need to have Zimbra installed. Just the ability to send email from within scripts for notification or tracking purposes.

    I've seen email about installing sendemail but doing a quick test show it seems to have some bugs and gave me error for slightly longer messages (10 characters).


    Thanks,

    Derek

Similar Threads

  1. Modifying to Send Email on Email Recieved
    By redshot3 in forum Developers
    Replies: 3
    Last Post: 08-24-2011, 12:28 PM
  2. need advice on configuring zimbra to work with fax server
    By pheonix1t in forum Administrators
    Replies: 0
    Last Post: 07-11-2007, 07:46 PM
  3. upgrade to 4.0.3 antispam does'nt work
    By lucanannipieri in forum Administrators
    Replies: 14
    Last Post: 11-07-2006, 02:56 AM
  4. cannot send email to sina/yahoo
    By koolokamba in forum Administrators
    Replies: 2
    Last Post: 06-20-2006, 08:03 AM

Posting Permissions

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