{"id":20622327,"url":"https://github.com/smoeding/zabbix-sendmail","last_synced_at":"2025-03-06T23:22:49.254Z","repository":{"id":151615653,"uuid":"53892370","full_name":"smoeding/zabbix-sendmail","owner":"smoeding","description":"A native Zabbix Agent module to monitor Sendmail mail statistics","archived":false,"fork":false,"pushed_at":"2016-07-04T16:02:10.000Z","size":14,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T05:29:23.025Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smoeding.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-14T21:13:53.000Z","updated_at":"2020-11-19T08:47:50.000Z","dependencies_parsed_at":"2023-05-25T00:00:12.746Z","dependency_job_id":null,"html_url":"https://github.com/smoeding/zabbix-sendmail","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smoeding%2Fzabbix-sendmail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smoeding%2Fzabbix-sendmail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smoeding%2Fzabbix-sendmail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smoeding%2Fzabbix-sendmail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smoeding","download_url":"https://codeload.github.com/smoeding/zabbix-sendmail/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242300319,"owners_count":20105189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T12:22:15.247Z","updated_at":"2025-03-06T23:22:49.231Z","avatar_url":"https://github.com/smoeding.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"zabbix-sendmail\n===============\n\nA native Zabbix Agent module to monitor Sendmail mail statistics. It\nimplements additional item keys and allows the Zabbix Agent to read message\ncounters and sizes for each mailer from the Sendmail statistics file.\n\nBuild\n-----\n\nThe package uses `libtool` and `autotools` to build. The following commands\nshould get you going:\n\n```\n$ libtoolize\n$ aclocal -I m4\n$ autoheader\n$ autoconf\n$ automake --add-missing\n$ ./configure\n$ make\n```\n\nThe package needs access to the Zabbix source code during compilation. It\nexpects to find the sources in `/usr/src/zabbix`. This can be changed by\nadding the `--with-zabbix` option to the `configure` call.\n\nThere is also a Makefile target `deb` to build a Debian package.\n\nSetup\n-----\n\nInstall the file `sendmail.so` in the location defined by the Zabbix Agent\n`LoadModulePath` configuration parameter. The Debian package installs the\nfile in `/usr/lib/zabbix/modules`.\n\nAdd the setting `LoadModule=sendmail.so` to the Zabbix Agent configuration\nfile. This will be created automatically by the Debian package.\n\nThe user that runs the Zabbix Agent (`zabbix` in a default setup) needs to\nhave permission to read the Sendmail statistics file. There are two\npossibilities:\n\n- Add the user `zabbix` to the necessary group (`smmsp` on Debian).\n- Make sure the file is world-readable (if your security policy allows this).\n\nYou can test the setup by running the following command:\n\n```\n$ zabbix_agentd --print\n```\n\nThe output should include a number of `sendmail.*` keys. Then the Zabbix\nAgent can be restarted to pick up the new keys and make them available for\nmonitoring.\n\nAlso make sure that Sendmail is actually providing data in the statistics\nfile. Check your sendmail configuration file for the path of the staistics\nfile:\n\n```\n$ grep StatusFile /etc/mail/sendmail.cf\n```\n\nYou can use the `mailstats` utility to look at the data from the running\nSendmail daemon.\n\n```\n$ mailstats\nMTA statistics...\nStatistics from Wed Jul 22 20:02:04 2015\n M   msgsfr  bytes_from   msgsto    bytes_to  msgsrej msgsdis msgsqur  Mailer\n 3       15        145K        0          0K        0       0       0  smtp\n 4     1071      61483K      137      11664K     1681       0       0  esmtp\n 7        0          0K       21        292K        0       0       0  relay\n 8      907      14463K     1867      66122K       97       0       0  local\n=====================================================================\n T     1993      76091K     2025      78078K     1778       0       0\n C    35374                 2044                15610\n```\n\nThis output also tells you the number of the mailer (column M).\n\nUsage\n-----\n\nYou need to configure monitoring items in Zabbix using the provided keys.\nThere are three keys that monitor global statistics of the Sendmail daemon:\n\n- `sendmail.conn.from`: number of connections that have been initiated by a\n  remote host.\n- `sendmail.conn.to`: number of times the daemon has tried to connect to a\n  remote host.\n- `sendmail.conn.rejected`: the number of times the daemon has rejected a\n  connection request from a remote.\n\nConfiguration of these three keys in Zabbix items requires the filename of\nthe Sendmail statistics file as argument.\n\nThe following keys are available for monitoring individual mailer statistics:\n\n- `sendmail.mailer.msgs.from`: number of messages received from the mailer.\n- `sendmail.mailer.kbytes.from`: number of bytes received from the mailer.\n- `sendmail.mailer.msgs.to`: number of messages sent via the mailer.\n- `sendmail.mailer.kbytes.to`: number of bytes sent via the mailer.\n- `sendmail.mailer.msgs.rejected`: number of messages rejected by the mailer.\n- `sendmail.mailer.msgs.discarded`: number of messages discarded by the\n  mailer.\n- `sendmail.mailer.msgs.quarantined`: number of messages quarantined by the\n  mailer.\n\nThese keys require the filename of the Sendmail statistics file and the\nnumber of the mailer as arguments. Use the `mailstats` utility provided by\nSendmail to check the configured mailers and their respective number.\n\nCopyrights\n----------\n\nCopyright (c) 2016 Stefan Möding\n\nexcept for the following files\n\n`src/mailstats.h`:\n\n```\nCopyright (c) 1998, 1999 Proofpoint, Inc. and its suppliers.\nAll rights reserved.\nCopyright (c) 1983 Eric P. Allman.  All rights reserved.\nCopyright (c) 1988, 1993\nThe Regents of the University of California.  All rights reserved.\n```\n\n`m4/ax_lib_zabbix.m4`:\n\n```\nCopyright (c) 2016 Ryan Armstrong \u003cryan@cavaliercoder.com\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmoeding%2Fzabbix-sendmail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmoeding%2Fzabbix-sendmail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmoeding%2Fzabbix-sendmail/lists"}