Ad Widget

Collapse

Media: SMTP Configuation Parameters Missing in Zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lostmarbles
    Member
    • Mar 2009
    • 50

    #1

    Media: SMTP Configuation Parameters Missing in Zabbix

    Hey!

    We set up some Actions with Email as Media and noticed that we were very limited in setting up email.

    For example, if we want to use our Google account as a relay, we cannot because there are no parameters in the Media config area to set up authentication, userID, password, SSL, TLS, ports, etc.

    For example, see gmail POP setup:

    Incoming Mail (POP3) Server - requires SSL: pop.gmail.com
    Use SSL: Yes
    Port: 995
    Outgoing Mail (SMTP) Server - requires TLS: smtp.gmail.com (use authentication)
    Use Authentication: Yes
    Use STARTTLS: Yes (some clients call this SSL)
    Port: 465 or 587
    Account Name: your full email address (including @gmail.com or @your_domain.com)
    Email Address: your email address ([email protected] or username@your_domain.com)
    Password: your Gmail password
    This does not work with the limited Zabbix configuration available.
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #2
    A possible workaround (yes this may be annoying, but it will be more flexible in the end) is to setup postfix to route mails to google on your behalf. You can setup a forwarding rule to connect to an smtp server using an username and password.

    But ya, having the ability you discussed would be nicer. :-)
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

    Comment

    • lostmarbles
      Member
      • Mar 2009
      • 50

      #3
      Hi nelsonab,

      The whole point of using GMail as a relay is to NOT have sendmail or postfix running on the zabbix box; so if I were to configure postfix, it would defeat the purpose I am looking for.

      In other words, installing/configuration postfix is not a workaround

      I simple don't understand why zabbix has such minimal email support. It is pretty basic so post mail via a relay not on the same server and most servers require basic authentication parameters.

      Comment

      • nelsonab
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2006
        • 1233

        #4
        Originally posted by lostmarbles
        Hi nelsonab,

        The whole point of using GMail as a relay is to NOT have sendmail or postfix running on the zabbix box; so if I were to configure postfix, it would defeat the purpose I am looking for.

        In other words, installing/configuration postfix is not a workaround

        I simple don't understand why zabbix has such minimal email support. It is pretty basic so post mail via a relay not on the same server and most servers require basic authentication parameters.
        I disagree, it is a workaround, but it's not an easy workaround. Zabbix comes from the Unix world where a local MTA is somewhat common and it's the job of that MTA to handle the delivery of mail.

        Another workaround is to write an external script which takes the message and then connects to your external MTA and sends the message. The configuration would be similar to SMS.
        RHCE, author of zbxapi
        Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
        Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

        Comment

        • lostmarbles
          Member
          • Mar 2009
          • 50

          #5
          Hi Nelsonab,

          First of all, I don't think you can disagree with our requirements. Our requirements are NOT to run postfix or sendmail or any other MTA on the server where Zabbix is running.

          So, you are basically telling us, which I find a bit laughable, sorry to be so direct, that we must change our requirements because "zabbix comes from the unix world"... I am sorry to reply to you so strongly, but that is so wrong. Unix/Linux has been using authenticated SMTP mail as long as I can remember. And, if you view the first post, you will notice that we were trying to use our Google account, which is a Linux/Unix server, as I recall.

          Hence, you can argue with me all day long, if it pleases you, but your arguments for Zabbix not having basic SMTP authentication features are so off-the-wall, that I think it is best we simply discontinue this discussion.

          How about let's agree to disagree and you not respond to this thread, since it is my thread, I have the requirements (not you), and I don't need you to tell me how to configure a server or lecture on UNIX, Linux or SMTP mail, LOL.

          Your replies on this topic are not helpful. If we wanted to run postfix or sendmail, we would have done it and not posted here. We want to use a different MTA and the zabbix interface does not work for any authenticated SMTP server, Unix, Linux or otherwise.

          Comment

          • nelsonab
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Sep 2006
            • 1233

            #6
            What's more important? Solving your problem or fitting your requirements to the letter? What I am suggesting is to think somewhat outside the box to solve your overall goal which is to use Google Mail TLS. The postfix suggestion is just a *step* in the process to achieve your goal.

            As I said last time, you can also look at writing an external script which will communicate directly to an external MTA. The script would be similar in implementation to how SMS is done. A script is not an MTA. There are several posts in the forum on this. I have not had to write one or I would send you one, though I am half tempted to write one for you.

            Alternatively I'm sure Zabbix would gladly add TLS sooner if sponsored. In addition Zabbix is open source, you are free to add the feature yourself and submit it back so that others can benifit from your work.

            If any of this is not acceptable to you today, I'm sorry, that's where it is TODAY. Tomorrow is a different story and you may find all the features you need and then some.

            In the 4-5 years I've been using Zabbix I have found it to be a very powerful program, though at times the learning curve can be a little frustrating. There are many ways to do what you want to do, let those of us in the forum help you get there, all that I'm asking is that you think a little outside the box.
            RHCE, author of zbxapi
            Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
            Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

            Comment

            • NOB
              Senior Member
              Zabbix Certified Specialist
              • Mar 2007
              • 469

              #7
              Hi

              I agree, that this area in ZABBIX might need some enhancements.
              And, of course, nobody wants to use a real mail server whenever possible, just to avoid fixing security holes, doing updates, etc. for another piece of software.

              If you don't want to use postfix, sendmail, etc. on the server, why not use
              delegate as an SMTP Gateway.
              This is a small and very stable piece of software, relatively easy to configure, rather secure and it will do what you want. Of course, it's just a workaround.

              We are using delegate (and ZABBIX) to send SMS via mail to an external SMS provider and route internal mails via the internal mail server.

              Don't you have an internal mail server ?

              If not, I am afraid, you'll have to either enhance ZABBIX - you are
              welcome - or use, e.g., delegate.


              Hope this helps

              Norbert.

              Comment

              • neofutur
                Junior Member
                • Dec 2009
                • 1

                #8
                same need

                Hi all

                I have the same SMTPS ( TLS ) need.

                I already successfully hacked a newsletter spip plugin to add SMTPS support , and I ll consider trying to do the same for zabbix.

                I really think SMTPS support is a "must have" feature for zabbix, since more and more provider are supporting it ( gmail is just the first one to make SMTPS required )

                My question is :

                If someone ( possibly me ) provide a patch adding SMTPS ( TLS ) support to zabbix, would this patch probably be accepted ( ie could the main developpers be interested in adding this feature ?) and included in the main tree ?

                Edit:
                I already added fields for SMTPS/TLS in the media types form( pretty easy to dive in zabbix, it seems well coded
                and im the database ( media_type table )

                Here comes the sending mail coding;

                phpmailer ( http://sourceforge.net/projects/phpm...0for%20php5_6/ ) have all the necessary to make it and I think the best way to make it would be to integrate it ( it s LGPL software and already included in many projects ), better than implementing only TLS as I was going to make it.

                Edit2:
                Hum the mailing part is in the C code, not in the PHP frontend, will be harder than just including phpmailer . . .
                /me having a look at src/libs/zbxemail . . .
                A little doc for implementing SMTPS in C :
                SMTPS : http://www.coastrd.com/smtps


                and C++ code examples on http://www.coastrd.com/download ( using cryptlib )

                Edit 3:
                Other docs and C examples to use SMTPS in C ( previous ones not working for me on linux ) :
                http://stackoverflow.com/questions/1...sing-smpts-tls
                http://stackoverflow.com/questions/1...using-smpts-tl

                Edit 4 ( last edit this seems to be the best answer) :

                the best solution seems to use the small ssmtp package from :

                easy config :


                question to zabbix developpers : you prefer including the code in zabbix src/libs/zbxemail or just requesting the user to install ssmtp on his server and just use ir fron zabbix server ?
                Last edited by neofutur; 13-12-2009, 00:45. Reason: worked on it ;)

                Comment

                • nelsonab
                  Senior Member
                  Zabbix Certified SpecialistZabbix Certified Professional
                  • Sep 2006
                  • 1233

                  #9
                  Originally posted by neofutur
                  Hi all

                  I have the same SMTPS ( TLS ) need.
                  Check the features requested tracker https://support.zabbix.com. If it is not added there create a ticket for it to be requested in the next release.
                  RHCE, author of zbxapi
                  Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
                  Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

                  Comment

                  • rajsand
                    Junior Member
                    • Dec 2009
                    • 6

                    #10
                    Greetings,


                    Newbie question:

                    Originally posted by neofutur
                    Edit 4 ( last edit this seems to be the best answer) :

                    the best solution seems to use the small ssmtp package from :

                    easy config :

                    Could you please care to share what you did to get it going?

                    After following the installation instructions, Only root user seems to be able to use that.

                    I am certainly a newbie to MTA and the such

                    Regards

                    Rajagopal

                    Comment

                    Working...