├── ChangeLog ├── LICENSE ├── MANIFEST ├── Makefile.PL ├── README ├── TODO ├── cgi-bin ├── lang │ ├── ERROR_CODE │ ├── bg_BG │ ├── de_DE │ ├── en_US │ ├── es_ES │ ├── fr_FR │ ├── it_IT │ ├── pt_BR │ └── ru_RU └── sa_report.cgi ├── debian ├── changelog ├── compat ├── control ├── copyright ├── dirs ├── docs ├── files ├── install ├── rules ├── sendmailanalyzer.apache.conf ├── sendmailanalyzer.conf ├── sendmailanalyzer.cron.d ├── sendmailanalyzer.init ├── sendmailanalyzer.manpages └── source │ └── format ├── doc ├── sa_cache.pod └── sendmailanalyzer.pod ├── docker ├── Dockerfile ├── docker-compose.yml.example ├── httpd.conf ├── sa_cache.sh └── supervisord.conf ├── flotr2.js ├── packaging ├── README ├── RPM │ └── sendmailanalyzer.spec └── slackbuild │ ├── README │ ├── doinst.sh │ ├── sendmailanalyzer.info │ ├── sendmailanalyzer.slackBuild │ └── slack-desc ├── sa_cache ├── salogo.png ├── sendmailanalyzer ├── sorttable.js └── start_scripts ├── README ├── rc.sendmailanalyzer ├── sendmailanalyzer ├── sendmailanalyzer.gentoo └── sendmailanalyzer.service /ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darold/sendmailanalyzer/7dbc6c53014571dd85fa3f53a9e683b5b142eb59/ChangeLog -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | -------------------------------------------------------------------------------- /MANIFEST: -------------------------------------------------------------------------------- 1 | ChangeLog 2 | Makefile.PL 3 | README 4 | sendmailanalyzer 5 | sa_cache 6 | salogo.png 7 | flotr2.js 8 | sorttable.js 9 | cgi-bin/sa_report.cgi 10 | cgi-bin/lang/ERROR_CODE 11 | cgi-bin/lang/en_US 12 | cgi-bin/lang/fr_FR 13 | cgi-bin/lang/es_ES 14 | cgi-bin/lang/bg_BG 15 | cgi-bin/lang/de_DE 16 | cgi-bin/lang/it_IT 17 | cgi-bin/lang/pt_BR 18 | cgi-bin/lang/ru_RU 19 | doc/sendmailanalyzer.pod 20 | doc/sa_cache.pod 21 | start_scripts/rc.sendmailanalyzer 22 | start_scripts/sendmailanalyzer 23 | LICENSE 24 | TODO 25 | MANIFEST 26 | -------------------------------------------------------------------------------- /Makefile.PL: -------------------------------------------------------------------------------- 1 | use ExtUtils::MakeMaker qw(prompt WriteMakefile); 2 | 3 | my @ALLOWED_ARGS = ('LOGFILE','BINDIR','CONFDIR','PIDDIR','BASEDIR','HTMLDIR','MANDIR','DOCDIR','DESTDIR','QUIET','INSTALLDIRS'); 4 | 5 | # Parse command line arguments and store them as environment variables 6 | while ($_ = shift) { 7 | my ($k,$v) = split(/=/, $_, 2); 8 | if (grep(/^$k$/, @ALLOWED_ARGS)) { 9 | $ENV{$k} = $v; 10 | } 11 | } 12 | $ENV{DESTDIR} =~ s/\/$//; 13 | 14 | # Default install path 15 | my $LOGFILE = $ENV{LOGFILE} || '/var/log/maillog'; 16 | my $BINDIR = $ENV{BINDIR} || '/usr/local/sendmailanalyzer'; 17 | my $CONFDIR = $ENV{CONFDIR} || '/usr/local/sendmailanalyzer'; 18 | my $PIDDIR = $ENV{PIDDIR} || '/var/run'; 19 | my $BASEDIR = $ENV{BASEDIR} || '/usr/local/sendmailanalyzer/data'; 20 | my $HTMLDIR = $ENV{HTMLDIR} || '/usr/local/sendmailanalyzer/www'; 21 | my $MANDIR = $ENV{MANDIR} || '/usr/local/sendmailanalyzer/doc'; 22 | my $DOCDIR = $ENV{DOCDIR} || '/usr/local/sendmailanalyzer/doc'; 23 | my $DESTDIR = $ENV{DESTDIR} || ''; 24 | $ENV{INSTALLDIRS} ||= 'vendor'; 25 | 26 | # Try to find all binary used by SysUsage 27 | my $tail = `which tail`; 28 | chomp($tail); 29 | if (!$tail) { 30 | die "NOTICE: This tool requires system command: tail, can't find it in your path\n"; 31 | } 32 | my $grep = `which grep`; 33 | chomp($grep); 34 | if (!$grep) { 35 | die "NOTICE: This tool requires the sysstat package, can't find grep in your path\n"; 36 | } 37 | my $zcat = `which zcat`; 38 | chomp($zcat); 39 | 40 | 41 | 42 | # Setup ok. generating sendmailanalyzer.conf config file 43 | unless(open(OUTCFG, ">sendmailanalyzer.conf")) { 44 | print "\nError: can't write config file sendmailanalyzer.conf, $!\n"; 45 | exit 0; 46 | } 47 | 48 | print OUTCFG qq{ 49 | # Path to the maillog file to analyse. 50 | # Can be overwritten with --log or -l 51 | LOG_FILE $LOGFILE 52 | 53 | # journalctl command to use instead of log file entry. For postfix 54 | # it migth be set to the following. When enabled, the LOG_FILE 55 | # configuration directive above is just ommitted. Note that in daemon 56 | # mode sendmailanalyzer will automatically add the -f option to the 57 | # command. The additional option: --output="short-iso" is also always 58 | # used to format timestamp. Can be overwritten with --journalctl or 59 | # -j options. 60 | #JOURNALCTL_CMD journalctl -u postfix 61 | 62 | # Path to store the pid file (sendmailanalyzer.pid). 63 | PID_DIR $PIDDIR 64 | 65 | # Path to the system tail command. 66 | # Can be overwritten with --tail or -t 67 | TAIL_PROG $tail 68 | 69 | # tail system command argument to pass. 70 | # Can be overwritten with --args or -a 71 | TAIL_ARGS -n 0 -F 72 | 73 | # zcat system command used to parse compressed log file 74 | ZCAT_PROG $zcat 75 | 76 | # Output directory for data storage. 77 | # Can be overwritten with --output or -o 78 | OUT_DIR $BASEDIR 79 | 80 | # Turn on/off debug mode. 81 | # Can be overwritten with --debug or -d 82 | DEBUG 0 83 | 84 | # Parse maillog from begining before running tail program. Default 85 | # is to read LAST_PARSED file to start from last collected event. 86 | # Can be overwritten with --full or -f 87 | FULL 0 88 | 89 | # Parse maillog from begining before running tail program but 90 | # force sendmailanalyzer to never use the LAST_PARSED file. 91 | # Can be overwritten with --force or -F 92 | FORCE 0 93 | 94 | # Do not run tail program and exit after a full parsing of the log file 95 | # Can be overwritten with --break or -b 96 | BREAK 0 97 | 98 | # Delay in second to flush to disk collected data. 99 | # Can be overwritten with --write-delay or -w 100 | DELAY 5 101 | 102 | # Syslog name of the MTA. Syslog write it to maillog with the pid as follow: 103 | # ... sendmail[1234] ... This is required to only parse relevant logged lines 104 | # Can be overwritten with --sendmail or -s 105 | # You can set multiple Syslog name as a list separated by a pipe '|' 106 | MTA_NAME sm-mta|sendmail|postfix|spampd|postscreen 107 | 108 | # Exclude all lines matching a regexp from being parsed, for example to 109 | # exclude log line reported by the randomizer script, skip line with the 110 | # following regex. Character # in the regex need to be escaped with a backslash. 111 | # Use it to prevent unwanted line to be reported in Rejection reports. 112 | #EXCLUDE_LINE postfix/randomizer 113 | 114 | # Syslog name of MailScanner. Syslog write it to maillog with the pid as follow: 115 | # ... MailScanner[1234] ... This is required to only parse relevant logged lines 116 | # Can be overwritten with --mailscanner or -m 117 | MAILSCAN_NAME MailScanner 118 | 119 | # Number of object displayed in the top statistics 120 | TOP 25 121 | 122 | # Number of object displayed in the top mailbox statistics 123 | TOP_MBOX 25 124 | 125 | # Space separated list of ip addresses of the mail hubs (where email are redirected 126 | # if this host is a gateway or a hub) 127 | MAIL_HUB 128 | 129 | # Space separated list of ip addresses of the MTA gateway (where external mail 130 | # comes from if this host is a hub or a delivery system) 131 | MAIL_GW 132 | 133 | # Default domain or hostname to add to an email address if there's just the 134 | # username. When the host is a delivery system it is possible that the user 135 | # email address do not have the domain part (ex: \@domain.com). By default 136 | # SendmailAnalyzer will add the '\@localhost' domain but you may want to change 137 | # this domain, so use this directive 138 | DEFAULT_DOMAIN \@localhost 139 | 140 | # Max number of recipient per message to report sender 141 | MAX_RCPT 25 142 | 143 | # Max size per message to report sender in byte 144 | MAX_SIZE 10000000 145 | 146 | # Select sa_cache freeing space method: 147 | # - delete: remove all daily data files before the current month 148 | # - archive: make a gzipped tarbal of all data files before the current month 149 | # - none: don't do anything. Need lot of space disk. 150 | # Default is delete. 151 | FREE_SPACE archive 152 | 153 | # Force sa_cache to free space each week instead of monthly by default. 154 | WEEKLY_FREE_SPACE 0 155 | 156 | # Compute statistics and cache for a list of domain and display a link in the 157 | # front page for a per domain access. See DOMAIN_USER if you want to grant 158 | # special access on these pages. You can have multiple DOMAIN_REPORT lines 159 | # for better reading. 160 | # If you are running rsyslog with multiple host use DOMAIN_HOST_REPORT instead. 161 | # See DOMAIN_USER if you want to grant special access on these pages. 162 | #DOMAIN_REPORT domain1.com,domain2.com 163 | 164 | # Same as above but with host distinction for use with rsyslog. 165 | # You can have multiple LOCAL_HOST_DOMAIN lines, ie: one per host. 166 | #DOMAIN_HOST_REPORT sysloghost1 domain1.com,domain2.com 167 | #DOMAIN_HOST_REPORT sysloghost2 domain3.com,domain4.com 168 | 169 | # Path to the language translation file (relative to the CGI directory). 170 | # Default: lang/en_US 171 | #LANG lang/fr_FR 172 | 173 | # Size Unit to use, default is Bytes. Other values are KBytes and MBytes 174 | SIZE_UNIT MBytes 175 | 176 | # Max line to show in detail view. Default is 100 177 | MAX_LINE 100 178 | 179 | # List of admin users separated by comma 180 | # They will have full access to all report 181 | #ADMIN sa_admin 182 | 183 | #List of per user domain access control. The first field is the username and 184 | #the second field (separated by tabulation) is a comma separated list of domain 185 | #name to be allowed to this user. You could add as many lines of DOMAIN_USER 186 | #as you want in the configuration file. 187 | #DOMAIN_USER user1 domain1.com,domain3.com 188 | #DOMAIN_USER user2 domain2.com,... 189 | 190 | # Path to the Sendmail.org logo. Default current directory 191 | URL_LOGO salogo.png 192 | 193 | # Path to the flotr2 javascript library. Default current directory 194 | URL_JSCRIPT flotr2.js 195 | 196 | # Path to the sortable javascript library. Default current directory 197 | URL_SORTABLE sorttable.js 198 | 199 | # Syslog name of Amavis. Syslog write it to maillog with the pid as follow: 200 | # ... amavis[1234] ... This is required to only parse relevant logged lines 201 | AMAVIS_NAME \\/usr\\/sbin\\/amavisd-new|amavis|maiad 202 | 203 | # Path to SMTP error code file (relative to the CGI directory) 204 | # Default: lang/ERROR_CODE 205 | ERROR_CODE lang/ERROR_CODE 206 | 207 | # Comma separated list of internal domain to be used when sendmailanalyzer is 208 | # running on a mail host which received message from any side. SA can't know 209 | # what message are internal or external in this case, so the only way to know 210 | # if a mail come from Internet or Lan/Wan is to check the domain part of the 211 | # relay sender address. You can have multiple LOCAL_DOMAIN lines for better 212 | # reading. You can also give a file containing a list of domain, one per line. 213 | # If you are running rsyslog with multiple host use LOCAL_HOST_DOMAIN instead. 214 | # See VIRTUAL_DOMAIN_DB bellow if your virtual domains are stored in a database. 215 | #LOCAL_DOMAIN domain1.com,domain2.com 216 | 217 | # Same as above but with host distinction for use with rsyslog. 218 | # You can have multiple LOCAL_HOST_DOMAIN lines, ie: one per host. 219 | #LOCAL_HOST_DOMAIN sysloghost1 domain1.com,domain2.com 220 | 221 | # If you're running a mailserver with virtual domains in a database this option 222 | # will allow sendmailanalyzer to perform domain-lookups in the database to 223 | # determine whether this domain is external or internal (like the LOCAL_DOMAIN 224 | # option above. This will come with decent database load depending on how much 225 | # traffic your mailserver experiences as every domain will be matched against 226 | # your database. 227 | # Leave this unconfigured if you don't have virtual domains in a database set up 228 | # otherwise sendmailanalyzer will exit with an error. 229 | #VIRTUAL_DOMAIN_DB DBI:mysql:database=mailserver:host=localhost 230 | #VIRTUAL_DOMAIN_DB DBI:Pg:dbname=mailserver;host=localhost;port=5432 231 | 232 | # Username for the database connection 233 | #VIRTUAL_DOMAIN_DB_USER username 234 | 235 | # Password for the database connection 236 | #VIRTUAL_DOMAIN_DB_PASS secret 237 | 238 | # Query to select the list of domain from the database. Sendmailanalyzer will 239 | # load the list into the LOCAL_DOMAIN array. This list will be checked against 240 | # sender or recipient relay to determine the email direction. 241 | #VIRTUAL_DOMAIN_DB_QUERY SELECT name FROM virtual_domains 242 | 243 | # Syslog name of MimeDefang. Syslog write it to maillog with the pid as follow: 244 | # ... mimedefang.pl[1234] ... This is required to only parse relevant logged lines 245 | # Based on parsing mimedefang log generated by method md_graphdefang_log() 246 | MD_NAME mimedefang.pl 247 | 248 | # Anonymize reports. This remove sender and recipient adresses from reports. 249 | ANONYMIZE 0 250 | 251 | # Replace some hostname in all relay information for anonymization 252 | # You must used one REPLACE_HOST line per replacement. 253 | REPLACE_HOST internal.relay.dom external.relay.dom 254 | 255 | # Make report for Spam detail. Default is enable. This allow you to see score 256 | # and complete detail of your favorite antispam. 257 | SPAM_DETAIL 1 258 | 259 | # Enable/Disable SMTP Auth view. Note that it is already disable in per domain 260 | # views. Default show it: 1 261 | SMTP_AUTH 1 262 | 263 | # Enable/Disable Spam views. Default show it: 1 264 | SPAM_VIEW 1 265 | 266 | # Enable/Disable Virus views. Default show it: 1 267 | VIRUS_VIEW 1 268 | 269 | # Enable/Disable Notification views. Default show it: 1 270 | DSN_VIEW 1 271 | 272 | # Enable/Disable Postgrey usage views. Default show it: 1 273 | POSTGREY_VIEW 1 274 | 275 | # List of antispam name separated by a comma used for Spam details view. You may 276 | # want to custom this list to just show menu link on available reports. Default 277 | # list is: spamdmilter,jchkmail,dnsbl,spamassassin,amavis,mimedefang,dnsblmilter,spamd,policydweight 278 | SPAM_TOOLS spamdmilter,jchkmail,dnsbl,spamassassin,amavis,mimedefang,dnsblmilter,spamd,policydweight 279 | 280 | # Enable/Disable messaging/spam/virus/dsn direction statistics. Default is show. 281 | # On some mailhost this could show wrong information if the direction could 282 | # not be easily determined. So you can remove these views by setting it to 0. 283 | SHOW_DIRECTION 1 284 | 285 | # Use to combined mailhost report on a single report. This allow you to 286 | # aggregate multiple mailhost that syslogs to a remote server throught 287 | # rsyslog to have only one SendmailAnalyzer report. The value must only use 288 | # alphanumeric character as it is used to create subdirectory. 289 | #MERGING_HOST agghostname 290 | 291 | # Syslog name of Clamd. When using Mailscanner with clamd if you want virus 292 | # report you must configure clamd to log with syslog and use LOCAL_MAIL. 293 | # ... clamd[1234] ... 294 | # Can be overwritten with --clamd or -n 295 | CLAMD_NAME clamd 296 | 297 | # Syslog name of Clamsmtpd. 298 | # ... clamsmtpd: ... 299 | CLAMSMTPD_NAME clamsmtpd 300 | 301 | # Syslog name of Postgrey. Syslog write it to maillog with the pid as follow: 302 | # ... postgrey[1234] ... This is required to only parse relevant logged lines 303 | # Can be overwritten with --postgrey or -g 304 | POSTGREY_NAME postgrey|sqlgrey 305 | 306 | # Syslog name of SPF and DKIM log entry. Syslog write it to maillog with the 307 | # pid as follow: ... opendmarc[1234] ... 308 | SPF_DKIM_NAME opendmarc|opendkim 309 | 310 | # HTML charset to use. Default is iso-8859-1, but with cyrillics you may want 311 | # to use utf-8 instead. 312 | #HTML_CHARSET utf-8 313 | 314 | # Use this to set the recipient relay used for local delivery if your message 315 | # appears twice in details view and in messaging, sender and recipient counter. 316 | # This is especially right with postfix configured to have local delivery 317 | # via dovecot service. Default: dovecot, that mean that recipient log lines with 318 | # relay=dovecot will instruct sendmailanalyzer to skip those messages. One 319 | # other common value is 127.0.0.1 320 | SKIP_RCPT_RELAY dovecot 321 | 322 | # Syslog name of Spamd. Syslog write it to maillog with the pid as follow: 323 | # ... spamd[1234] ... This is required to only parse relevant logged lines 324 | # Can be overwritten with --spamd 325 | SPAMD_NAME spamd 326 | 327 | # Pipe separated list of destination email address that should be excluded 328 | # from the report. They will not be reported into data files too. The value 329 | # should be a valid regex, the addresses will be search in all destination 330 | # adresses like \$TO =~ /^\$EXCLUDE_TO\$/ 331 | EXCLUDE_TO bcc-addr1\@domain1.com|bcc-addr2\@domain2.com 332 | 333 | # Pipe separated list of sender email address that should be excluded 334 | # from the report. They will not be reported into data files too. The value 335 | # should be a valid regex, the addresses will be search in all senders 336 | # adresses like \$FROM =~ /^\$EXCLUDE_FROM\$/ 337 | EXCLUDE_FROM addr1\@domain1.com|addr2\@domain2.com 338 | 339 | # Pipe separated list of sender relay ip addresses that should be excluded 340 | # from the report. They will not be reported into data files too. The value 341 | # should be a valid regex, the addresses will be search in all senders relay 342 | # ip adresses like \$RELAY =~ /^\$EXCLUDE_RELAY\$/ 343 | EXCLUDE_RELAY addr1\@domain1.com|addr2\@domain2.com 344 | 345 | # When enabled it allow email subjects to be shown in detailed view. Of course 346 | # The log file must contain this information. 347 | SHOW_SUBJECT 0 348 | 349 | # When activated, remove domain part of the syslog hostname. Some programme 350 | # use FQDN instead of the single hostname. Set it to 1 if you have two report 351 | # for the same hostname but one with the domain part. 352 | NO_HOST_DOMAIN 0 353 | 354 | # On some MTA, message delivery is done outside and only queuing is logged, 355 | # this mean that messages are counted as incoming but not delivered. Enable 356 | # this directive to force sendmailanalyzer to take them as sent. 357 | NO_QUEUE_EXCLUSION 0 358 | 359 | # When possible sendmailanalyzer extract the fqdn part of the sender or 360 | # recipient relay. Enable this directive if you just want Ip addresses. 361 | RELAY_IP_ONLY 0 362 | 363 | # Threshold to detect case where postscreen reject an ip address. By 364 | # default reject: RCPT from ... are not logged by postfix, we mark the 365 | # message as DNSBL rejected when DNSBL rank value is upper or equal. 366 | POSTSCREEN_DNSBL_THRESHOLD 3 367 | 368 | # Use this directive to defined a custom regular expression that will be applied 369 | # on status part of a Postfix milter-reject message. A Postfix milter-reject 370 | # message is of the form: milter-reject: END-OF-MESSAGE from ... The default is 371 | # to treat any message with status not containing string "Spam message rejected" 372 | # as rejected. If you want to treat other messages as spam instead of rejected 373 | # you can give a regexp that can catch them. For example 374 | # MILTER_REJECT_REGEX Mailbox not found 375 | # will treat all messages with a status including "Mailbox not found" as spam. 376 | # The value must be a valid Perl regular expression. 377 | MILTER_REJECT_REGEX 378 | 379 | }; 380 | close(OUTCFG); 381 | 382 | unless(open(INST, ">install_all.sh")) { 383 | print "\nError: can't write post install file install_all.sh, $!\n"; 384 | exit 0; 385 | } 386 | print INST qq{#!/bin/sh 387 | if [ ! -d "$DESTDIR$BINDIR" ]; then 388 | mkdir -p $DESTDIR$BINDIR 389 | fi 390 | if [ ! -d "$DESTDIR$CONFDIR" ]; then 391 | mkdir -p $DESTDIR$CONFDIR 392 | fi 393 | if [ ! -d "$DESTDIR$HTMLDIR" ]; then 394 | mkdir -p $DESTDIR$HTMLDIR/lang 395 | fi 396 | if [ ! -d "$DESTDIR$BASEDIR" ]; then 397 | mkdir -p $DESTDIR$BASEDIR 398 | fi 399 | if [ ! -d "$DESTDIR$MANDIR" ]; then 400 | mkdir -p $DESTDIR$MANDIR 401 | fi 402 | if [ ! -d "$DESTDIR$DOCDIR" ]; then 403 | mkdir -p $DESTDIR$DOCDIR 404 | fi 405 | if [ ! -d "$DESTDIR$PIDDIR" ]; then 406 | mkdir -p $DESTDIR$PIDDIR 407 | fi 408 | 409 | install -m 644 sendmailanalyzer.conf $DESTDIR$DOCDIR/sendmailanalyzer.conf.sample 410 | if [ ! -e "$DESTDIR$CONFDIR/sendmailanalyzer.conf" ]; then 411 | install -m 644 sendmailanalyzer.conf $DESTDIR$CONFDIR/sendmailanalyzer.conf 412 | fi 413 | install -m 755 sendmailanalyzer $DESTDIR$BINDIR/ 414 | install -m 755 sa_cache $DESTDIR$BINDIR/ 415 | install -m 755 cgi-bin/sa_report.cgi $DESTDIR$HTMLDIR/ 416 | install -m 644 cgi-bin/lang/* $DESTDIR$HTMLDIR/lang/ 417 | install -m 644 salogo.png $DESTDIR$HTMLDIR/ 418 | install -m 644 flotr2.js $DESTDIR$HTMLDIR/ 419 | install -m 644 sorttable.js $DESTDIR$HTMLDIR/ 420 | pod2man doc/sendmailanalyzer.pod doc/sendmailanalyzer.3 421 | pod2man doc/sa_cache.pod doc/sa_cache.3 422 | install -m 644 doc/sendmailanalyzer.3 $DESTDIR$MANDIR/ 423 | install -m 644 doc/sa_cache.3 $DESTDIR$MANDIR/ 424 | install -m 644 README $DESTDIR$DOCDIR/ 425 | install -m 644 ChangeLog $DESTDIR$DOCDIR/ 426 | 427 | }; 428 | if (!$ENV{QUIET}) { 429 | print INST qq{ 430 | echo " 431 | ----------------------------------------------------------------------------- 432 | 1. Start SendmailAnalyzer daemon with: 433 | 434 | $BINDIR/sendmailanalyzer -f 435 | 436 | or use one of the starters script provided in the start_scripts/ directory. 437 | 438 | 2. Modify your Apache2 configuration to allow access to CGI scripts like follow: 439 | 440 | Alias /sareport $HTMLDIR 441 | 442 | 443 | Options ExecCGI 444 | AddHandler cgi-script .cgi 445 | DirectoryIndex sa_report.cgi 446 | #-- Some browser might need this line (Chrome, Safari) 447 | Header always set X-Frame-Options "SAMEORIGIN" 448 | #-- Apache 2.2 449 | #Order deny,allow 450 | #Deny from all 451 | #Allow from 192.168.1.0/24 452 | #-- Apache 2.4 453 | Require all denied 454 | Require ip 192.168.1.0/24 455 | 456 | 457 | If necessary, give additional host access to SendmailAnalyzer. 458 | To be able to use Header directive be sure that header module is enabled: 459 | a2enmod headers 460 | Restart and ensure that httpd is running. 461 | 462 | 3. Browse to http://mta.host.dom/sareport/ to ensure that things are working 463 | properly. 464 | 465 | 4. Setup a cronjob to run sa_cache and restart SendmailAnalyzer daemon after 466 | maillog logrotate as follow: 467 | 468 | # SendmailAnalyzer log reporting daily cache 469 | 0 1 * * * $BINDIR/sa_cache > /dev/null 2>&1 470 | # On huge MTA you may want to have five minutes caching 471 | #*/5 * * * * $BINDIR/sa_cache -a > /dev/null 2>&1 472 | 473 | 5. Add an entry in /etc/logrotate.d/syslog to restart SendmailAnalyzer when 474 | maillog is rotated or create a cron job. 475 | 476 | For more information, see $DOCDIR/README file. 477 | 478 | ----------------------------------------------------------------------------- 479 | " | more 480 | }; 481 | } 482 | close(INST); 483 | `chmod 755 install_all.sh`; 484 | 485 | `perl -p -i -e 's#my \\\$CONFIG_FILE .*#my \\\$CONFIG_FILE = "$CONFDIR/sendmailanalyzer.conf";#' sendmailanalyzer sa_cache`; 486 | `perl -p -i -e 's#my \\\$CONFIG_FILE .*#my \\\$CONFIG_FILE = "$CONFDIR/sendmailanalyzer.conf";#' cgi-bin/*.cgi`; 487 | 488 | `perl -p -i -e 's#SALYZER=.*#SALYZER=$BINDIR/sendmailanalyzer#' start_scripts/*`; 489 | `perl -p -i -e 's#PIDFILE=.*#PIDFILE=$PIDDIR/sendmailanalyzer.pid#' start_scripts/*`; 490 | 491 | WriteMakefile( 492 | 'NAME' => 'sendmailanalyzer', 493 | 'VERSION_FROM' => 'sendmailanalyzer', 494 | 'dist' => { 495 | 'COMPRESS'=>'gzip -9f', 'SUFFIX' => 'gz', 496 | 'ZIP'=>'/usr/bin/zip','ZIPFLAGS'=>'-rl' 497 | }, 498 | 'AUTHOR' => 'Gilles Darold (gilles@darold.net)', 499 | 'ABSTRACT' => 'Sendmail log analyzer', 500 | 'EXE_FILES' => [ qw(sendmailanalyzer sa_cache) ], 501 | 'MAN3PODS' => { 'doc/sendmailanalyzer.pod' => 'blib/man3/sendmailanalyzer.pod.3', 'doc/sa_cache.pod' => 'blib/man3/sa_cache.pod.3' }, 502 | 'DESTDIR' => $ENV{DESTDIR}, 503 | 'INSTALLDIRS' => $ENV{INSTALLDIRS}, 504 | 'clean' => {FILES => "install_all.sh sendmailanalyzer.conf doc/sendmailanalyzer.3 doc/sa_cache.3"}, 505 | 'META_MERGE' => { 506 | resources => { 507 | homepage => 'http://sendmailanalyzer.darold.net/', 508 | repository => { 509 | type => 'git', 510 | git => 'git@github.com:darold/sendmailanalyzer.git', 511 | web => 'https://github.com/darold/sendmailanalyzer', 512 | }, 513 | }, 514 | } 515 | ); 516 | 517 | sub MY::install { 518 | my $self = shift; 519 | 520 | my $string = $self->MM::install; 521 | $string =~ s/(pure_install\s+)(.*)/$1 install_all $2/; 522 | 523 | return $string; 524 | } 525 | 526 | sub MY::postamble { 527 | my $postamble = <<'END'; 528 | install_all: install_all.sh 529 | sh install_all.sh 530 | END 531 | return $postamble; 532 | } 533 | 534 | if (!$ENV{QUIET}) { 535 | print "Done...\n\n"; 536 | print "Now type 'make && make install'\n\n"; 537 | } 538 | 539 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | Things that may be done. 2 | 3 | Allow access to obsolete statistics 30 days backward and not of the current 4 | month only. 5 | 6 | Allow free space setting in days with default to 30 days. 7 | 8 | -------------------------------------------------------------------------------- /cgi-bin/lang/ERROR_CODE: -------------------------------------------------------------------------------- 1 | %SMTP_ERROR_CODE = ( 2 | '421' => "Domain service not available.", 3 | '432' => "A password transition is needed.", 4 | '450' => "Mailbox unavailable.", 5 | '451' => "Local error in processing.", 6 | '452' => "Insufficient system storage.", 7 | '454' => "TLS not available due to temporary reason.", 8 | '458' => "Unable to queue messages.", 9 | '459' => "Node not allowed.", 10 | '500' => "Command not recognized.", 11 | '501' => "Syntax error, no parameters allowed.", 12 | '502' => "Command not implemented.", 13 | '503' => "Bad sequence of commands.", 14 | '504' => "Command parameter not implemented.", 15 | '521' => "Machine does not accept mail.", 16 | '530' => "Must issue a STARTTLS command first.", 17 | '534' => "Authentication mechanism is too weak.", 18 | '538' => "Encryption required.", 19 | '550' => "Mailbox unavailable.", 20 | '551' => "User not local.", 21 | '552' => "Exceeded storage allocation.", 22 | '553' => "Mailbox name not allowed.", 23 | '554' => "Transaction failed.", 24 | ); 25 | 26 | %ESMTP_ERROR_CODE = ( 27 | '0.0' => "User address required", 28 | '1.1' => "Bad destination mailbox address", 29 | '1.2' => "Bad destination system address", 30 | '1.3' => "Bad destination mailbox address syntax", 31 | '1.4' => "Destination mailbox address ambiguous", 32 | '1.5' => "Destination address valid", 33 | '1.6' => "Destination mailbox has moved", 34 | '1.7' => "Bad sender's mailbox address syntax", 35 | '1.8' => "Bad sender's system address", 36 | '2.1' => "Mailbox disabled, not accepting messages", 37 | '2.2' => "Mailbox full", 38 | '2.3' => "Message length exceeds administrative limit", 39 | '2.4' => "Mailing list expansion problem", 40 | '3.1' => "Mail system full", 41 | '3.2' => "System not accepting network messages", 42 | '3.3' => "System not capable of selected features", 43 | '3.4' => "Message too big for system", 44 | '3.5' => "System incorrectly configured", 45 | '4.1' => "No answer from host", 46 | '4.2' => "Bad connection", 47 | '4.3' => "Directory server failure", 48 | '4.4' => "Unable to route", 49 | '4.5' => "Mail system congestion", 50 | '4.6' => "Routing loop detected", 51 | '4.7' => "Delivery time expired", 52 | '5.1' => "Invalid command", 53 | '5.2' => "Syntax error", 54 | '5.3' => "Too many recipients", 55 | '5.4' => "Invalid command arguments", 56 | '5.5' => "Wrong protocol version", 57 | '6.1' => "Media not supported", 58 | '6.2' => "Conversion required and prohibited", 59 | '6.3' => "Conversion required but not supported", 60 | '6.4' => "Conversion with loss performed", 61 | '6.5' => "Conversion Failed", 62 | '7.0' => "Delivery refused, country of spam", 63 | '7.1' => "Delivery not authorized, message refused", 64 | '7.2' => "Mailing list expansion prohibited", 65 | '7.3' => "Security conversion required but not possible", 66 | '7.4' => "Security features not supported", 67 | '7.5' => "Cryptographic failure", 68 | '7.6' => "Cryptographic algorithm not supported", 69 | '7.7' => "Message integrity failure", 70 | ); 71 | 72 | -------------------------------------------------------------------------------- /cgi-bin/lang/bg_BG: -------------------------------------------------------------------------------- 1 | %::TRANSLATE = ( 2 | '01' => 'Яну', 3 | '02' => 'Фев', 4 | '03' => 'Мар', 5 | '04' => 'Апр', 6 | '05' => 'Май', 7 | '06' => 'Юни', 8 | '07' => 'Юли', 9 | '08' => 'Авг', 10 | '09' => 'Сеп', 11 | '10' => 'Окт', 12 | '11' => 'Ное', 13 | '12' => 'Дек', 14 | 'Jan' => 'Януари', 15 | 'Feb' => 'Февруари', 16 | 'Mar' => 'Март', 17 | 'Apr' => 'Април', 18 | 'May' => 'Май', 19 | 'Jun' => 'Юни', 20 | 'Jul' => 'Юли', 21 | 'Aug' => 'Август', 22 | 'Sep' => 'Септември', 23 | 'Oct' => 'Октомври', 24 | 'Nov', => 'Ноември', 25 | 'Dec' => 'Декември', 26 | 'Statistics generation tooks' => 'Глобална статистика', 27 | 'Last record' => 'Последна запис', 28 | 'Monthly' => 'Месечно', 29 | 'Days of the month' => 'Дни от месеца', 30 | 'Daily' => 'Ежедневно', 31 | 'Hours of the day' => 'Часове от деня', 32 | 'Yearly' => 'Годишно', 33 | 'Months of the year' => 'Месеци от годината', 34 | 'Weekly' => 'Weekly', 35 | 'Days of the week' => 'Days of the week', 36 | 'Hourly' => 'Часово', 37 | 'Minutes of the hour' => 'Минути от часа', 38 | 'Previous' => 'Предишна', 39 | 'Next' => 'Следваща', 40 | 'Messaging statistics' => 'Статистика на съобщенията', 41 | 'Statistics' => 'Статистика', 42 | 'Top Statistics' => 'Топ статистика', 43 | 'Global Statistics' => 'Глобална статистика', 44 | 'Senders Statistics' => 'Статистика по отправител', 45 | 'Top Sender Domain' => 'Топ домен на отправителя', 46 | 'Top Sender Relay' => 'Топ релей на отправителя', 47 | 'Top Sender Address' => 'Топ адрес на отправителя', 48 | 'Recipients Statistics' => 'Статистика на получатели', 49 | 'Top Recipient Domain' => 'Топ домен на получателя', 50 | 'Top Recipient Relay' => 'Топ релей на получателя', 51 | 'Top Recipients Address' => 'Топ адреса на получатели', 52 | 'Rejection Statistics' => 'Статистика на отказите', 53 | 'Top Rules' => 'Топ правила', 54 | 'Top Domains' => 'Топ домени', 55 | 'Top Relays' => 'Топ релеи', 56 | 'Top Senders' => 'Топ отправители', 57 | 'Top status' => 'Топ статус', 58 | 'Virus Statistics' => 'Статистика по вируси', 59 | 'Top Virus' => 'Топ вирус', 60 | 'Top Virus Senders' => 'Топ отправители на вируси', 61 | 'Top Virus Relays' => 'Топ вирус релеи', 62 | 'Top Virus Filenames' => 'Топ вирус файлове', 63 | 'Top Recipient Address' => 'Топ адреса на получатели', 64 | 'Max Number of Recipients' => 'Максимално число на получатели', 65 | 'Number of Recipients' => 'Количество получатели', 66 | 'Senders' => 'Отправители', 67 | 'Spam Statistics' => 'Спам статистика', 68 | 'Top Spams Rules' => 'Топ спам правила', 69 | 'Top Spams' => 'Топ спам', 70 | 'Top Spammers Domain' => 'Топ спам домени', 71 | 'Top Spammers Relays' => 'Топ спам релеи', 72 | 'Top Spammers Address' => 'Топ спам адреса', 73 | 'Top Recipients Domain' => 'Топ домен на получатели', 74 | 'Messaging flows' => 'Потоки на съобщения', 75 | 'Messaging' => 'Обработка на съобщения', 76 | 'Messages' => 'Съобщения', 77 | 'Size' => 'Размер', 78 | 'Bytes' => 'Байтове', 79 | 'KBytes' => 'Кб', 80 | 'MBytes' => 'Мб', 81 | 'Incoming' => 'Входящи', 82 | 'Local incoming' => 'Входящи локално', 83 | 'Total incoming' => 'Входящи общо', 84 | 'Outgoing' => 'Изходящи', 85 | 'Local delivery' => 'Локална доставка', 86 | 'Total outgoing' => 'Общо изпратени', 87 | 'Inbound' => 'Входящи', 88 | 'Outbound' => 'Изходящи', 89 | 'Messaging Flow' => 'Поток на съобщения', 90 | 'Number of message' => 'Номер на съобщението', 91 | 'Messaging Size Flow' => 'Размер на потока на съобщенията', 92 | 'Spamming flows' => 'Спам потоци', 93 | 'Spamming' => 'Обработка на спама', 94 | 'Spamming Flow' => 'Спам поток', 95 | 'Number of spam' => 'Количество спам', 96 | 'Spam delivery flows' => 'Спам потоци на получаване', 97 | 'Internet -> Internal' => 'Външен -> Вътрешен', 98 | 'Internal -> Internal' => 'Вътрешен -> Вътрешен', 99 | 'Internal -> Internet' => 'Вътрешен -> Външен', 100 | 'Internet -> Internet' => 'Външен -> Външен', 101 | 'Unknown -> Internal' => 'Unknown -> Internal', 102 | 'Internal -> Unknown' => 'Internal -> Unknown', 103 | 'Unknown -> Internet' => 'Unknown -> External', 104 | 'Internet -> Unknown' => 'External -> Unknown', 105 | 'Unknown -> Unknown' => 'Unknown -> Unknown', 106 | 'Rejection flows' => 'Отказани потоци', 107 | 'Viruses flows' => 'Вирус потоци', 108 | 'Virus Detection' => 'Вирус', 109 | 'Viruses Flow' => 'Вирус потоци', 110 | 'Number of virus' => 'Количество вируси', 111 | 'Viruses delivery flows' => 'Вирус потоци на получаване', 112 | 'Syserr flows' => 'Потоки на системни грешки', 113 | 'Rejection SysErr' => 'Отказване системни събития', 114 | 'Messaging Status' => 'Статус на съобщението', 115 | 'Percentage' => 'Процент', 116 | 'Total' => 'Общо', 117 | 'Ext -> Int' => 'Външ -> Вътр', 118 | 'Ext -> Ext' => 'Външ -> Външ', 119 | 'Int -> Int' => 'Вътр -> Вътр', 120 | 'Int -> Ext' => 'Вътр -> Външ', 121 | 'Unk -> Int' => 'Unk -> Int', 122 | 'Unk -> Ext' => 'Unk -> Ext', 123 | 'Int -> Unk' => 'Int -> Unk', 124 | 'Ext -> Unk' => 'Ext -> Unk', 125 | 'Unk -> Unk' => 'Unk -> Unk', 126 | 'Message delivery flows' => 'Потоки на получаване на съобщенията', 127 | 'Delivery Direction' => 'Получаване Направление', 128 | 'Direction' => 'Направление', 129 | 'Percentage of message' => 'Процент на съобщенията', 130 | 'Different senders/recipients' => 'Различия отправител/получател', 131 | 'Consult global statistics for' => 'Глобална статистика за', 132 | 'here' => 'тук', 133 | 'Statistics for domain' => 'Доменна статистика', 134 | 'Month View' => 'Виж за месец', 135 | 'Day View' => 'Виж за ден', 136 | 'Hour View' => 'Виж за час', 137 | 'Mean' => 'Размер/съобщ', 138 | 'Max Size Senders' => 'Максимален размер отправители', 139 | 'Message size' => 'Размер на съобщението', 140 | 'Different senders/recipients' => 'Различия отправител/получател', 141 | 'Hour' => 'Час', 142 | 'Sender' => 'Отправител', 143 | 'Sender Relay' => 'Релей на отправителя', 144 | 'Recipient Relay' => 'Релей на получателя', 145 | 'Status' => 'Статус', 146 | 'Rule' => 'Правило', 147 | 'Spam' => 'Спам', 148 | 'Virus' => 'Вирус', 149 | 'File' => 'Файл', 150 | 'Error' => 'Грешка', 151 | 'Limits' => 'Лимит', 152 | 'Years' => 'Години', 153 | 'Recipients' => 'Получатели', 154 | 'System messages' => 'Системни съобщения', 155 | 'Message' => 'Съобщение', 156 | 'Count' => 'Количество', 157 | 'Delivery Status Notification' => 'Уведомление на получаване(DSN)', 158 | 'DSN flows' => 'DSN потоци', 159 | 'DSN Flow' => 'DSN потоци', 160 | 'Number of dsn' => 'Количество на DSN', 161 | 'DSN delivery flows'=> 'DSN потоци на получаване', 162 | 'In Error' => 'Входящи грешки', 163 | 'DSN Statistics' => 'DSN статистика', 164 | 'Top DSN Status' => 'Топ DSN статус', 165 | 'Top DSN Senders' => 'Топ DSN отправители', 166 | 'Top DSN Relays' => 'Топ DSN релеи', 167 | 'Top DSN Recipients' => 'Топ DSN получатели', 168 | 'No dataset' => 'Няма записи за този период', 169 | 'WeekDay' => 'Нд Пн Вт Ср Чт Пт Сб', 170 | 'AntiSpam details' => 'Антиспам детайли', 171 | 'Top spam scores' => 'Топ спам резултати', 172 | 'Score' => 'Резултат', 173 | 'Caching statistics' => 'Кеш статистика', 174 | 'Cache' => 'Кеш', 175 | 'Autolearn Statistics' => 'Статистика на автообучение', 176 | 'Autolearn' => 'Автообучение', 177 | 'Original Id' => 'Оригинален id', 178 | 'Acknowledgement' => '\'Bat\' логотипа се използва с любезното съдействие на sendmail.org', 179 | 'SMTP Auth' => 'SMTP авт.', 180 | 'Authent Flow' => 'Поток на аутентификация', 181 | 'Mechanism' => 'Механизъм', 182 | 'SMTP Auth Statistics' => 'Статистика на SMTP авт.', 183 | 'Top Mechanism' => 'Топ механизъм', 184 | 'Top Relay' => 'Топ релей', 185 | 'Top Authid' => 'Топ авт. id', 186 | 'Original Recipient' => 'Получател (истинен)', 187 | 'Postgrey' => 'Postgrey', 188 | 'Postgrey Statistics' => 'Postgrey статистика', 189 | 'Postgrey Status' => 'Postgrey статус', 190 | 'Top Reasons' => 'Топ причина', 191 | 'STARTTLS status' => 'STARTTLS статус', 192 | 'Subject' => 'предмет', 193 | ); 194 | -------------------------------------------------------------------------------- /cgi-bin/lang/de_DE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darold/sendmailanalyzer/7dbc6c53014571dd85fa3f53a9e683b5b142eb59/cgi-bin/lang/de_DE -------------------------------------------------------------------------------- /cgi-bin/lang/en_US: -------------------------------------------------------------------------------- 1 | %::TRANSLATE = ( 2 | '01' => 'Jan', 3 | '02' => 'Feb', 4 | '03' => 'Mar', 5 | '04' => 'Apr', 6 | '05' => 'May', 7 | '06' => 'Jun', 8 | '07' => 'Jul', 9 | '08' => 'Aug', 10 | '09' => 'Sep', 11 | '10' => 'Oct', 12 | '11' => 'Nov', 13 | '12' => 'Dec', 14 | 'Jan' => 'January', 15 | 'Feb' => 'Febuary', 16 | 'Mar' => 'Mars', 17 | 'Apr' => 'April', 18 | 'May' => 'May', 19 | 'Jun' => 'June', 20 | 'Jul' => 'July', 21 | 'Aug' => 'August', 22 | 'Sep' => 'September', 23 | 'Oct' => 'October', 24 | 'Nov', => 'November', 25 | 'Dec' => 'December', 26 | 'Statistics generation tooks' => 'Statistics generation tooks', 27 | 'Last record' => 'Last record', 28 | 'Monthly' => 'Monthly', 29 | 'Days of the month' => 'Days of the month', 30 | 'Daily' => 'Daily', 31 | 'Hours of the day' => 'Hours of the day', 32 | 'Yearly' => 'Yearly', 33 | 'Months of the year' => 'Months of the year', 34 | 'Weekly' => 'Weekly', 35 | 'Days of the week' => 'Days of the week', 36 | 'Hourly' => 'Hourly', 37 | 'Minutes of the hour' => 'Minutes of the hour', 38 | 'Previous' => 'Previous', 39 | 'Next' => 'Next', 40 | 'Messaging statistics' => 'Messaging statistics', 41 | 'Statistics' => 'Statistics', 42 | 'Top Statistics' => 'Top Statistics', 43 | 'Global Statistics' => 'Global Statistics', 44 | 'Senders Statistics' => 'Senders Statistics', 45 | 'Top Sender Domain' => 'Top Sender Domain', 46 | 'Top Sender Relay' => 'Top Sender Relay', 47 | 'Top Sender Address' => 'Top Sender Address', 48 | 'Recipients Statistics' => 'Recipients Statistics', 49 | 'Top Recipient Domain' => 'Top Recipient Domain', 50 | 'Top Recipient Relay' => 'Top Recipient Relay', 51 | 'Top Recipients Address' => 'Top Recipients Address', 52 | 'Rejection Statistics' => 'Rejection Statistics', 53 | 'Top Rules' => 'Top Rules', 54 | 'Top Domains' => 'Top Domains', 55 | 'Top Relays' => 'Top Relays', 56 | 'Top Senders' => 'Top Senders', 57 | 'Top status' => 'Top status', 58 | 'Virus Statistics' => 'Virus Statistics', 59 | 'Top Virus' => 'Top Virus', 60 | 'Top Virus Senders' => 'Top Virus Senders', 61 | 'Top Virus Relays' => 'Top Virus Relays', 62 | 'Top Virus Filenames' => 'Top Virus Filenames', 63 | 'Top Recipient Address' => 'Top Recipient Address', 64 | 'Max Number of Recipients' => 'Max Number of Recipients', 65 | 'Number of Recipients' => 'Number of Recipients', 66 | 'Senders' => 'Senders', 67 | 'Spam Statistics' => 'Spam Statistics', 68 | 'Top Spams Rules' => 'Top Spams Rules', 69 | 'Top Spams' => 'Top Spams', 70 | 'Top Spammers Domain' => 'Top Spammers Domain', 71 | 'Top Spammers Relays' => 'Top Spammers Relays', 72 | 'Top Spammers Address' => 'Top Spammers Address', 73 | 'Top Recipients Domain' => 'Top Recipients Domain', 74 | 'Messaging flows' => 'Messaging flows', 75 | 'Messaging' => 'Messaging', 76 | 'Messages' => 'Messages', 77 | 'Size' => 'Size', 78 | 'Bytes' => 'Bytes', 79 | 'KBytes' => 'Kb', 80 | 'MBytes' => 'Mb', 81 | 'Incoming' => 'Incoming', 82 | 'Local incoming' => 'Local incoming', 83 | 'Total incoming' => 'Total incoming', 84 | 'Outgoing' => 'Outgoing', 85 | 'Local delivery' => 'Local delivery', 86 | 'Total outgoing' => 'Total outgoing', 87 | 'Inbound' => 'Inbound', 88 | 'Outbound' => 'Outbound', 89 | 'Messaging Flow' => 'Messaging Flow', 90 | 'Number of message' => 'Number of message', 91 | 'Messaging Size Flow' => 'Messaging Size Flow', 92 | 'Spamming flows' => 'Spamming flows', 93 | 'Spamming' => 'Spamming', 94 | 'Spamming Flow' => 'Spamming Flow', 95 | 'Number of spam' => 'Number of spam', 96 | 'Spam delivery flows' => 'Spam delivery flows', 97 | 'Internet -> Internal' => 'External -> Internal', 98 | 'Internal -> Internal' => 'Internal -> Internal', 99 | 'Internal -> Internet' => 'Internal -> External', 100 | 'Internet -> Internet' => 'External -> External', 101 | 'Unknown -> Internal' => 'Unknown -> Internal', 102 | 'Internal -> Unknown' => 'Internal -> Unknown', 103 | 'Unknown -> Internet' => 'Unknown -> External', 104 | 'Internet -> Unknown' => 'External -> Unknown', 105 | 'Unknown -> Unknown' => 'Unknown -> Unknown', 106 | 'Rejection flows' => 'Rejection flows', 107 | 'Viruses flows' => 'Viruses flows', 108 | 'Virus Detection' => 'Virus', 109 | 'Viruses Flow' => 'Viruses Flow', 110 | 'Number of virus' => 'Number of virus', 111 | 'Viruses delivery flows' => 'Viruses delivery flows', 112 | 'Syserr flows' => 'Syserr flows', 113 | 'Rejection SysErr' => 'Rejection & Events', 114 | 'Messaging Status' => 'Messaging Status', 115 | 'Percentage' => 'Percentage', 116 | 'Total' => 'Total', 117 | 'Ext -> Int' => 'Ext -> Int', 118 | 'Ext -> Ext' => 'Ext -> Ext', 119 | 'Int -> Int' => 'Int -> Int', 120 | 'Int -> Ext' => 'Int -> Ext', 121 | 'Unk -> Int' => 'Unk -> Int', 122 | 'Unk -> Ext' => 'Unk -> Ext', 123 | 'Int -> Unk' => 'Int -> Unk', 124 | 'Ext -> Unk' => 'Ext -> Unk', 125 | 'Unk -> Unk' => 'Unk -> Unk', 126 | 'Message delivery flows' => 'Message delivery flows', 127 | 'Delivery Direction' => 'Delivery Direction', 128 | 'Direction' => 'Direction', 129 | 'Percentage of message' => 'Percentage of message', 130 | 'Different senders/recipients' => 'Different senders/recipients', 131 | 'Consult global statistics for' => 'Consult global statistics for', 132 | 'here' => 'here', 133 | 'Statistics for domain' => 'Statistics for domain', 134 | 'Month View' => 'Months', 135 | 'Day View' => 'Days', 136 | 'Hour View' => 'Hours', 137 | 'Mean' => 'Size/msg', 138 | 'Max Size Senders' => 'Max Size Senders', 139 | 'Message size' => 'Message size', 140 | 'Different senders/recipients' => 'Different senders/recipients', 141 | 'Hour' => 'Hour', 142 | 'Sender' => 'Sender', 143 | 'Sender Relay' => 'Sender Relay', 144 | 'Recipient Relay' => 'Recipient Relay', 145 | 'Status' => 'Status', 146 | 'Rule' => 'Rule', 147 | 'Spam' => 'Spam', 148 | 'Virus' => 'Virus', 149 | 'File' => 'File', 150 | 'Error' => 'Error', 151 | 'Limits' => 'Limits', 152 | 'Years' => 'Years', 153 | 'Recipients' => 'Recipients', 154 | 'System messages' => 'System messages', 155 | 'Message' => 'Message', 156 | 'Count' => 'Count', 157 | 'Delivery Status Notification' => 'Notification', 158 | 'DSN flows' => 'Delivery Status Notification', 159 | 'DSN Flow' => 'DSN Flow', 160 | 'Number of dsn' => 'Number of dsn', 161 | 'DSN delivery flows'=> 'DSN delivery flows', 162 | 'In Error' => 'In Error', 163 | 'DSN Statistics' => 'DSN Statistics', 164 | 'Top DSN Status' => 'Top DSN Status', 165 | 'Top DSN Senders' => 'Top DSN Senders', 166 | 'Top DSN Relays' => 'Top DSN Relays', 167 | 'Top DSN Recipients' => 'Top DSN Recipients', 168 | 'No dataset' => 'No record for this period', 169 | 'WeekDay' => 'Su Mo Tu We Th Fr Sa', 170 | 'AntiSpam details' => 'AntiSpam details', 171 | 'Top spam scores' => 'Top spam scores', 172 | 'Score' => 'Score', 173 | 'Caching statistics' => 'Caching statistics', 174 | 'Cache' => 'Cache', 175 | 'Autolearn Statistics' => 'Autolearn Statistics', 176 | 'Autolearn' => 'Autolearn', 177 | 'Original Id' => 'Original Id', 178 | 'Acknowledgement' => 'The \'Bat\' logo is used with the kind permission of sendmail.org', 179 | 'SMTP Auth' => 'SMTP Auth', 180 | 'Authent Flow' => 'Authentication Flow', 181 | 'Mechanism' => 'Mechanism', 182 | 'SMTP Auth Statistics' => 'SMTP Auth Statistics', 183 | 'Top Mechanism' => 'Top Mechanism', 184 | 'Top Relay' => 'Top Relay', 185 | 'Top Authid' => 'Top Authid', 186 | 'Original Recipient' => 'Original Recipient', 187 | 'Postgrey' => 'Postgrey', 188 | 'Postgrey Status' => 'Postgrey Status', 189 | 'Postgrey Statistics' => 'Postgrey Statistics', 190 | 'Top Reasons' => 'Top Status', 191 | 'STARTTLS status' => 'STARTTLS status', 192 | 'Subject' => 'Subject', 193 | ); 194 | -------------------------------------------------------------------------------- /cgi-bin/lang/es_ES: -------------------------------------------------------------------------------- 1 | %::TRANSLATE = ( 2 | '01' => 'Ene', 3 | '02' => 'Feb', 4 | '03' => 'Mar', 5 | '04' => 'Abr', 6 | '05' => 'May', 7 | '06' => 'Jun', 8 | '07' => 'Jul', 9 | '08' => 'Ago', 10 | '09' => 'Sep', 11 | '10' => 'Oct', 12 | '11' => 'Nov', 13 | '12' => 'Dic', 14 | 'Jan' => 'Enero', 15 | 'Feb' => 'Febrero', 16 | 'Mar' => 'Marzo', 17 | 'Apr' => 'Abril', 18 | 'May' => 'Mayo', 19 | 'Jun' => 'Junio', 20 | 'Jul' => 'Julio', 21 | 'Aug' => 'Agosto', 22 | 'Sep' => 'Septiembre', 23 | 'Oct' => 'Octubre', 24 | 'Nov', => 'Noviembre', 25 | 'Dec' => 'Diciembre', 26 | 'Statistics generation tooks' => 'Estadísticas de Generación', 27 | 'Last record' => 'Último Registro', 28 | 'Monthly' => 'Reporte Mensual', 29 | 'Days of the month' => 'Días del Mes', 30 | 'Daily' => 'Reporte Diario', 31 | 'Hours of the day' => 'Horas del día', 32 | 'Yearly' => 'Reporte Anual', 33 | 'Months of the year' => 'Meses del año', 34 | 'Weekly' => 'Reporte semanal', 35 | 'Days of the week' => 'Días de la semana', 36 | 'Hourly' => 'Reporte por horas', 37 | 'Minutes of the hour' => 'Minutos de la hora', 38 | 'Previous' => 'Anterior', 39 | 'Next' => 'Siguiente', 40 | 'Messaging statistics' => 'Estadísticas de Mensajes', 41 | 'Top Statistics' => 'Top Estadísticas', 42 | 'Global Statistics' => 'Estadísticas Globales', 43 | 'Statistics' => 'Estadísticas', 44 | 'Senders Statistics' => 'Estadísticas de Emisores', 45 | 'Top Sender Domain' => 'Top Dominio Emisor', 46 | 'Top Sender Relay' => 'Top Relay Emisor', 47 | 'Top Sender Address' => 'Top Dirección de Emisor', 48 | 'Recipients Statistics' => 'Estadísticas de Receptores', 49 | 'Top Recipient Domain' => 'Top Dominio Receptor', 50 | 'Top Recipient Relay' => 'Top Relay Receptor', 51 | 'Top Recipients Address' => 'Top Dirección de Receptor', 52 | 'Rejection Statistics' => 'Estadísticas de Rechazados', 53 | 'Top Rules' => 'Top Reglas', 54 | 'Top Domains' => 'Top Dominios', 55 | 'Top Relays' => 'Top Relays', 56 | 'Top Senders' => 'Top Emisores', 57 | 'Top status' => 'Top Status', 58 | 'Virus Statistics' => 'Estadísticas de Virus', 59 | 'Top Virus' => 'Top Virus', 60 | 'Top Virus Senders' => 'Top Emisores de Virus', 61 | 'Top Virus Relays' => 'Top Relays de Virus', 62 | 'Top Virus Filenames' => 'Top Ficheros de Virus', 63 | 'Top Recipient Address' => 'Top dirección Receptor', 64 | 'Max Number of Recipients' => 'Máximo Numero de Receptores', 65 | 'Number of Recipients' => 'Número de Receptores', 66 | 'Senders' => 'Emisores', 67 | 'Spam Statistics' => 'Estadísticas de Spam', 68 | 'Top Spams Rules' => 'Top Reglas de Spam', 69 | 'Top Spams' => 'Top Spam', 70 | 'Top Spammers Domain' => 'Top Dominio de Spammers', 71 | 'Top Spammers Relays' => 'Top Relays Spammers', 72 | 'Top Spammers Address' => 'Top Dirección de Spammers', 73 | 'Top Recipients Domain' => 'Top Dominio Receptor', 74 | 'Messaging flows' => 'Flujo de Mensajes', 75 | 'Messaging' => 'Mensajes', 76 | 'Messages' => 'Mensajes', 77 | 'Size' => 'Tamaño', 78 | 'Bytes' => 'Bytes', 79 | 'KBytes' => 'KBytes', 80 | 'MBytes' => 'MBytes', 81 | 'Incoming' => 'Entrante', 82 | 'Local incoming' => 'Entrante Local', 83 | 'Total incoming' => 'Entrante Total', 84 | 'Outgoing' => 'Saliente', 85 | 'Local delivery' => 'Entrega Local', 86 | 'Total outgoing' => 'Total Saliente', 87 | 'Inbound' => 'Entrantes', 88 | 'Outbound' => 'Salientes', 89 | 'Messaging Flow' => 'Flujo de mensajes', 90 | 'Number of message' => 'Número del Mensaje', 91 | 'Messaging Size Flow' => 'Tamaño del flujo de Mensajes', 92 | 'Spamming flows' => 'Flujo de Spamming', 93 | 'Spamming' => 'Spamming', 94 | 'Spamming Flow' => 'Flujo de Spamming', 95 | 'Number of spam' => 'Número de spam', 96 | 'Spam delivery flows' => 'Flujo de Entrega Spam', 97 | 'Internet -> Internal' => 'Externo -> Interno', 98 | 'Internal -> Internal' => 'Interno -> Interno', 99 | 'Internal -> Internet' => 'Interno -> Externo', 100 | 'Internet -> Internet' => 'Externo -> Externo', 101 | 'Unknown -> Internal' => 'Unknown -> Internal', 102 | 'Internal -> Unknown' => 'Internal -> Unknown', 103 | 'Unknown -> Internet' => 'Unknown -> External', 104 | 'Internet -> Unknown' => 'External -> Unknown', 105 | 'Unknown -> Unknown' => 'Unknown -> Unknown', 106 | 'Rejection flows' => 'Flujo de Rechazados', 107 | 'Viruses flows' => 'Flujo de Virus', 108 | 'Virus Detection' => 'Virus', 109 | 'Viruses Flow' => 'Flujo de Virus', 110 | 'Number of virus' => 'Número de Virus', 111 | 'Viruses delivery flows' => 'Flujo Entrega Virus', 112 | 'Syserr flows' => 'Flujo Syserr', 113 | 'Rejection SysErr' => 'Registro de Rechazados', 114 | 'Messaging Status' => 'Status Mensajes', 115 | 'Percentage' => 'Porcentaje', 116 | 'Total' => 'Total', 117 | 'Ext -> Int' => 'Ext -> Int', 118 | 'Ext -> Ext' => 'Int -> Int', 119 | 'Int -> Int' => 'Int -> Int', 120 | 'Int -> Ext' => 'Int -> Ext', 121 | 'Unk -> Int' => 'Unk -> Int', 122 | 'Unk -> Ext' => 'Unk -> Ext', 123 | 'Int -> Unk' => 'Int -> Unk', 124 | 'Ext -> Unk' => 'Ext -> Unk', 125 | 'Unk -> Unk' => 'Unk -> Unk', 126 | 'Message delivery flows' => 'Distribución de Mensajes', 127 | 'Delivery Direction' => 'Dirección de Entrega', 128 | 'Direction' => 'Dirección', 129 | 'Percentage of message' => 'Porcentaje del Mensaje', 130 | 'Different senders/recipients' => 'Emisores/receptores diferentes', 131 | 'Consult global statistics for' => 'Consultar Estadísticas Globales Para', 132 | 'here' => 'aquí', 133 | 'Statistics for domain' => 'Estadísticas por Dominios', 134 | 'Month View' => 'Meses', 135 | 'Day View' => 'Días', 136 | 'Hour View' => 'Horas', 137 | 'Mean' => 'Tam/msg', 138 | 'Max Size Senders' => 'Emisores Max/Tam', 139 | 'Message size' => 'Tamaño del Mensaje', 140 | 'Different senders/recipients' => 'Emisores/receptores diferentes', 141 | 'Hour' => 'Hora', 142 | 'Sender' => 'Emisor', 143 | 'Sender Relay' => 'Relay Emisor', 144 | 'Recipient Relay' => 'Relay Receptor', 145 | 'Status' => 'Estado', 146 | 'Rule' => 'Regla', 147 | 'Spam' => 'Spam', 148 | 'Virus' => 'Virus', 149 | 'File' => 'Archivo', 150 | 'Error' => 'Error', 151 | 'Limits' => 'Límites', 152 | 'Recipients' => 'Receptores', 153 | 'System messages' => 'Mensajes del Sistema', 154 | 'Message' => 'Mensaje', 155 | 'Count' => 'Contador', 156 | 'Years' => 'Años', 157 | 'Delivery Status Notification' => 'Notificationes', 158 | 'DSN flows' => 'Flujos DSN', 159 | 'DSN Flow' => 'Flujo DSN', 160 | 'Number of dsn' => 'Número de DSN', 161 | 'DSN delivery flows'=> 'Distribución del DSN', 162 | 'In Error' => 'En error', 163 | 'DSN Statistics' => 'Estadísticas DSN', 164 | 'Top DSN Status' => 'Top Estados DSN', 165 | 'Top DSN Senders' => 'Top Emisores DSN', 166 | 'Top DSN Relays' => 'Top Relay DSN', 167 | 'Top DSN Recipients' => 'Top Receptores DSN', 168 | 'No dataset' => 'Sin datos', 169 | 'WeekDay' => 'Do Lu Ma Mi Ju Vi Sa', 170 | 'AntiSpam details' => 'Detalles AntiSpam', 171 | 'Top spam scores' => 'Top puntuación spam', 172 | 'Score' => 'Puntuación', 173 | 'Caching statistics' => 'Estadisticas del caché', 174 | 'Cache' => 'Caché', 175 | 'Autolearn Statistics' => 'Estadisticas de Autoaprendizaje', 176 | 'Autolearn' => 'Autoaprendizaje', 177 | 'Original Id' => 'ID de Origen', 178 | 'Acknowledgement' => 'Logo Bat cortesía de sendmail.org', 179 | 'SMTP Auth' => 'SMTP Auth', 180 | 'Authent Flow' => 'Flujo de Autenticaciones', 181 | 'Mechanism' => 'Mecanismo', 182 | 'SMTP Auth Statistics' => 'Estadísticas SMTP Auth', 183 | 'Top Mechanism' => 'Top Mecanismo', 184 | 'Top Relay' => 'Top Relay', 185 | 'Top Authid' => 'Top AuthId', 186 | 'Original Recipient' => 'Receptor de origen', 187 | 'Postgrey' => 'Postgrey', 188 | 'Postgrey Statistics' => 'Estadísticas Postgrey', 189 | 'Postgrey Status' => 'Estados Postgrey', 190 | 'Top Reasons' => 'Top Motivos', 191 | 'STARTTLS status' => 'Estados STARTTLS', 192 | 'Subject' => 'Asunto del mensaje', 193 | ); 194 | 195 | ################################################################################ 196 | ##Translated by Marco Escobar marco.escobar@gmail.com, mescobar@atentochile.cl## 197 | ##Adaptado al español de España UTF-8 por Jesús Guardon, jguardon@gmail.com## 198 | ################################################################################ 199 | -------------------------------------------------------------------------------- /cgi-bin/lang/fr_FR: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darold/sendmailanalyzer/7dbc6c53014571dd85fa3f53a9e683b5b142eb59/cgi-bin/lang/fr_FR -------------------------------------------------------------------------------- /cgi-bin/lang/it_IT: -------------------------------------------------------------------------------- 1 | %::TRANSLATE = ( 2 | '01' => 'Gen', 3 | '02' => 'Feb', 4 | '03' => 'Mar', 5 | '04' => 'Apr', 6 | '05' => 'Mag', 7 | '06' => 'Giu', 8 | '07' => 'Lug', 9 | '08' => 'Ago', 10 | '09' => 'Set', 11 | '10' => 'Ott', 12 | '11' => 'Nov', 13 | '12' => 'Dic', 14 | 'Jan' => 'Gennaio', 15 | 'Feb' => 'Febbraio', 16 | 'Mar' => 'Marzo', 17 | 'Apr' => 'Aprile', 18 | 'May' => 'Maggio', 19 | 'Jun' => 'Giugno', 20 | 'Jul' => 'Luglio', 21 | 'Aug' => 'Agosto', 22 | 'Sep' => 'Settembre', 23 | 'Oct' => 'Ottobre', 24 | 'Nov', => 'Novembre', 25 | 'Dec' => 'Dicembre', 26 | 'Statistics generation tooks' => 'Pagina generata in', 27 | 'Last record' => 'Ultimo record', 28 | 'Monthly' => 'Mensile', 29 | 'Days of the month' => 'Giorno del mese', 30 | 'Daily' => 'Giornaliero', 31 | 'Hours of the day' => 'Ora del giorno', 32 | 'Yearly' => 'Annuale', 33 | 'Months of the year' => 'Mese anno', 34 | 'Weekly' => 'Settimanale', 35 | 'Days of the week' => 'Giorno della settimana', 36 | 'Hourly' => 'Orario', 37 | 'Minutes of the hour' => 'Minuto ora', 38 | 'Previous' => 'Prec.', 39 | 'Next' => 'Succ.', 40 | 'Messaging statistics' => 'Statistiche messaggi', 41 | 'Statistics' => 'Statistiche', 42 | 'Top Statistics' => 'Statistiche massimi', 43 | 'Global Statistics' => 'Statistiche globali', 44 | 'Senders Statistics' => 'Statistiche mittenti', 45 | 'Top Sender Domain' => 'Domini mittenti', 46 | 'Top Sender Relay' => 'Relay invio', 47 | 'Top Sender Address' => 'Indirizzi mittenti', 48 | 'Recipients Statistics' => 'Statistiche destinatari', 49 | 'Top Recipient Domain' => 'Domini destinatari', 50 | 'Top Recipient Relay' => 'Relay destinatari', 51 | 'Top Recipients Address' => 'Indirizzi destinatari', 52 | 'Rejection Statistics' => 'Statistiche respinti', 53 | 'Top Rules' => 'Regole', 54 | 'Top Domains' => 'Domini', 55 | 'Top Relays' => 'Relay', 56 | 'Top Senders' => 'Mittenti', 57 | 'Top status' => 'Stato', 58 | 'Virus Statistics' => 'Statistiche virus', 59 | 'Top Virus' => 'Virus', 60 | 'Top Virus Senders' => 'Virus mittenti', 61 | 'Top Virus Relays' => 'Virus relay', 62 | 'Top Virus Filenames' => 'File infetti', 63 | 'Top Recipient Address' => 'Indirizzi destinatari', 64 | 'Max Number of Recipients' => 'Max numero destinatari', 65 | 'Number of Recipients' => 'Numero destinatari', 66 | 'Senders' => 'Mittenti', 67 | 'Spam Statistics' => 'Statistiche spam', 68 | 'Top Spams Rules' => 'Regole spam', 69 | 'Top Spams' => 'Spam', 70 | 'Top Spammers Domain' => 'Domini spam', 71 | 'Top Spammers Relays' => 'Relay spam', 72 | 'Top Spammers Address' => 'Indirizzi spam', 73 | 'Top Recipients Domain' => 'Destinatari spam', 74 | 'Messaging flows' => 'Flussi messaggi', 75 | 'Messaging' => 'Messaggi', 76 | 'Messages' => 'Messaggi', 77 | 'Size' => 'Dim.', 78 | 'Bytes' => 'Bytes', 79 | 'KBytes' => 'Kb', 80 | 'MBytes' => 'Mb', 81 | 'Incoming' => 'In ingresso', 82 | 'Local incoming' => 'Locali in ingresso', 83 | 'Total incoming' => 'Totali in ingresso', 84 | 'Outgoing' => 'In uscita', 85 | 'Local delivery' => 'Totali consegna', 86 | 'Total outgoing' => 'Total in uscita', 87 | 'Inbound' => 'In ingresso', 88 | 'Outbound' => 'In uscita', 89 | 'Messaging Flow' => 'Flusso messaggi', 90 | 'Number of message' => 'Numero messaggi', 91 | 'Messaging Size Flow' => 'Flusso dimensione', 92 | 'Spamming flows' => 'Flussi spam', 93 | 'Spamming' => 'Spam', 94 | 'Spamming Flow' => 'Flusso spam', 95 | 'Number of spam' => 'Numero spam', 96 | 'Spam delivery flows' => 'Flussi consegna spam', 97 | 'Internet -> Internal' => 'Esterno -> Interno', 98 | 'Internal -> Internal' => 'Interno -> Interno', 99 | 'Internal -> Internet' => 'Interno -> Esterno', 100 | 'Internet -> Internet' => 'Esterno -> Esterno', 101 | 'Unknown -> Internal' => 'Unknown -> Internal', 102 | 'Internal -> Unknown' => 'Internal -> Unknown', 103 | 'Unknown -> Internet' => 'Unknown -> External', 104 | 'Internet -> Unknown' => 'External -> Unknown', 105 | 'Unknown -> Unknown' => 'Unknown -> Unknown', 106 | 'Rejection flows' => 'Flussi respinti', 107 | 'Viruses flows' => 'Flussi virus', 108 | 'Virus Detection' => 'Virus', 109 | 'Viruses Flow' => 'Flussi virus', 110 | 'Number of virus' => 'Numero di virus', 111 | 'Viruses delivery flows' => 'Flussi consegna virus', 112 | 'Syserr flows' => 'Flussi errori', 113 | 'Rejection SysErr' => 'Respinti & Eventi', 114 | 'Messaging Status' => 'Stato messaggi', 115 | 'Percentage' => 'Percentuale', 116 | 'Total' => 'Totale', 117 | 'Ext -> Int' => 'Est -> Int', 118 | 'Ext -> Ext' => 'Est -> Est', 119 | 'Int -> Int' => 'Int -> Int', 120 | 'Int -> Ext' => 'Int -> Est', 121 | 'Unk -> Int' => 'Unk -> Int', 122 | 'Unk -> Ext' => 'Unk -> Ext', 123 | 'Int -> Unk' => 'Int -> Unk', 124 | 'Ext -> Unk' => 'Ext -> Unk', 125 | 'Unk -> Unk' => 'Unk -> Unk', 126 | 'Message delivery flows' => 'Flussi consegna messaggi', 127 | 'Delivery Direction' => 'Direzione consegna', 128 | 'Direction' => 'Direzione', 129 | 'Percentage of message' => 'Percentuale messaggi', 130 | 'Different senders/recipients' => 'Mittenti/destinatari differenti', 131 | 'Consult global statistics for' => 'Controlla statistiche globali per', 132 | 'here' => 'qui', 133 | 'Statistics for domain' => 'Statistiche per dominio', 134 | 'Month View' => 'Mese', 135 | 'Day View' => 'Giorno', 136 | 'Hour View' => 'Ora', 137 | 'Mean' => 'Dim/msg', 138 | 'Max Size Senders' => 'Mittenti file grandi', 139 | 'Message size' => 'Dimensione', 140 | 'Different senders/recipients' => 'Mittenti/destinatari differenti', 141 | 'Hour' => 'Ora', 142 | 'Sender' => 'Mittente', 143 | 'Sender Relay' => 'Relay mittente', 144 | 'Recipient Relay' => 'Relay destinatario', 145 | 'Status' => 'Stato', 146 | 'Rule' => 'Regola', 147 | 'Spam' => 'Spam', 148 | 'Virus' => 'Virus', 149 | 'File' => 'File', 150 | 'Error' => 'Errori', 151 | 'Limits' => 'Limiti', 152 | 'Years' => 'Anno', 153 | 'Recipients' => 'Destinatari', 154 | 'System messages' => 'Messaggi di sistema', 155 | 'Message' => 'Messaggio', 156 | 'Count' => 'Conteggio', 157 | 'Delivery Status Notification' => 'Notifica', 158 | 'DSN flows' => 'Delivery Status Notification', 159 | 'DSN Flow' => 'Flusso DSN', 160 | 'Number of dsn' => 'Numero di DSN', 161 | 'DSN delivery flows'=> 'Flusso consegna DSN', 162 | 'In Error' => 'Errore in entrata', 163 | 'DSN Statistics' => 'Statistiche DSN', 164 | 'Top DSN Status' => 'Stato DSN', 165 | 'Top DSN Senders' => 'Mittenti DSN', 166 | 'Top DSN Relays' => 'Relay DSN', 167 | 'Top DSN Recipients' => 'Destinatari DSN', 168 | 'No dataset' => 'Non ci sono dati per questo periodo', 169 | 'WeekDay' => 'Do Lu Ma Me Gi Ve Sa', 170 | 'AntiSpam details' => 'Dettagli AntiSpam', 171 | 'Top spam scores' => 'Punteggi spam', 172 | 'Score' => 'Punti', 173 | 'Caching statistics' => 'Statistiche cache', 174 | 'Cache' => 'Cache', 175 | 'Autolearn Statistics' => 'Autoapprendimento statistiche', 176 | 'Autolearn' => 'Autoapprendimento', 177 | 'Original Id' => 'Id originale', 178 | 'Acknowledgement' => 'The \'Bat\' logo is used with the kind permission of sendmail.org', 179 | 'SMTP Auth' => 'SMTP Auth', 180 | 'Authent Flow' => 'Flusso autenticazione', 181 | 'Mechanism' => 'Metodo', 182 | 'SMTP Auth Statistics' => 'Statistiche SMTP Auth', 183 | 'Top Mechanism' => 'Metodi', 184 | 'Top Relay' => 'Relay', 185 | 'Top Authid' => 'Authid', 186 | 'Original Recipient' => 'Destinatario originale', 187 | 'Postgrey' => 'Postgrey', 188 | 'Postgrey Status' => 'Stato Postgrey', 189 | 'Postgrey Statistics' => 'Statistiche Postgrey', 190 | 'Top Reasons' => 'Stato', 191 | 'STARTTLS status' => 'STARTTLS Stato', 192 | 'Subject' => 'Soggetto', 193 | ); 194 | -------------------------------------------------------------------------------- /cgi-bin/lang/pt_BR: -------------------------------------------------------------------------------- 1 | %::TRANSLATE = ( 2 | '01' => 'Jan', 3 | '02' => 'Fev', 4 | '03' => 'Mar', 5 | '04' => 'Abr', 6 | '05' => 'Mai', 7 | '06' => 'Jun', 8 | '07' => 'Jul', 9 | '08' => 'Ago', 10 | '09' => 'Set', 11 | '10' => 'Out', 12 | '11' => 'Nov', 13 | '12' => 'Dez', 14 | 'Jan' => 'Janeiro', 15 | 'Feb' => 'Fevereiro', 16 | 'Mar' => 'Março', 17 | 'Apr' => 'Abril', 18 | 'May' => 'Maio', 19 | 'Jun' => 'Junho', 20 | 'Jul' => 'Julho', 21 | 'Aug' => 'Agosto', 22 | 'Sep' => 'Setembro', 23 | 'Oct' => 'Outubro', 24 | 'Nov', => 'Novembro', 25 | 'Dec' => 'Dezembro', 26 | 'Statistics generation tooks' => 'Geração de Estatísticas', 27 | 'ERROR' => 'ERRO', 28 | 'Last record' => 'Último registro', 29 | 'Monthly' => 'Mensal', 30 | 'Days of the month' => 'Dias do mês', 31 | 'Daily' => 'Diária', 32 | 'Hours of the day' => 'Horas do dia', 33 | 'Yearly' => 'Anual', 34 | 'Months of the year' => 'Meses do ano', 35 | 'Weekly' => 'Semanal', 36 | 'Days of the week' => 'Dias da semana', 37 | 'Hourly' => 'Horária', 38 | 'Minutes of the hour' => 'Minutos da hora', 39 | 'Previous' => 'Anterior', 40 | 'Next' => 'Próximo', 41 | 'Messaging statistics' => 'Estatísticas de mensagens', 42 | 'Statistics' => 'Estatísticas', 43 | 'Top Statistics' => 'Principais Estatísticas', 44 | 'Global Statistics' => 'Estatísticas Globais', 45 | 'Senders Statistics' => 'Estatísticas de Envio', 46 | 'Top Sender Domain' => 'Principais Domínios de Envio', 47 | 'Top Sender Relay' => 'Principais Transportadores de Envio', 48 | 'Top Sender Address' => 'Principais Endereços de Envio', 49 | 'Recipients Statistics' => 'Estatísticas de Recebimento', 50 | 'Top Recipient Domain' => 'Principais Domínios de Recebimento', 51 | 'Top Recipient Relay' => ' Transportador de Recebimento', 52 | 'Top Recipients Address' => 'Principais Endereços de Destino', 53 | 'Rejection Statistics' => 'Estatísticas de Rejeição', 54 | 'Top Rules' => 'Principais Regras', 55 | 'Top Domains' => 'Principais Domínios', 56 | 'Top Relays' => 'Principais Transportadores', 57 | 'Top Senders' => 'Principais Remetentes', 58 | 'Top status' => 'Principais Status', 59 | 'Virus Statistics' => 'Estatísticas de Vírus', 60 | 'Top Virus' => 'Principais Vírus', 61 | 'Top Virus Senders' => 'Principais Remetentes de Vírus', 62 | 'Top Virus Relays' => 'Principais Transportadores de Vírus', 63 | 'Top Virus Filenames' => 'Principais Arquivos de Vírus', 64 | 'Top Recipient Address' => 'Principais Endereços de Destino', 65 | 'Max Number of Recipients' => 'Número Máximo de Destinatários', 66 | 'Number of Recipients' => 'Número de Destinatários', 67 | 'Senders' => 'Remetentes', 68 | 'Spam Statistics' => 'Estatísticas de Spam', 69 | 'Top Spams Rules' => 'Principais Regras de Spam', 70 | 'Top Spams' => 'Principais Spams', 71 | 'Top Spammers Domain' => 'Principais Domínios de Spammers', 72 | 'Top Spammers Relays' => 'Principais Transportadores de Spammers', 73 | 'Top Spammers Address' => 'Principais Endereços de Spammers', 74 | 'Top Recipients Domain' => 'Principais Domínios de Destino', 75 | 'Messaging flows' => 'Fluxo de Mensagens', 76 | 'Messaging' => 'Mensagens', 77 | 'Messages' => 'Mensagens', 78 | 'Size' => 'Tamanho', 79 | 'Bytes' => 'Bytes', 80 | 'KBytes' => 'Kb', 81 | 'MBytes' => 'Mb', 82 | 'Incoming' => 'Entrada', 83 | 'Local incoming' => 'Entrada Local', 84 | 'Total incoming' => 'Total de Entrada', 85 | 'Outgoing' => 'Saída', 86 | 'Local delivery' => 'Entrega local', 87 | 'Total outgoing' => 'Total de saída', 88 | 'Inbound' => 'Entrada', 89 | 'Outbound' => 'Saída', 90 | 'Messaging Flow' => 'Fluxo de Mensagens', 91 | 'Number of message' => 'Número de mensagens', 92 | 'Messaging Size Flow' => 'Fluxo do Tamanho de Mensagens', 93 | 'Spamming flows' => 'Fluxo de Spams', 94 | 'Spamming' => 'Spams', 95 | 'Spamming Flow' => 'Fluxo de Spams', 96 | 'Number of spam' => 'Número de spams', 97 | 'Spam delivery flows' => 'Fluxos de entregas de spams', 98 | 'Internet -> Interno' => 'Externo -> Interno', 99 | 'Interno -> Interno' => 'Interno -> Interno', 100 | 'Interno -> Internet' => 'Interno -> Externo', 101 | 'Internet -> Internet' => 'Externo -> Externo', 102 | 'Unknown -> Internal' => 'Unknown -> Internal', 103 | 'Internal -> Unknown' => 'Internal -> Unknown', 104 | 'Unknown -> Internet' => 'Unknown -> External', 105 | 'Internet -> Unknown' => 'External -> Unknown', 106 | 'Unknown -> Unknown' => 'Unknown -> Unknown', 107 | 'Rejection flows' => 'Fluxos de Rejeição', 108 | 'Viruses flows' => 'Fluxos de Vírus', 109 | 'Virus Detection' => 'Vírus', 110 | 'Viruses Flow' => 'Fluxo de Vírus', 111 | 'Number of virus' => 'Número de vírus', 112 | 'Viruses delivery flows' => 'Fluxos de entrega de vírus', 113 | 'Syserr flows' => 'Fluxos de Erros do Sistema', 114 | 'Rejection SysErr' => 'Rejeição & Eventos', 115 | 'Messaging Status' => 'Status de Mensagens', 116 | 'Percentage' => 'Porcentagem', 117 | 'Total' => 'Total', 118 | 'Ext -> Int' => 'Ext -> Int', 119 | 'Ext -> Ext' => 'Ext -> Ext', 120 | 'Int -> Int' => 'Int -> Int', 121 | 'Int -> Ext' => 'Int -> Ext', 122 | 'Unk -> Int' => 'Unk -> Int', 123 | 'Unk -> Ext' => 'Unk -> Ext', 124 | 'Int -> Unk' => 'Int -> Unk', 125 | 'Ext -> Unk' => 'Ext -> Unk', 126 | 'Unk -> Unk' => 'Unk -> Unk', 127 | 'Message delivery flows' => 'Fluxos de entrega de mensagem', 128 | 'Delivery Direction' => 'Direção de Entrega', 129 | 'Direction' => 'Direção', 130 | 'Percentage of message' => 'Porcentagem de mensagens', 131 | 'Different senders/recipients' => 'Diferentes remetentes/destinatários', 132 | 'Consult global statistics for' => 'Consulte as estatísticas globais para', 133 | 'here' => 'aqui', 134 | 'Statistics for domain' => 'Estatísticas por domínio', 135 | 'Month View' => 'Meses', 136 | 'Day View' => 'Dias', 137 | 'Hour View' => 'Horas', 138 | 'Mean' => 'Tam/msg', 139 | 'Max Size Senders' => 'Tamanho Máximo de Remetentes', 140 | 'Message size' => 'Tamanho da Mensagem', 141 | 'Different senders/recipients' => 'Diferentes remetentes/destinatários', 142 | 'Hour' => 'Hora', 143 | 'Sender' => 'Remetente', 144 | 'Sender Relay' => 'Transportador do Rementente', 145 | 'Recipient Relay' => 'Transportador de Destinatários', 146 | 'Status' => 'Status', 147 | 'Rule' => 'Regra', 148 | 'Spam' => 'Spam', 149 | 'Virus' => 'Virus', 150 | 'File' => 'Arquivo', 151 | 'Error' => 'Erro', 152 | 'Limits' => 'Limites', 153 | 'Recipients' => 'Destinatários', 154 | 'System messages' => 'Mensagens do Sistema', 155 | 'Message' => 'Mensagem', 156 | 'Count' => 'Quantidade', 157 | 'Years' => 'Anos', 158 | 'Delivery Status Notification' => 'Notificação', 159 | 'DSN flows' => 'Notificação Status Status', 160 | 'DSN Flow' => 'Fluxo de DSN', 161 | 'Number of dsn' => 'Número de dsn', 162 | 'DSN delivery flows'=> 'Fluxo de entrega de DSN', 163 | 'In Error' => 'Erro de Entrada', 164 | 'DSN Statistics' => 'Estatísticas por DSN', 165 | 'Top DSN Status' => 'Principais Status por DSN', 166 | 'Top DSN Senders' => 'Principais Remententes por DSN', 167 | 'Top DSN Relays' => 'Principais Transportadores por DSN', 168 | 'Top DSN Recipients' => 'Principais Destinatários por DSN', 169 | 'No dataset' => 'Nenhum registro para este período', 170 | 'WeekDay' => 'Dom Seg Ter Qua Qui Sex Sab', 171 | 'AntiSpam details' => 'Detalhes do AntiSpam', 172 | 'Top spam scores' => 'Principais Pontuações de Spam', 173 | 'Score' => 'Pontuação', 174 | 'Caching statistics' => 'Estatísticas de Cache', 175 | 'Cache' => 'Cache', 176 | 'Autolearn Statistics' => 'Estatísticas de Auto-Aprendizado', 177 | 'Autolearn' => 'Auto-Aprendizado', 178 | 'Original Id' => 'ID Original', 179 | 'Acknowledgement' => 'O logo \'Bat\' é usado com a permissão do sendmail.org', 180 | 'SMTP Auth' => 'Autenticação SMTP', 181 | 'Authent Flow' => 'Fluxo de Autenticação', 182 | 'Mechanism' => 'Mecanismo', 183 | 'SMTP Auth Statistics' => 'Estatísticas de Autenticação SMTP', 184 | 'Top Mechanism' => 'Principais Mecanismos', 185 | 'Top Relay' => 'Principais Transportadores', 186 | 'Top Authid' => 'Principais AuthID', 187 | 'Original Recipient' => 'Destinatário Original', 188 | 'Postgrey flows' => 'Fluxos de Postgrey', 189 | 'Postgrey usage' => 'Uso de Postgrey', 190 | 'Postgrey Statistics' => 'Estatísticas de Postgrey', 191 | 'Postgrey status' => 'Status do Postgrey', 192 | 'Postgrey Status' => 'Status do Postgrey', 193 | 'Top Reasons' => 'Principais Status', 194 | 'STARTTLS status' => 'STARTTLS Status', 195 | 'Subject' => 'Assunto', 196 | ); 197 | -------------------------------------------------------------------------------- /cgi-bin/lang/ru_RU: -------------------------------------------------------------------------------- 1 | %::TRANSLATE = ( 2 | '01' => 'Янв', 3 | '02' => 'Фев', 4 | '03' => 'Мар', 5 | '04' => 'Апр', 6 | '05' => 'Май', 7 | '06' => 'Июн', 8 | '07' => 'Июл', 9 | '08' => 'Авг', 10 | '09' => 'Сен', 11 | '10' => 'Окт', 12 | '11' => 'Ноя', 13 | '12' => 'Дек', 14 | 'Jan' => 'Январь', 15 | 'Feb' => 'Февраль', 16 | 'Mar' => 'Март', 17 | 'Apr' => 'Апрель', 18 | 'May' => 'Май', 19 | 'Jun' => 'Июнь', 20 | 'Jul' => 'Июль', 21 | 'Aug' => 'Август', 22 | 'Sep' => 'Сентябрь', 23 | 'Oct' => 'Октябрь', 24 | 'Nov', => 'Ноябрь', 25 | 'Dec' => 'Декабрь', 26 | 'Statistics generation tooks' => 'Глобалная статистика', 27 | 'Last record' => 'Последняя запись', 28 | 'Monthly' => 'Месячно', 29 | 'Days of the month' => 'День', 30 | 'Daily' => 'Ежедневно', 31 | 'Hours of the day' => 'Часов', 32 | 'Yearly' => 'Годовой', 33 | 'Months of the year' => 'Месяц', 34 | 'Weekly' => 'Weekly', 35 | 'Days of the week' => 'Выходной', 36 | 'Hourly' => 'Часов', 37 | 'Minutes of the hour' => 'Минут', 38 | 'Previous' => 'Предыдущая', 39 | 'Next' => 'Следующая', 40 | 'Messaging statistics' => 'Статистика сообщений', 41 | 'Statistics' => 'Статистика', 42 | 'Top Statistics' => 'Топ статистики', 43 | 'Global Statistics' => 'Глобальная статистика', 44 | 'Senders Statistics' => 'Статистика по отправителю', 45 | 'Top Sender Domain' => 'Топ домен по отправителю', 46 | 'Top Sender Relay' => 'Топ релей по отправителю', 47 | 'Top Sender Address' => 'Топ адрес по отправителю', 48 | 'Recipients Statistics' => 'Статистика по получателю', 49 | 'Top Recipient Domain' => 'Топ домен по получателю', 50 | 'Top Recipient Relay' => 'Топ релей по получателю', 51 | 'Top Recipients Address' => 'Топ адреса по получателю', 52 | 'Rejection Statistics' => 'Статистика по отказам', 53 | 'Top Rules' => 'Топ правила', 54 | 'Top Domains' => 'Топ доменов', 55 | 'Top Relays' => 'Топ релеев', 56 | 'Top Senders' => 'Топ отправители', 57 | 'Top status' => 'Топ статус', 58 | 'Virus Statistics' => 'Статистика по вирусам', 59 | 'Top Virus' => 'Топ вирус', 60 | 'Top Virus Senders' => 'Топ отправители на вирусы', 61 | 'Top Virus Relays' => 'Топ вирусов релеи', 62 | 'Top Virus Filenames' => 'Топ вирусов файлы', 63 | 'Top Recipient Address' => 'Топ адреса по получателям', 64 | 'Max Number of Recipients' => 'Максимальное кол-во получателей', 65 | 'Number of Recipients' => 'Количество получателей', 66 | 'Senders' => 'Отправители', 67 | 'Spam Statistics' => 'Спам статистика', 68 | 'Top Spams Rules' => 'Топ спам правил', 69 | 'Top Spams' => 'Топ спам', 70 | 'Top Spammers Domain' => 'Топ спам доменов', 71 | 'Top Spammers Relays' => 'Топ спам релеев', 72 | 'Top Spammers Address' => 'Топ спам адресатов', 73 | 'Top Recipients Domain' => 'Топ домен по получателям', 74 | 'Messaging flows' => 'Потоков по собщениям', 75 | 'Messaging' => 'Обработка по собщениям', 76 | 'Messages' => 'Собщения', 77 | 'Size' => 'Размер', 78 | 'Bytes' => 'Байтов', 79 | 'KBytes' => 'Кб', 80 | 'MBytes' => 'Мб', 81 | 'Incoming' => 'Входящие', 82 | 'Local incoming' => 'Входящие локально', 83 | 'Total incoming' => 'Входящие всего', 84 | 'Outgoing' => 'Исходящие', 85 | 'Local delivery' => 'Локальная доставка', 86 | 'Total outgoing' => 'Общее исходящих', 87 | 'Inbound' => 'Входящие', 88 | 'Outbound' => 'Исходящие', 89 | 'Messaging Flow' => 'Потоков в собщениях', 90 | 'Number of message' => 'Номер собщения', 91 | 'Messaging Size Flow' => 'Размер потока собщения', 92 | 'Spamming flows' => 'Спам потоки', 93 | 'Spamming' => 'Обработка спама', 94 | 'Spamming Flow' => 'Спам поток', 95 | 'Number of spam' => 'Количество спама', 96 | 'Spam delivery flows' => 'Спам потоки входящие', 97 | 'Internet -> Internal' => 'Внешнее -> Внутренее', 98 | 'Internal -> Internal' => 'Внутренее -> Внутренее', 99 | 'Internal -> Internet' => 'Внутренее -> Внешнее', 100 | 'Internet -> Internet' => 'Внешнее -> Внешнее', 101 | 'Unknown -> Internal' => 'Unknown -> Internal', 102 | 'Internal -> Unknown' => 'Internal -> Unknown', 103 | 'Unknown -> Internet' => 'Unknown -> External', 104 | 'Internet -> Unknown' => 'External -> Unknown', 105 | 'Unknown -> Unknown' => 'Unknown -> Unknown', 106 | 'Rejection flows' => 'Отказано потокам', 107 | 'Viruses flows' => 'Вирус в потоке', 108 | 'Virus Detection' => 'Вирус', 109 | 'Viruses Flow' => 'Вирус поток', 110 | 'Number of virus' => 'Количество вирусов', 111 | 'Viruses delivery flows' => 'Вирус в потоке', 112 | 'Syserr flows' => 'Потоки с ошибками', 113 | 'Rejection SysErr' => 'Отказ в обработке ', 114 | 'Messaging Status' => 'Статус', 115 | 'Percentage' => 'Процент', 116 | 'Total' => 'Общий', 117 | 'Ext -> Int' => 'Внеш -> Внут', 118 | 'Ext -> Ext' => 'Внеш -> Внеш', 119 | 'Int -> Int' => 'Внут -> Внут', 120 | 'Int -> Ext' => 'Внут -> Внеш', 121 | 'Unk -> Int' => 'Unk -> Int', 122 | 'Unk -> Ext' => 'Unk -> Ext', 123 | 'Int -> Unk' => 'Int -> Unk', 124 | 'Ext -> Unk' => 'Ext -> Unk', 125 | 'Unk -> Unk' => 'Unk -> Unk', 126 | 'Message delivery flows' => 'Потоки для доставки', 127 | 'Delivery Direction' => 'Направление доставки', 128 | 'Direction' => 'Направление', 129 | 'Percentage of message' => 'Процент сообщений', 130 | 'Different senders/recipients' => 'Различные отправители/получатели', 131 | 'Consult global statistics for' => 'Глобальная статистика за', 132 | 'here' => 'тут', 133 | 'Statistics for domain' => 'Доменная статистика', 134 | 'Month View' => 'За месяц', 135 | 'Day View' => 'За день', 136 | 'Hour View' => 'За час', 137 | 'Mean' => 'Размер/собщения', 138 | 'Max Size Senders' => 'Максимальный размер сообщения', 139 | 'Message size' => 'Размер собщения', 140 | 'Different senders/recipients' => 'Различные отправители/получатели', 141 | 'Hour' => 'Час', 142 | 'Sender' => 'Отправитель', 143 | 'Sender Relay' => 'Релей отправителя', 144 | 'Recipient Relay' => 'Релей получателя', 145 | 'Status' => 'Статус', 146 | 'Rule' => 'Правило', 147 | 'Spam' => 'Спам', 148 | 'Virus' => 'Вирус', 149 | 'File' => 'Файл', 150 | 'Error' => 'Ошибка', 151 | 'Limits' => 'Лимит', 152 | 'Years' => 'Год', 153 | 'Recipients' => 'Получатели', 154 | 'System messages' => 'Системные собщения', 155 | 'Message' => 'Собщение', 156 | 'Count' => 'Колличество', 157 | 'Delivery Status Notification' => 'Уведомление DSN', 158 | 'DSN flows' => 'DSN потоки', 159 | 'DSN Flow' => 'DSN поток', 160 | 'Number of dsn' => 'Колличество на DSN', 161 | 'DSN delivery flows'=> 'DSN потоков на получателя', 162 | 'In Error' => 'Входящие ошибки', 163 | 'DSN Statistics' => 'DSN статистика', 164 | 'Top DSN Status' => 'Топ DSN статус', 165 | 'Top DSN Senders' => 'Топ DSN отправители', 166 | 'Top DSN Relays' => 'Топ DSN релеи', 167 | 'Top DSN Recipients' => 'Топ DSN получатели', 168 | 'No dataset' => 'Нет записей за период', 169 | 'WeekDay' => 'Вс Пн Вт Ср Чт Пт Сб', 170 | 'AntiSpam details' => 'Антиспам детали', 171 | 'Top spam scores' => 'Топ спам результаты', 172 | 'Score' => 'Результат', 173 | 'Caching statistics' => 'Кеш статистика', 174 | 'Cache' => 'Кеш', 175 | 'Autolearn Statistics' => 'Статистика на автообучение', 176 | 'Autolearn' => 'Автообучение', 177 | 'Original Id' => 'Оригинальный id', 178 | 'Acknowledgement' => '\'Bat\' логотип с sendmail.org', 179 | 'SMTP Auth' => 'SMTP авт.', 180 | 'Authent Flow' => 'Поток на аутентификацию', 181 | 'Mechanism' => 'Механизмы', 182 | 'SMTP Auth Statistics' => 'Статистика на SMTP авт.', 183 | 'Top Mechanism' => 'Топ механизмы', 184 | 'Top Relay' => 'Топ релей', 185 | 'Top Authid' => 'Топ авт. id', 186 | 'Original Recipient' => 'Получатель (истинен)', 187 | 'Postgrey' => 'Postgrey', 188 | 'Postgrey Statistics' => 'Postgrey статистика', 189 | 'Postgrey Status' => 'Postgrey статус', 190 | 'Top Reasons' => 'Топ причина', 191 | 'STARTTLS status' => 'STARTTLS статус', 192 | 'Subject' => 'предмет', 193 | ); 194 | 195 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | sendmailanalyzer (9.4) unstable; urgency=low 2 | 3 | * Initial release Git 4 | 5 | -- Dominique Fournier Mon, 03 Jun 2013 11:03:19 +0100 6 | 7 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 8 2 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: sendmailanalyzer 2 | Section: mail 3 | Priority: optional 4 | Maintainer: Dominique Fournier 5 | Build-Depends: debhelper (>= 4.0.0) 6 | Standards-Version: 3.9.4 7 | 8 | Package: sendmailanalyzer 9 | Priority: optional 10 | Homepage: http://sareport.darold.net/ 11 | Architecture: all 12 | Pre-Depends: perl 13 | Depends: apache2, ${perl:Depends}, ${misc:Depends} 14 | Description: Perl Sendmail/Postfix log analyser 15 | SendmailAnalyzer continuously read your mail log file to generate 16 | periodical HTML and graph reports. All reports are shown through 17 | a CGI web interface. 18 | It reports all you ever wanted to know about email trafic on your network. 19 | You can also use it in ISP environment with per domain report. 20 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: SendmailAnalyzer 3 | Source: https://github.com/darold/sendmailanalyzer 4 | 5 | Files: * 6 | Copyright: Copyright 2002-2020 Gilles Darold 7 | License: GPL-3+ 8 | This program is free software; you can redistribute it 9 | and/or modify it under the terms of the GNU General Public 10 | License as published by the Free Software Foundation; either 11 | version 3 of the License, or (at your option) any later 12 | version. 13 | . 14 | This program is distributed in the hope that it will be 15 | useful, but WITHOUT ANY WARRANTY; without even the implied 16 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 17 | PURPOSE. See the GNU General Public License for more 18 | details. 19 | . 20 | You should have received a copy of the GNU General Public 21 | License along with this package; if not, write to the Free 22 | Software Foundation, Inc., 51 Franklin St, Fifth Floor, 23 | Boston, MA 02110-1301 USA 24 | . 25 | On Debian systems, the full text of the GNU General Public 26 | License version 3 can be found in the file 27 | `/usr/share/common-licenses/GPL-3'. 28 | 29 | -------------------------------------------------------------------------------- /debian/dirs: -------------------------------------------------------------------------------- 1 | var/lib/sendmailanalyzer/ 2 | -------------------------------------------------------------------------------- /debian/docs: -------------------------------------------------------------------------------- 1 | README 2 | changelog 3 | -------------------------------------------------------------------------------- /debian/files: -------------------------------------------------------------------------------- 1 | sendmailanalyzer_9.4_all.deb mail optional 2 | sendmailanalyzer_9.4_amd64.buildinfo mail optional 3 | -------------------------------------------------------------------------------- /debian/install: -------------------------------------------------------------------------------- 1 | sendmailanalyzer usr/bin 2 | sa_cache usr/bin 3 | flotr2.js usr/share/sendmailanalyzer 4 | sorttable.js usr/share/sendmailanalyzer 5 | salogo.png usr/share/sendmailanalyzer 6 | cgi-bin/lang usr/share/sendmailanalyzer 7 | cgi-bin/sa_report.cgi usr/share/sendmailanalyzer 8 | debian/sendmailanalyzer.conf etc 9 | debian/sendmailanalyzer.apache.conf etc/apache2/conf.d 10 | changelog usr/share/doc/sendmailanalyzer 11 | README usr/share/doc/sendmailanalyzer 12 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | # Sample debian/rules that uses debhelper. 4 | # This file was originally written by Joey Hess and Craig Small. 5 | # As a special exception, when this file is copied by dh-make into a 6 | # dh-make output file, you may use that output file without restriction. 7 | # This special exception was added by Craig Small in version 0.37 of dh-make. 8 | 9 | # Uncomment this to turn on verbose mode. 10 | #export DH_VERBOSE=1 11 | 12 | build: 13 | dh_auto_configure 14 | dh_auto_build 15 | sed -i 's#my $$CONFIG_FILE .*#my $$CONFIG_FILE = "/etc/sendmailanalyzer.conf";#' cgi-bin/*.cgi sendmailanalyzer sa_cache 16 | cp ChangeLog changelog 17 | pod2man doc/sendmailanalyzer.pod sendmailanalyzer.1 18 | pod2man doc/sa_cache.pod sa_cache.1 19 | 20 | clean: 21 | dh_testdir 22 | dh_testroot 23 | dh_clean 24 | 25 | install: build 26 | dh_testdir 27 | dh_testroot 28 | dh_prep 29 | dh_installdirs 30 | dh_installdocs 31 | chmod 0755 sendmailanalyzer sa_cache cgi-bin/sa_report.cgi 32 | dh_install 33 | 34 | # Build architecture-dependent files here. 35 | binary: build install 36 | dh_testdir 37 | dh_testroot 38 | dh_installchangelogs 39 | # dh_installdocs 40 | # dh_installexamples 41 | # dh_install 42 | # dh_installmenu 43 | # dh_installdebconf 44 | # dh_installlogrotate 45 | # dh_installemacsen 46 | # dh_installpam 47 | # dh_installmime 48 | dh_installinit 49 | dh_installcron 50 | # dh_installinfo 51 | dh_installman 52 | dh_link 53 | # dh_strip 54 | dh_compress 55 | dh_fixperms 56 | dh_perl 57 | # dh_python 58 | # dh_makeshlibs 59 | dh_installdeb 60 | # dh_shlibdeps 61 | dh_gencontrol 62 | dh_md5sums 63 | dh_builddeb 64 | 65 | #binary: binary-indep binary-arch 66 | .PHONY: build-arch build-indep clean binary-indep binary-arch binary install configure 67 | -------------------------------------------------------------------------------- /debian/sendmailanalyzer.apache.conf: -------------------------------------------------------------------------------- 1 | # 2 | # By default SendmailAnalyzer statistics are only accessible from localhost. 3 | # 4 | Alias /sareport /usr/share/sendmailanalyzer 5 | 6 | 7 | Options ExecCGI 8 | AddHandler cgi-script .cgi 9 | DirectoryIndex sa_report.cgi 10 | Order deny,allow 11 | Deny from all 12 | Allow from 127.0.0.1 13 | Allow from ::1 14 | # Allow from .example.com 15 | 16 | 17 | -------------------------------------------------------------------------------- /debian/sendmailanalyzer.conf: -------------------------------------------------------------------------------- 1 | 2 | # Path to the maillog file to analyse. 3 | # Can be overwritten with --log or -l 4 | LOG_FILE /var/log/maillog 5 | 6 | # journalctl command to use instead of log file entry. For postfix 7 | # it migth be set to the following. When enabled, the LOG_FILE 8 | # configuration directive above is just ommitted. Note that in daemon 9 | # mode sendmailanalyzer will automatically add the -f option to the 10 | # command. The additional option: --output="short-iso" is also always 11 | # used to format timestamp. Can be overwritten with --journalctl or 12 | # -j options. 13 | #JOURNALCTL_CMD journalctl -u postfix 14 | 15 | # Path to store the pid file (sendmailanalyzer.pid). 16 | PID_DIR /var/run 17 | 18 | # Path to the system tail command. 19 | # Can be overwritten with --tail or -t 20 | TAIL_PROG /usr/bin/tail 21 | 22 | # tail system command argument to pass. 23 | # Can be overwritten with --args or -a 24 | TAIL_ARGS -n 0 -F 25 | 26 | # zcat system command used to parse compressed log file 27 | ZCAT_PROG /bin/zcat 28 | 29 | # Output directory for data storage. 30 | # Can be overwritten with --output or -o 31 | OUT_DIR /usr/local/sendmailanalyzer/data 32 | 33 | # Turn on/off debug mode. 34 | # Can be overwritten with --debug or -d 35 | DEBUG 0 36 | 37 | # Parse maillog from begining before running tail program. Default 38 | # is to read LAST_PARSED file to start from last collected event. 39 | # Can be overwritten with --full or -f 40 | FULL 0 41 | 42 | # Parse maillog from begining before running tail program but 43 | # force sendmailanalyzer to never use the LAST_PARSED file. 44 | # Can be overwritten with --force or -F 45 | FORCE 0 46 | 47 | # Do not run tail program and exit after a full parsing of the log file 48 | # Can be overwritten with --break or -b 49 | BREAK 0 50 | 51 | # Delay in second to flush to disk collected data. 52 | # Can be overwritten with --write-delay or -w 53 | DELAY 5 54 | 55 | # Syslog name of the MTA. Syslog write it to maillog with the pid as follow: 56 | # ... sendmail[1234] ... This is required to only parse relevant logged lines 57 | # Can be overwritten with --sendmail or -s 58 | # You can set multiple Syslog name as a list separated by a pipe '|' 59 | MTA_NAME sm-mta|sendmail|postfix|spampd 60 | 61 | # Exclude all lines matching a regexp from being parsed, for example to 62 | # exclude log line reported by the randomizer script, skip line with the 63 | # following regex. Character # in the regex need to be escaped with a backslash. 64 | # Use it to prevent unwanted line to be reported in Rejection reports. 65 | #EXCLUDE_LINE postfix/randomizer 66 | 67 | # Syslog name of MailScanner. Syslog write it to maillog with the pid as follow: 68 | # ... MailScanner[1234] ... This is required to only parse relevant logged lines 69 | # Can be overwritten with --mailscanner or -m 70 | MAILSCAN_NAME MailScanner 71 | 72 | # Number of object displayed in the top statistics 73 | TOP 25 74 | 75 | # Number of object displayed in the top mailbox statistics 76 | TOP_MBOX 25 77 | 78 | # Space separated list of ip addresses of the mail hubs (where email are redirected 79 | # if this host is a gateway or a hub) 80 | MAIL_HUB 81 | 82 | # Space separated list of ip addresses of the MTA gateway (where external mail 83 | # comes from if this host is a hub or a delivery system) 84 | MAIL_GW 85 | 86 | # Default domain or hostname to add to an email address if there's just the 87 | # username. When the host is a delivery system it is possible that the user 88 | # email address do not have the domain part (ex: @domain.com). By default 89 | # SendmailAnalyzer will add the '@localhost' domain but you may want to change 90 | # this domain, so use this directive 91 | DEFAULT_DOMAIN @localhost 92 | 93 | # Max number of recipient per message to report sender 94 | MAX_RCPT 25 95 | 96 | # Max size per message to report sender in byte 97 | MAX_SIZE 10000000 98 | 99 | # Select sa_cache freeing space method: 100 | # - delete: remove all daily data files before the current month 101 | # - archive: make a gzipped tarbal of all data files before the current month 102 | # - none: don't do anything. Need lot of space disk. 103 | # Default is delete. 104 | FREE_SPACE archive 105 | 106 | # Force sa_cache to free space each week instead of monthly by default. 107 | WEEKLY_FREE_SPACE 0 108 | 109 | # Compute statistics and cache for a list of domain and display a link in the 110 | # front page for a per domain access. See DOMAIN_USER if you want to grant 111 | # special access on these pages. You can have multiple DOMAIN_REPORT lines 112 | # for better reading. 113 | # If you are running rsyslog with multiple host use DOMAIN_HOST_REPORT instead. 114 | # See DOMAIN_USER if you want to grant special access on these pages. 115 | #DOMAIN_REPORT domain1.com,domain2.com 116 | 117 | # Same as above but with host distinction for use with rsyslog. 118 | # You can have multiple LOCAL_HOST_DOMAIN lines, ie: one per host. 119 | #DOMAIN_HOST_REPORT sysloghost1 domain1.com,domain2.com 120 | #DOMAIN_HOST_REPORT sysloghost2 domain3.com,domain4.com 121 | 122 | # Path to the language translation file (relative to the CGI directory). 123 | # Default: lang/en_US 124 | #LANG lang/fr_FR 125 | 126 | # Size Unit to use, default is Bytes. Other values are KBytes and MBytes 127 | SIZE_UNIT MBytes 128 | 129 | # Max line to show in detail view. Default is 100 130 | MAX_LINE 100 131 | 132 | # List of admin users separated by comma 133 | # They will have full access to all report 134 | #ADMIN sa_admin 135 | 136 | #List of per user domain access control. The first field is the username and 137 | #the second field (separated by tabulation) is a comma separated list of domain 138 | #name to be allowed to this user. You could add as many lines of DOMAIN_USER 139 | #as you want in the configuration file. 140 | #DOMAIN_USER user1 domain1.com,domain3.com 141 | #DOMAIN_USER user2 domain2.com,... 142 | 143 | # Path to the Sendmail.org logo. Default current directory 144 | URL_LOGO salogo.png 145 | 146 | # Path to the flotr2 javascript library. Default current directory 147 | URL_JSCRIPT flotr2.js 148 | 149 | # Path to the sortable javascript library. Default current directory 150 | URL_SORTABLE sorttable.js 151 | 152 | # Syslog name of Amavis. Syslog write it to maillog with the pid as follow: 153 | # ... amavis[1234] ... This is required to only parse relevant logged lines 154 | AMAVIS_NAME \/usr\/sbin\/amavisd-new|amavis|maiad 155 | 156 | # Path to SMTP error code file (relative to the CGI directory) 157 | # Default: lang/ERROR_CODE 158 | ERROR_CODE lang/ERROR_CODE 159 | 160 | # Comma separated list of internal domain to be used when sendmailanalyzer is 161 | # running on a mail host which received message from any side. SA can't know 162 | # what message are internal or external in this case, so the only way to know 163 | # if a mail come from Internet or Lan/Wan is to check the domain part of the 164 | # relay sender address. You can have multiple LOCAL_DOMAIN lines for better 165 | # reading. You can also give a file containing a list of domain, one per line. 166 | # If you are running rsyslog with multiple host use LOCAL_HOST_DOMAIN instead. 167 | # See VIRTUAL_DOMAIN_DB bellow if your virtual domains are stored in a database. 168 | #LOCAL_DOMAIN domain1.com,domain2.com 169 | 170 | # Same as above but with host distinction for use with rsyslog. 171 | # You can have multiple LOCAL_HOST_DOMAIN lines, ie: one per host. 172 | #LOCAL_HOST_DOMAIN sysloghost1 domain1.com,domain2.com 173 | 174 | # If you're running a mailserver with virtual domains in a database this option 175 | # will allow sendmailanalyzer to perform domain-lookups in the database to 176 | # determine whether this domain is external or internal (like the LOCAL_DOMAIN 177 | # option above. This will come with decent database load depending on how much 178 | # traffic your mailserver experiences as every domain will be matched against 179 | # your database. 180 | # Leave this unconfigured if you don't have virtual domains in a database set up 181 | # otherwise sendmailanalyzer will exit with an error. 182 | #VIRTUAL_DOMAIN_DB DBI:mysql:database=mailserver:host=localhost 183 | #VIRTUAL_DOMAIN_DB DBI:Pg:dbname=mailserver;host=localhost;port=5432 184 | 185 | # Username for the database connection 186 | #VIRTUAL_DOMAIN_DB_USER username 187 | 188 | # Password for the database connection 189 | #VIRTUAL_DOMAIN_DB_PASS secret 190 | 191 | # Query to select the list of domain from the database. Sendmailanalyzer will 192 | # load the list into the LOCAL_DOMAIN array. This list will be checked against 193 | # sender or recipient relay to determine the email direction. 194 | #VIRTUAL_DOMAIN_DB_QUERY SELECT name FROM virtual_domains 195 | 196 | # Syslog name of MimeDefang. Syslog write it to maillog with the pid as follow: 197 | # ... mimedefang.pl[1234] ... This is required to only parse relevant logged lines 198 | # Based on parsing mimedefang log generated by method md_graphdefang_log() 199 | MD_NAME mimedefang.pl 200 | 201 | # Anonymize reports. This remove sender and recipient adresses from reports. 202 | ANONYMIZE 0 203 | 204 | # Replace some hostname in all relay information for anonymization 205 | # You must used one REPLACE_HOST line per replacement. 206 | REPLACE_HOST internal.relay.dom external.relay.dom 207 | 208 | # Make report for Spam detail. Default is enable. This allow you to see score 209 | # and complete detail of your favorite antispam. 210 | SPAM_DETAIL 1 211 | 212 | # Enable/Disable SMTP Auth view. Note that it is already disable in per domain 213 | # views. Default show it: 1 214 | SMTP_AUTH 1 215 | 216 | # Enable/Disable Spam views. Default show it: 1 217 | SPAM_VIEW 1 218 | 219 | # Enable/Disable Virus views. Default show it: 1 220 | VIRUS_VIEW 1 221 | 222 | # Enable/Disable Notification views. Default show it: 1 223 | DSN_VIEW 1 224 | 225 | # Enable/Disable Postgrey usage views. Default show it: 1 226 | POSTGREY_VIEW 1 227 | 228 | # List of antispam name separated by a comma used for Spam details view. You may 229 | # want to custom this list to just show menu link on available reports. Default 230 | # list is: spamdmilter,jchkmail,dnsbl,spamassassin,amavis,mimedefang,dnsblmilter,spamd,policydweight 231 | SPAM_TOOLS spamdmilter,jchkmail,dnsbl,spamassassin,amavis,mimedefang,dnsblmilter,spamd,policydweight 232 | 233 | # Enable/Disable messaging/spam/virus/dsn direction statistics. Default is show. 234 | # On some mailhost this could show wrong information if the direction could 235 | # not be easily determined. So you can remove these views by setting it to 0. 236 | SHOW_DIRECTION 1 237 | 238 | # Use to combined mailhost report on a single report. This allow you to 239 | # aggregate multiple mailhost that syslogs to a remote server throught 240 | # rsyslog to have only one SendmailAnalyzer report. The value must only use 241 | # alphanumeric character as it is used to create subdirectory. 242 | #MERGING_HOST agghostname 243 | 244 | # Syslog name of Clamd. When using Mailscanner with clamd if you want virus 245 | # report you must configure clamd to log with syslog and use LOCAL_MAIL. 246 | # ... clamd[1234] ... 247 | # Can be overwritten with --clamd or -n 248 | CLAMD_NAME clamd 249 | 250 | # Syslog name of Clamsmtpd. 251 | # ... clamsmtpd: ... 252 | CLAMSMTPD_NAME clamsmtpd 253 | 254 | # Syslog name of Postgrey. Syslog write it to maillog with the pid as follow: 255 | # ... postgrey[1234] ... This is required to only parse relevant logged lines 256 | # Can be overwritten with --postgrey or -g 257 | POSTGREY_NAME postgrey|sqlgrey 258 | 259 | # Syslog name of SPF and DKIM log entry. Syslog write it to maillog with the 260 | # pid as follow: ... opendmarc[1234] ... 261 | SPF_DKIM_NAME opendmarc|opendkim 262 | 263 | # HTML charset to use. Default is iso-8859-1, but with cyrillics you may want 264 | # to use utf-8 instead. 265 | #HTML_CHARSET utf-8 266 | 267 | # Use this to set the recipient relay used for local delivery if your message 268 | # appears twice in details view and in messaging, sender and recipient counter. 269 | # This is especially right with postfix configured to have local delivery 270 | # via dovecot service. Default: dovecot, that mean that recipient log lines with 271 | # relay=dovecot will instruct sendmailanalyzer to skip those messages. One 272 | # other common value is 127.0.0.1 273 | SKIP_RCPT_RELAY dovecot 274 | 275 | # Syslog name of Spamd. Syslog write it to maillog with the pid as follow: 276 | # ... spamd[1234] ... This is required to only parse relevant logged lines 277 | # Can be overwritten with --spamd 278 | SPAMD_NAME spamd 279 | 280 | # Pipe separated list of destination email address that should be excluded 281 | # from the report. They will not be reported into data files too. The value 282 | # should be a valid regex, the addresses will be search in all destination 283 | # adresses like $TO =~ /^$EXCLUDE_TO$/ 284 | EXCLUDE_TO bcc-addr1@domain1.com|bcc-addr2@domain2.com 285 | 286 | # Pipe separated list of sender email address that should be excluded 287 | # from the report. They will not be reported into data files too. The value 288 | # should be a valid regex, the addresses will be search in all senders 289 | # adresses like $FROM =~ /^$EXCLUDE_FROM$/ 290 | EXCLUDE_FROM addr1@domain1.com|addr2@domain2.com 291 | 292 | # Pipe separated list of sender relay ip addresses that should be excluded 293 | # from the report. They will not be reported into data files too. The value 294 | # should be a valid regex, the addresses will be search in all senders relay 295 | # ip adresses like $RELAY =~ /^$EXCLUDE_RELAY$/ 296 | EXCLUDE_RELAY addr1@domain1.com|addr2@domain2.com 297 | 298 | # When enabled it allow email subjects to be shown in detailed view. Of course 299 | # The log file must contain this information. 300 | SHOW_SUBJECT 0 301 | 302 | # When activated, remove domain part of the syslog hostname. Some programme 303 | # use FQDN instead of the single hostname. Set it to 1 if you have two report 304 | # for the same hostname but one with the domain part. 305 | NO_HOST_DOMAIN 0 306 | 307 | # On some MTA, message delivery is done outside and only queuing is logged, 308 | # this mean that messages are counted as incoming but not delivered. Enable 309 | # this directive to force sendmailanalyzer to take them as sent. 310 | NO_QUEUE_EXCLUSION 0 311 | 312 | # Custom milter-reject regex detected as spam 313 | #MILTER_REJECT_REGEX Mailbox not found 314 | -------------------------------------------------------------------------------- /debian/sendmailanalyzer.cron.d: -------------------------------------------------------------------------------- 1 | # SendmailAnalyzer log reporting daily cache 2 | 0 1 * * * root /usr/bin/sa_cache > /dev/null 2>&1 3 | # Daemon restart after mail.log logrotate (cron jobs at 6:25 every day) 4 | 26 6 * * * root /etc/init.d/sendmailanalyzer restart >/dev/null 2>&1 5 | # On huge MTA you may want to have five minutes caching 6 | */5 * * * * root /usr/bin/sa_cache -a > /dev/null 2>&1 7 | -------------------------------------------------------------------------------- /debian/sendmailanalyzer.init: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ### BEGIN INIT INFO 3 | # Provides: sendmailanalyzer 4 | # Required-Start: $local_fs $remote_fs $network $syslog $named 5 | # Required-Stop: $local_fs $remote_fs $network $syslog $named 6 | # Default-Start: 2 3 4 5 7 | # Default-Stop: 0 1 6 8 | # Short-Description: Start/stop sendmailanalyzer server 9 | ### END INIT INFO 10 | 11 | # 12 | # Start/stop/restart SendmailAnalyzer. 13 | # 14 | 15 | NAME=sendmailanalyzer 16 | DAEMON=/usr/bin/sendmailanalyzer 17 | PIDFILE=/var/run/sendmailanalyzer.pid 18 | DESC="Sendmail Analyzer" 19 | OPTIONS="-f" 20 | 21 | # Exit if the package is not installed 22 | [ -x "$DAEMON" ] || exit 0 23 | 24 | # Read configuration variable file if it is present 25 | [ -r /etc/default/$NAME ] && . /etc/default/$NAME 26 | 27 | # Define LSB log_* functions. 28 | . /lib/lsb/init-functions 29 | 30 | # Start SendmailAnalyzer: 31 | sa_start() { 32 | # Return 33 | # 0 if daemon has been started 34 | # 1 if daemon was already running 35 | # other if daemon could not be started or a failure occured 36 | start-stop-daemon --status --pidfile $PIDFILE 37 | [ $? -eq 0 ] && return 1 38 | start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $OPTIONS 39 | } 40 | 41 | # Stop SendmailAnalyzer: 42 | sa_stop() { 43 | # Return 44 | # 0 if daemon has been stopped 45 | # 1 if daemon was already stopped 46 | # other if daemon could not be stopped or a failure occurred 47 | start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE 48 | } 49 | 50 | # Restart SendmailAnalyzer: 51 | sa_restart() { 52 | sa_stop 53 | sleep 2 54 | sa_start 55 | } 56 | 57 | case "$1" in 58 | start) 59 | log_daemon_msg "Starting $DESC" "$NAME" 60 | sa_start 61 | case "$?" in 62 | 0) log_end_msg 0 ;; 63 | 1) log_progress_msg "already started" 64 | log_end_msg 0 ;; 65 | *) log_end_msg 1 ;; 66 | esac 67 | ;; 68 | stop) 69 | log_daemon_msg "Stopping $DESC" "$NAME" 70 | sa_stop 71 | case "$?" in 72 | 0) log_end_msg 0 ;; 73 | 1) log_progress_msg "already stopped" 74 | log_end_msg 0 ;; 75 | *) log_end_msg 1 ;; 76 | esac 77 | 78 | ;; 79 | restart|force-reload) 80 | $0 stop 81 | $0 start 82 | ;; 83 | *) 84 | echo "usage $0 start|stop|force-reload|restart" 85 | exit 3 86 | ;; 87 | esac 88 | 89 | -------------------------------------------------------------------------------- /debian/sendmailanalyzer.manpages: -------------------------------------------------------------------------------- 1 | sendmailanalyzer.1 2 | sa_cache.1 3 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /doc/sa_cache.pod: -------------------------------------------------------------------------------- 1 | =head1 NAME 2 | 3 | sa_cache - a SendmailAnalyzer cache report builder 4 | 5 | =head1 DESCRIPTION 6 | 7 | This program is used to build cache files for all reports generated by 8 | SendmailAnalyzer. It must be run to enable report of week, months and years 9 | views. 10 | 11 | =head1 USAGE 12 | 13 | Usage: sa_cache [-s hostname] [-c conf_file] [-d yyyy/mm] 14 | 15 | This script generate cache statistics for past months and year until now. 16 | Using the --actual-day-only will compute statstics for the current day only 17 | 18 | -c | --config file : Path to sendmailanalyzer configuration file. Default 19 | to /usr/local/sendmailanalyzer/sendmailanalyzer.conf. 20 | -d | --date "yyyy/mm" : year/month cache to proceed. Default is all. 21 | -h | --help : Show this message. 22 | -s | --syslog host : syslog name of the host to proceed. Default all. 23 | 24 | -a | --actual-day-only: Proceed only the current day, this option replace the 25 | old and obsolete day_cache script. You still have to 26 | run it often like each five minutes. 27 | 28 | Setup a cronjob to run sa_cache and restart SendmailAnalyzer daemon after the 29 | log file rotation as follow: 30 | 31 | # SendmailAnalyzer log reporting daily cache 32 | 0 1 * * * /usr/local/sendmailanalyzer/sa_cache > /dev/null 2>&1 33 | # On huge MTA you may want to have five minutes caching 34 | #*/5 * * * * /usr/local/sendmailanalyzer/sa_cache -a > /dev/null 2>&1 35 | 36 | 37 | =head1 AUTHOR 38 | 39 | Gilles Darold 40 | 41 | =head1 COPYRIGHT 42 | 43 | Copyright (c) 2002-2020 Gilles Darold - All rights reserved. 44 | 45 | This program is free software: you can redistribute it and/or modify 46 | it under the terms of the GNU General Public License as published by 47 | the Free Software Foundation, either version 3 of the License, or 48 | any later version. 49 | 50 | This program is distributed in the hope that it will be useful, 51 | but WITHOUT ANY WARRANTY; without even the implied warranty of 52 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 53 | GNU General Public License for more details. 54 | 55 | You should have received a copy of the GNU General Public License 56 | along with this program. If not, see < http://www.gnu.org/licenses/ >. 57 | 58 | =head1 BUGS 59 | 60 | Your volontee to help construct a better software by submitting bug report or 61 | feature request as well as code contribution are welcome. 62 | 63 | -------------------------------------------------------------------------------- /doc/sendmailanalyzer.pod: -------------------------------------------------------------------------------- 1 | =head1 NAME 2 | 3 | SendmailAnalyzer - Sendmail/Postfix log analyzer 4 | 5 | =head1 DESCRIPTION 6 | 7 | SendmailAnalyzer as its name suggests is a Sendmail log analyzer. It processes 8 | maillog files and generates dynamic statistics in HTML and graphical output. 9 | The reports are generated in real time so that it lets you know at any moment 10 | what is going on your mail servers. It uses time (hour, day, month and year 11 | views) and cross-linked navigation for easy use. 12 | 13 | SendmailAnalyzer is easy to install and highly configurable to match the dozen 14 | of Sendmail possible configurations. It also supports report for all the major 15 | milter or sendmail filters like SpamAssassin, MailScanner, Clamav, etc. 16 | 17 | Collected data is stored in flat files that are automatically archived or 18 | deleted to keep disk space. All reports before the current day are cached to 19 | save system resources and are displayed in the 1 second into your browser. 20 | 21 | SendmailAnalyzer can be run on a home dedicated mail server, on multiple 22 | enterprise mail servers and on ISP mail servers for free. His low resources 23 | usage allow SendmailAnalyzer appliance embedding. Since version 8.0 the caching 24 | mechanism has a very low memory footprint as well as the reports views. 25 | 26 | This is the most advanced and complete statistics tool dedicated to 27 | the great Sendmail MTA. It's goal is not to support any kind of MTA or 28 | other log format but only being a full featured tool for Sendmail users and 29 | administrators. If you're searching something more general take a look at 30 | SawMill, it's not so bad :-) 31 | 32 | =head1 POSTFIX SUPPORT 33 | 34 | SendmailAnalyzer is a statistical dedicated tool for Sendmail and it is very 35 | good in this task. As many people asked me to have such free tool for the 36 | Postfix MTA, Since release v7.0 SendmailAnalyzer now also supports the Postfix 37 | mail.log statistics report. 38 | 39 | Postfix is now fully supported, if you have any issues or unsupported features 40 | please let me know. Note that as I don't use Postfix I may ask you for log 41 | files to reproduce some issues or develop features. 42 | 43 | =head1 FEATURES 44 | 45 | It reports all you ever wanted to know about email trafic on your network. 46 | 47 | =head2 Global Statistics 48 | 49 | All the following reports also show statistics per bytes and average 50 | of bytes per message. 51 | 52 | =over 4 53 | 54 | =item * 55 | 56 | Number of inbound messages. 57 | 58 | =item * 59 | 60 | Number of outbound messages. 61 | 62 | =item * 63 | 64 | Number of inbound spams. 65 | 66 | =item * 67 | 68 | Number of outbound spams. 69 | 70 | =item * 71 | 72 | Number of inbound virus. 73 | 74 | =item * 75 | 76 | Number of outbound virus. 77 | 78 | =item * 79 | 80 | Sendmail rejection rules flow. 81 | 82 | =item * 83 | 84 | Syserr flow (Sendmail error messages). 85 | 86 | =item * 87 | 88 | Sendmail DSN Flow (Delivery Status Notification) 89 | 90 | =item * 91 | 92 | The global MTA status allocation per messages, bytes and percentage. 93 | 94 | =item * 95 | 96 | Distributed messages coming from Internet. 97 | 98 | =item * 99 | 100 | Distributed messages sent internaly. 101 | 102 | =item * 103 | 104 | Distributed messages sent to Internet. 105 | 106 | =item * 107 | 108 | Distributed messages coming from and going to Internet. 109 | 110 | =item * 111 | 112 | Sendmail SMTP Auth statistics by type (server or client), mechanismi and user. 113 | 114 | =item * 115 | 116 | Postgrey usage statistics. 117 | 118 | =back 119 | 120 | If you deliver marqued spam / virus to recipients, SendmailAnalyzer 121 | will report the delivery flow for: 122 | 123 | =over 4 124 | 125 | =item * 126 | 127 | Spam / virus coming from Internet. 128 | 129 | =item * 130 | 131 | Spam / virus sent internaly. 132 | 133 | =item * 134 | 135 | Spam / virus sent to Internet. 136 | 137 | =item * 138 | 139 | Spam / virus coming from and going to Internet. 140 | 141 | =back 142 | 143 | Note: In the report you will see 'local' inbound or outbound message, that 144 | mean a mail coming from (sender relay) or going to (recipient relay) the mail 145 | server. This is not the same that internal, which mean coming from or sent to 146 | your internal network / private domain. 147 | 148 | 149 | =head2 Top Statistics 150 | 151 | Once you have defined in the configuration file the Top Max statistics to show 152 | (25 by default), the Max Recipient for a message (25 by default), the message 153 | Size Max (5Mb by default) you will see the top statistics of: 154 | 155 | =over 4 156 | 157 | =item * 158 | 159 | Top sender domain, top sender relay, top sender address. 160 | 161 | =item * 162 | 163 | Top recipient domain, top recipient relay, top recipients address. 164 | 165 | =item * 166 | 167 | Top spams rules, top spammers domain, top spammers relays, top spammers address, 168 | top spam recipients address. 169 | 170 | =item * 171 | 172 | Top virus name, top virus sender, top virus sender relay, top virus recipient 173 | address, top infected filename. 174 | 175 | =item * 176 | 177 | Top DSN status, top DSN sender, top DSN Relay, top DSN recipient address. 178 | 179 | =item * 180 | 181 | Top rejection rules, top rejected domain, top rejected relay, top rejected 182 | sender, top rejection status. 183 | 184 | =item * 185 | 186 | Top Sendmail Error messages. 187 | 188 | =item * 189 | 190 | Top max number of recipient for one message. 191 | 192 | =item * 193 | 194 | Top max size message with number of recipients and sender address. 195 | 196 | =item * 197 | 198 | Top Sendmail SMTP Auth mechanisms, relays and users (server or client). 199 | 200 | =item * 201 | 202 | Top Postgrey status, relay, senders and recipients. 203 | 204 | =back 205 | 206 | Note: on daily view you can click on each of the reported element to see the 207 | detailed information. For example if you follow link on a sender relay you 208 | will see all messages detailled information coming from that relay. 209 | This kind of navigation is only available for the days of the current month 210 | to keep disk space, memory usage and privacy. 211 | 212 | 213 | =head2 ISP like feature 214 | 215 | Begining at version 4.0 of SendmailAnalyzer some features could be related 216 | to an ISP like environment and allow statistics on very huge SMTP flow: 217 | 218 | =over 4 219 | 220 | =item * 221 | 222 | Support centralized maillog for multiple Sendmail serveurs througth rsyslog. 223 | 224 | =item * 225 | 226 | Support per domain reports with user access control. 227 | 228 | =item * 229 | 230 | Support per user reports. Each user can see is own statistics. (Removed in v5.0 until now) 231 | 232 | =item * 233 | 234 | Low memory usage, small disk space utilization and really speed with daily caching. 235 | 236 | =item * 237 | 238 | Support parsing of compressed maillog file. 239 | 240 | =back 241 | 242 | =head2 Milter / Filter supported 243 | 244 | SendmailAnalyzer supports some of the most used milter and filter for 245 | spam and virus filtering. If you don't find yours drop me a line and 246 | it will be included. 247 | 248 | =over 4 249 | 250 | =item * 251 | 252 | MimeDefang Spam and Virus reports 253 | 254 | =item * 255 | 256 | Amavis Spam / Virus detection 257 | 258 | =item * 259 | 260 | Clamav virus detection 261 | 262 | =item * 263 | 264 | Jchkmail Spam / Virus report 265 | 266 | =item * 267 | 268 | MailScanner Spam / virus detection 269 | 270 | =item * 271 | 272 | SpamAssassin Spam detection (spamd output) 273 | 274 | =item * 275 | 276 | Sendmail DNSLB report (check_relay) 277 | 278 | =item * 279 | 280 | Sendmail DSN (Delivery Status Notification) 281 | 282 | =item * 283 | 284 | DNSLB-Milter Spam detection 285 | 286 | =back 287 | 288 | If your one is not listed here and you can send me some relevant 289 | maillog lines I can add his support in a day. 290 | 291 | 292 | =head2 New features 293 | 294 | If you need new features and support for new/other milters or filters, 295 | let me know. This helps a lot to develop a better/useful tool. This 296 | piece of software is widely used at my work (espacially for IT report) 297 | but this reflects only a part of the Sendmail usage. 298 | 299 | =head2 Internationalization 300 | 301 | SendmailAnalyzer can be translated to any language with your contribution. 302 | At this time supported language are: French, English, Spanish, Bulgarian, German. 303 | If you want to add your own language, it's really simple, take a look in 304 | the cgi-bin/lang/ directory and send me the translation file. 305 | 306 | 307 | =head1 REQUIREMENT 308 | 309 | SendmailAnalyzer can work in any platform where Sendmail and Perl could run. 310 | What you need is a modern Perl distribution - 5.8.x or more is good, but older 311 | versions should also work. 312 | 313 | You need the Apache Web server to be installed and running 314 | 315 | sudo apt install apache2 316 | or 317 | sudo yum install httpd 318 | 319 | You need the following Perl modules. If they are not yet include in your 320 | OS distribution you can always find them at http://search.cpan.org/ 321 | 322 | CGI 323 | MIME::Base64; 324 | MIME::QuotedPrint; 325 | 326 | Those modules are normaly already included in Perl core modules on modern 327 | distributions. On Debian like distributions: 328 | 329 | sudo apt install libcgi-pm-perl 330 | 331 | On RPM based distribution: 332 | 333 | sudo yum install perl-CGI 334 | 335 | The graph output is generated using the flotr2 javascript library so no need 336 | to install additional library or package, you just need a modern browser. 337 | 338 | =head1 INSTALLATION 339 | 340 | =head2 Generic install 341 | 342 | Here are the generic installation steps, but if you want you can create and 343 | install your own distribution package, see "Package install" bellow. 344 | 345 | 1) Unpack the distribution tarball in the desired location as follow: 346 | 347 | tar xzf sendmailanalyzer-x.x.tar.gz 348 | cd sendmailanalyzer-x.x/ 349 | perl Makefile.PL 350 | make && make install 351 | 352 | 2) Follow the instructions given at the end of install. With this default 353 | install everything will be installed under /usr/local/sendmailanalyzer. 354 | 355 | 3) Edit sendmailanalyzer.conf file to customize your SendmailAnalyzer reports. 356 | See the configuration file and CONFIGURATION section bellow for usage. 357 | 358 | =head2 Post install 359 | 360 | 1. Start SendmailAnalyzer daemon with: 361 | 362 | /usr/local/sendmailanalyzer/sendmailanalyzer -f 363 | 364 | or use one of the starters script provided in the start_scripts/ directory. 365 | 366 | 2. Modify your Apache2 configuration to allow access to CGI scripts like follow: 367 | 368 | Alias /sareport /usr/local/sendmailanalyzer/www 369 | 370 | Options ExecCGI 371 | AddHandler cgi-script .cgi 372 | DirectoryIndex sa_report.cgi 373 | #-- Some browser might need this line (Chrome, Safari) 374 | Header always set X-Frame-Options "SAMEORIGIN" 375 | #-- Apache 2.2 376 | #Order deny,allow 377 | #Deny from all 378 | #Allow from 192.168.1.0/24 379 | #-- Apache 2.4 380 | Require all denied 381 | Require ip 192.168.1.0/24 382 | 383 | 384 | If necessary, give additional host access to SendmailAnalyzer. 385 | To be able to use Header directive be sure that header module is enabled: 386 | a2enmod headers 387 | 388 | 3. If necessary, give additional host access to SendmailAnalyzer. Restart and ensure that httpd is running. 389 | 390 | 4. Browse to http://mta.host.dom/sareport/ to ensure that things are working properly. 391 | 392 | 5. Setup a cronjob to run sa_cache and restart SendmailAnalyzer daemon after maillog logrotate as follow: 393 | 394 | # SendmailAnalyzer log reporting daily cache 395 | 0 1 * * * /usr/local/sendmailanalyzer/sa_cache > /dev/null 2>&1 396 | # On huge MTA you may want to have five minutes caching 397 | #*/5 * * * * /usr/local/sendmailanalyzer/sa_cache -a > /dev/null 2>&1 398 | 399 | 6. Add an entry in /etc/logrotate.d/syslog to restart SendmailAnalyzer when maillog is rotated or create a cron job. 400 | 401 | =head2 Log rotate case 402 | 403 | =head3 Without systemd 404 | 405 | If you use real time mode and you have logrotate installed on you maillog 406 | file you must restart SendmailAnalyzer each time logrotate is used. 407 | To install it edit the /etc/logrotate.d/syslog file and add a line 408 | in the postrotate part, for example: 409 | 410 | /var/log/cron /var/log/debug /var/log/maillog /var/log/messages /var/log/secure /var/log/spooler /var/log/syslog { 411 | sharedscripts 412 | postrotate 413 | /bin/kill -HUP `cat /var/run/syslogd.pid 2>/dev/null` 2>/dev/null || true 414 | /bin/kill -HUP `cat /var/run/sendmailanalyzer.pid` 2>/dev/null || true 415 | # or /etc/init.d/sendmailanalyzer restart >/dev/null 2>&1 || true 416 | endscript 417 | } 418 | 419 | If you are using rsyslog the file is named /etc/logrotate.d/rsyslog, things 420 | must be written differently, but not so much. For example: 421 | 422 | postrotate 423 | reload rsyslog >/dev/null 2>&1 || true 424 | /bin/kill -HUP `cat /var/run/sendmailanalyzer.pid` 2>/dev/null || true 425 | endscript 426 | 427 | =head3 With systemd 428 | 429 | New Linux distributions have replaced the standard init SysV by the new 430 | systemd linux centrics startup system. If you are using this system here 431 | is the service file definition to use: 432 | 433 | sendmailanalyzer.service 434 | 435 | just copy it under /usr/lib/systemd/system/sendmailanalyzer.service 436 | as root. Edit it to change the path to the sendmailanalyzer program 437 | and change Requires/After directives whether you are running sendmail 438 | or postfix. Then reload systemd with the following command as root: 439 | 440 | 441 | systemctl --system daemon-reload 442 | 443 | To start/stop sendmailanalyer use the following commands: 444 | 445 | systemctl start sendmailanalyzer.service 446 | systemctl stop sendmailanalyzer.service 447 | 448 | If you want sendmailanalyzer to be run at boot time and stopped at 449 | poweroff, you have to run the following command: 450 | 451 | systemctl enable sendmailanalyzer.service 452 | 453 | This will create the symlinks for you into the /etc/systemd/system/ 454 | directory. 455 | 456 | =head2 Package install 457 | 458 | In the packaging/ directory you will find all scripts and files to generate 459 | a binary RPM, Slackware and Debian package. See README in this directory. 460 | 461 | =head2 Custom install 462 | 463 | You can create your fully customized SendmailAnalyzer installation by using 464 | the Makefile.PL Perl script. Here is a sample: 465 | 466 | perl Makefile.PL \ 467 | LOGFILE=/var/log/maillog \ 468 | BINDIR=/usr/bin \ 469 | CONFDIR=/etc \ 470 | PIDDIR=/var/run \ 471 | BASEDIR=/var/lib/sendmailanalyzer \ 472 | HTMLDIR=/var/www/sendmailanalyzer \ 473 | MANDIR=/usr/man/man3 \ 474 | DOCDIR=/usr/share/doc/sendmailanalyzer 475 | 476 | If you want to build a distro package, there are two other options that you may 477 | use. The QUIET option is to tell to Makefile.PL to not show the default post 478 | install README. The DESTDIR is to create and install all files in a package 479 | build base directory. For example for Fedora RPM, thing may look like that: 480 | 481 | # Make Perl and SendmailAnalyzer distrib files 482 | %{__perl} Makefile.PL \ 483 | INSTALLDIRS=vendor \ 484 | QUIET=1 \ 485 | LOGFILE=/var/log/maillog \ 486 | BINDIR=%{_bindir} \ 487 | CONFDIR=%{_sysconfdir} \ 488 | PIDDIR=%{rundir} \ 489 | BASEDIR=%{_localstatedir}/lib/%{uname} \ 490 | HTMLDIR=%{webdir} \ 491 | MANDIR=%{_mandir}/man3 \ 492 | DOCDIR=%{_docdir}/%{uname}-%{version} \ 493 | DESTDIR=%{buildroot} < /dev/null 494 | 495 | See the spec file in packaging/RPM for the full RPM build script. 496 | 497 | =head1 USAGE 498 | 499 | There are two ways to use SendmailAnalyzer. If you don't need real time 500 | you can run it each night so that maillog will be parsed and reports 501 | generated once a day. Note that if you have a huge MTA load this is not 502 | a good solution. 503 | 504 | The other way is to run it in daemon mode, in this way it can parse huge 505 | maillog (million line per day) preserving system resources. 506 | 507 | To know all possible command line arguments, run 'sendmailanalyzer --help' 508 | 509 | Important: if you experience high memory usage with SendmailAnalyzer 510 | use the -w (--write-delay) command line option to reduce the time where in 511 | memory data are flushed to disk. Default is 60 secondes, this is good in most 512 | configuration but in huge servers you may set it as low as 5 secondes. 513 | You must test it to find a compromise between speed and memory usage. 514 | 515 | =head2 Standalone 516 | 517 | To run SendmailAnalyzer in standalone mode you have to setup a cron 518 | entry each night as follow assuming log and configuration files in 519 | default place (/var/log/maillog and /usr/local/sendmailanalyzer/sendmailanalyzer.conf): 520 | 521 | /usr/local/sendmailanalyzer/sendmailanalyzer -i -b -f 522 | 523 | This will run the program in interactive mode (-i), parse full maillog seeking 524 | after the last run ending position (-f) and exiting at end of maillog parsing 525 | (-b). 526 | 527 | =head2 Daemon mode 528 | 529 | To run SendmailAnalyzer as a daemon, use the start/stop/restart script given 530 | with the distribution (in start_script/ directory). See the README file in 531 | that directory for more explanation about how to install. 532 | 533 | It will start as 'sendmailanalyzer -f' that tells it to start in daemon mode 534 | (default), parse full maillog seeking after the last run ending position (-f) 535 | and to open a pipe to a tail command on /var/log/maillog. It will never end 536 | until you kill it or restart it. 537 | 538 | To restart sendmailanalyzer use the SIGHUP signal as follows : 539 | 540 | /bin/kill -HUP `cat /var/run/sendmailanalyzer.pid` 541 | or 542 | /usr/bin/pkill -HUP sendmailanalyzer 543 | 544 | This will force sendmailanalyzer to reread its configuration file and reopen 545 | a pipe to the tail command on you mail log file. The original command line 546 | arguments that you've given at startup will be preserved. 547 | 548 | 549 | Important: If you have syslog rotate enable (I hope so :-) you will have to 550 | restart SendmailAnalyzer after each log rotation to always tail the good file 551 | descriptor. 552 | 553 | Edit /etc/logrotate.d/syslog and add the following after syslog restart: 554 | 555 | /bin/kill -HUP `cat /var/run/sendmailanalyzer.pid` 2>/dev/null || true 556 | 557 | or 558 | /etc/rc.d/rc.sendmailanalyzer restart /dev/null 2>&1 || true 559 | 560 | or on Debian/Redhat like system 561 | 562 | /etc/init.d/sendmailanalyzer restart /dev/null 2>&1 || true 563 | 564 | or with systemd: 565 | 566 | /usr/bin/systemctl restart sendmailanalyzer.service > /dev/null 2>&1 || true 567 | 568 | this must be in the postrotate section. 569 | 570 | =head2 Stopping SendmailAnalyzer 571 | 572 | Just kill it with SIGTERM signal it will flush current collected object 573 | to disk and free open files. 574 | 575 | kill -TERM `cat /var/run/sendmailanalyzer.pid`' 576 | or 577 | pkill -TERM sendmailanalyzer 578 | 579 | use the starter script. This will kill the current sendmailanalyzer 580 | process and the pipe to the tail command. 581 | 582 | =head2 Caching 583 | 584 | SendmailAnalyzer collects maillog entries to write data to flat files, 585 | when you run the CGI script sa_report.cgi it has to read each data file 586 | for the given period to compute statistics and output HTML reports. 587 | This can be enough for day views but when you jump to month view it 588 | costs a lot in CPU and memory usage unless you have a home MTA. 589 | 590 | To speed up things and free system resources you have to run the script 591 | sa_cache each night by cron to create cache files. After that viewing 592 | a month or year view take less than a second. 593 | 594 | The script sa_cache must be run by cron as follows: 595 | 596 | /usr/local/sendmailanalyzer/sa_cache >/dev/null 2>&1 597 | 598 | If you have set per domain report sa_cache will create cache files for each 599 | domains. These cache files are named cache.pm for the MTA global statistics 600 | and cache.pmYOURDOMAIM.DOM for each domain report. To lower the memory 601 | footprint of the sa_cache program, since version 8.0 it starts computing cache 602 | file per hours. 603 | 604 | Since version 4.0 sa_report.cgi will warm you to avoid out of memory when 605 | you're entering a month view without caching. 606 | 607 | =head2 Huge MTA activity 608 | 609 | On MTA server with very huge activity you can experience out of memory or 610 | wait a very long time before seeing anything in day view. In this case you 611 | must run by cron job the perl script sa_cache with the -a option to build 612 | cache files for the current day. Statistics will not be shown in realtime but 613 | only at the time of the last sa_cache run. You can run it each five minute for 614 | example as follow: 615 | 616 | */5 * * * * /usr/local/sendmailanalyzer/sa_cache -a 617 | 618 | or 619 | 620 | */5 * * * * /usr/local/sendmailanalyzer/sa_cache --actual-day-only 621 | 622 | It will only parse data stored in the current day so five minutes interval 623 | may be enough for most cases. 624 | 625 | =head2 Database 626 | 627 | SendmailAnalyzer stores data into flat file database. Data is stored in 628 | a time hierarchical directory structure ending at daily level. This structure 629 | is composed as follows : 'mailhost'/year/month/day/ 630 | In each day repository you can find the following data files: 631 | 632 | senders.dat: senders informations. 633 | recipient.dat: recipients informations. 634 | spam.dat: spams informations. 635 | virus.dat: viruses informations. 636 | rejected.dat: rejected mail informations. 637 | dsn.dat: Delivery Status Notification report 638 | syserr.dat: SYSERR MTA informations. 639 | other.dat: other message grabbed into the log file. 640 | auth.dat: SMTP auth message grabbed into the log file. 641 | miltername.dat: message related to a milter, antivir or antispam. 642 | 643 | The format of each file is explained in the SendmailAnalyzer code source. 644 | 645 | =head2 Archiving 646 | 647 | When sa_cache is run and following the value of the FREE_SPACE configuration 648 | option it will try to archive data older than the current month. If FREE_SPACE 649 | is set to 'delete' sa_cache will simply remove the data file from disk. If you 650 | set it to 'archive', sa_cache will build a gzipped tarball for all daily data 651 | files into the corresponding month directory and then remove data files from 652 | disk. 653 | 654 | If you set it to 'none', data files are kept. 655 | 656 | If your primary concern is disk space saving set it to 'delete'. If you 657 | want to preserve data for a year or more you can safely set it to 'archive'. 658 | For your information one of my server has 100,000 inbound messages a day and 659 | a year of 'archive' storage take around 1Gb and a 'delete' storage around 660 | 250Mb. 661 | 662 | One advantage of the 'archive' method is that you can replay the cached stats 663 | (for example after an upgrade to fix a sa_cache bug :-). In this case, you 664 | just have to delete any cache file and extract all tarballs as follows: 665 | 666 | find /path/to/SendmailReport/ -name "cache.pm*" | xargs -i rm -f {} 667 | find /path/to/SendmailReport/ -name "history.tar.gz" | xargs -i \ 668 | tar xzf {} --directory / 669 | 670 | and then rerun sa_cache again. 671 | 672 | Important: running sa_cache in one pass on en entire year could cost a lot 673 | of resources and takes very long time. In this case add a second argument to 674 | the command line giving the year/month to proceed, for example: 675 | 676 | sa_cache -s 'mailhost' -d "2008/06" 677 | 678 | repeat this command for each month. 679 | 680 | On huge MTA freeing space each month may not be enough. The WEEKLY_FREE_SPACE 681 | configuration directive will force sa_cache to free space each week when enabled. 682 | By default it is disabled. 683 | 684 | =head1 CONFIGURATION 685 | 686 | The default path to configuration file is /etc/sendmailanalyzer.conf If you want 687 | to change this path, please edit cgi-bin/sa_report.cgi, sa_cache to match your 688 | needs. For sendmailanalyzer use the --config|-c command line argument. 689 | 690 | The configuration file consists of a text file with a configuration option 691 | in upper case and a value or list of value separated by a tab character. 692 | 693 | Here are the definitions of all those configuration directives. 694 | 695 | =head2 System commands options 696 | 697 | =over 4 698 | 699 | =item TAIL_PROG 700 | 701 | Path to the system tail command. Can be overwritten with --tail or -t in 702 | sendmailanalyzer args. Default is /usr/bin/tail. 703 | 704 | =item TAIL_ARGS 705 | 706 | Command line argument passed to the tail system command. Can be overwritten 707 | with --args or -a in sendmailanalyzer args. Default is -n 0 -f. 708 | 709 | =item ZCAT_PROG 710 | 711 | Path to zcat system command used to parse compressed log file. Can be 712 | overwritten with --zcat or -z in sendmailanalyzer args. Default is 713 | /usr/bin/zcat. 714 | 715 | =item FREE_SPACE 716 | 717 | Select the freeing space method for data files older than the current month. 718 | The value can be: 719 | 720 | - delete: definitively remove all data files. 721 | - archive: make a gzipped tarball of data files before deleting them. 722 | - none: don't do anything. Need lot of space disk. 723 | 724 | Default is archive. 725 | 726 | =back 727 | 728 | =head2 Input/output options 729 | 730 | =over 4 731 | 732 | =item LOG_FILE 733 | 734 | Path to the maillog file to analyse. Can be overwritten with --log or -l 735 | in sendmailanalyzer args. Default is /var/log/maillog. If the extension 736 | is .gz SendmailAnalyzer will automatically use zcat to parse the compressed 737 | log. For Postfix you may use /var/log/mail.log instead. 738 | 739 | =item JOURNALCTL_CMD 740 | 741 | Use it to set the journalctl command to use instead of log file entry. For 742 | example, with postfix it migth be set to the following: 743 | 744 | JOURNALCTL_CMD journalctl -u postfix 745 | 746 | and for sendmail: 747 | 748 | JOURNALCTL_CMD journalctl -u sendmail 749 | 750 | When enabled, the LOG_FILE configuration directive above is just ommitted. 751 | The additional option: --output="short-iso" is also always used to format 752 | timestamp. 753 | 754 | In incremental mode sendmailanalyzer will automatically set the --since option 755 | to the last parsed timestamp to prevent loading previous messages. 756 | 757 | Note that in daemon mode sendmailanalyzer will automatically add the -f option 758 | to the command. Can be overwritten with --journalctl or -j options. 759 | 760 | =item OUT_DIR 761 | 762 | Output directory for data storage. Can be overwritten with --output or -o 763 | in sendmailanalyzer args. The directory must exist, being writable by 764 | the user running sendmailanalyzer and sa_cache. It must be readable 765 | by the http user for CGI script sa_report.cgi. 766 | Default is /var/www/sendmailanalyzer 767 | 768 | =item DEBUG 769 | 770 | Turn on/off debug/verbose output mode. Can be overwritten with --debug or -d 771 | in sendmailanalyzer args. Default is 0, disable. 772 | 773 | =item DELAY 774 | 775 | Delay in second to flush collected data to disk. Can be overwritten with 776 | --write-delay or -w in sendmailanalyzer args. Default is 60 seconds. 777 | During this time data is kept in memory to limit disk I/O and gain speed. 778 | If you experience an out of memory on huge mail server adjust this value 779 | to something smaller depending on your hardware configuration. 780 | 781 | =back 782 | 783 | 784 | =head2 Reporting/display options 785 | 786 | =over 4 787 | 788 | =item ERROR_CODE 789 | 790 | Path to SMTP error code file (relative to CGI directory) where sa_report.cgi 791 | is running. Default: lang/ERROR_CODE. 792 | 793 | =item LANG 794 | 795 | Path to the translation file (relative to CGI directory) where sa_report.cgi 796 | is running. Default: lang/en_US. 797 | 798 | =item HTML_CHARSET 799 | 800 | Used to define the HTML charset to use. Default is iso-8859-1, but with cyrillic 801 | characters you have to use utf-8 instead. 802 | 803 | =item URL_LOGO 804 | 805 | Url to the barorng image. Default: salogo.gif 806 | 807 | =item URL_JSCRIPT 808 | 809 | Url to the flotr2 javascript library. Default: flotr2.js 810 | 811 | =item URL_SORTABLE 812 | 813 | Url to the sorttable javascript library. Default: sorttable.js 814 | 815 | =item TOP 816 | 817 | Number of object displayed in the top statistics. Default is 25. 818 | 819 | =item TOP_MBOX 820 | 821 | Number of object displayed in the top email addresses statistics. 822 | Default is 25. 823 | 824 | =item MAX_RCPT 825 | 826 | Max number of recipients per message where senders will be reported. 827 | Default 25 recipients max. 828 | 829 | =item MAX_SIZE 10000000 830 | 831 | Max size in bytes per message where senders will be reported. 832 | Default is 10000000. 833 | 834 | =item MAX_LINE 835 | 836 | Max lines to show in detail view. Default is 100. 837 | 838 | =item SIZE_UNIT 839 | 840 | Size Unit to use, default is Bytes. Other values are KBytes and MBytes. 841 | 842 | =item DOMAIN_REPORT 843 | 844 | Compute statistics and cache for a list of domains and display a link in the 845 | front page for a per domain access. See DOMAIN_USER if you want to grant 846 | special access to these pages. You can have multiple DOMAIN_REPORT lines. 847 | If you are running rsyslog with multiple hosts use DOMAIN_HOST_REPORT instead. 848 | Example: 849 | 850 | DOMAIN_REPORT domain1.com,domain2.com 851 | 852 | 853 | =item DOMAIN_HOST_REPORT 854 | 855 | Compute statistics and cache for the given host followed by a list of domains 856 | and display a link in the front page for a per domain access under each host. 857 | You can have multiple DOMAIN_HOST_REPORT lines. See DOMAIN_USER if you want 858 | to grant special access to these pages. For example: 859 | 860 | DOMAIN_HOST_REPORT host1 domain1.com,domain2.com 861 | DOMAIN_HOST_REPORT host2 domain2.com,domain3.com 862 | 863 | =item ANONYMIZE 864 | 865 | This option allows the anonymization of the output, i.e. it removes any 866 | sender/recipient personal information from the report. 867 | 868 | =item REPLACE_HOST 869 | 870 | This option replaces some hostname in all relay information for anonymization. 871 | You must use one REPLACE_HOST line per replacement. 872 | 873 | REPLACE_HOST internal.relay.dom external.relay.dom 874 | 875 | =item SPAM_VIEW 876 | 877 | Enable/Disable menu links to Spam views. Default show it: 1 878 | 879 | =item VIRUS_VIEW 880 | 881 | Enable/Disable menu links to Virus views. Default show it: 1 882 | 883 | =item DSN_VIEW 884 | 885 | Enable/Disable menu links to Notification views. Default show it: 1 886 | 887 | =item POSTGREY_VIEW 888 | 889 | Enable/Disable menu links to Postgrey usage views. Default show it: 1 890 | 891 | =item SHOW_DIRECTION 892 | 893 | Enable/Disable messaging/spam/virus/dsn direction statistics. Default is show. 894 | On some mailhost this could show wrong information if the direction could 895 | not be easily determined. So you can remove these views by setting it to 0. 896 | 897 | =item SPAM_TOOLS 898 | 899 | List of antispam name separated by a comma used for Spam details view. You may 900 | want to custom this list to just show menu link on available reports. Default 901 | list is: 902 | 903 | spamdmilter,jchkmail,dnsbl,spamassassin,amavis,mimedefang,dnsblmilter,spamd,policydweight 904 | 905 | Feel free to remove those you're not using to not see link to empty report in 906 | the menu. 907 | 908 | =item SHOW_SUBJECT 909 | 910 | When enabled it allow email subjects to be shown in detailed view. Of course 911 | the log file must contain this information. Default is disabled. 912 | 913 | =back 914 | 915 | =head2 Maillog parsing options 916 | 917 | =over 4 918 | 919 | =item FULL 920 | 921 | Parse maillog from begining before running tail program. Can be overwritten 922 | with --full or -f in sendmailanalyzer args. When enabled, default is to read 923 | LAST_PARSED file to start from last collected event. Most of the time you may 924 | want to enable this to jump at the last parsed line during the previous run. 925 | If you always have fresh entries in your log, use FORCE instead. When FULL 926 | and FORCE are disabled, sendmailanalyzer go directly to the end of the file 927 | using the tail -f command. 928 | 929 | =item FORCE 930 | 931 | Parse maillog from the begining before running the tail program but force 932 | sendmailanalyzer to never use the LAST_PARSED file. Can be overwritten with 933 | command line option --force or -F. 934 | 935 | =item BREAK 936 | 937 | Do not run tail program and exit after a full parsing of the log file. 938 | Can be overwritten with --break or -b in sendmailanalyzer args. Default 939 | is 0, go ahead with tail. 940 | 941 | =item MTA_NAME 942 | 943 | Syslog name of the MTA. Syslog writes it to maillog with the pid as 944 | ... sendmail[1234] ... This is required to only parse relevant lines. 945 | Can be overwritten with --sendmail or -s in sendmailanalyzer args. 946 | Default is sendmail, some distro come with sm-mta instead. Some other 947 | have multiple names (ex: sm-mta, sendmail and sm-msp-queue) in this 948 | case you can set the value of this directive to a pipe separated list 949 | of values, for example: sm-mta|sendmail|sm-msp-queue. 950 | 951 | Default: sm-mta|sendmail|postfix|spampd 952 | 953 | =item MAILSCAN_NAME 954 | 955 | Syslog name of MailScanner. Syslog writes it to maillog with the pid as 956 | ... MailScanner[1234] ... This is required to only parse relevant lines 957 | Can be overwritten with --mailscanner or -m in sendmailanalyzer args. 958 | Default is MailScanner. 959 | 960 | =item AMAVIS_NAME 961 | 962 | Syslog name of Amavis. Syslog writes it to maillog with the pid as 963 | ... amavis[1234] ... This is required to only parse relevant lines. 964 | Default is amavis. 965 | 966 | =item MD_NAME 967 | 968 | Syslog name of MimeDefang. Syslog writes it to maillog with the pid as 969 | ... mimedefang.pl[1234] ... This is required to only parse relevant lines 970 | based on parsing mimedefang log generated by method md_graphdefang_log() 971 | Default is mimedefang.pl. 972 | 973 | =item CLAMD_NAME 974 | 975 | Syslog name of Clamd. When using Mailscanner with clamd, if you want virus 976 | reports, you must configure clamd to log with syslog and use LOG_MAIL. Default 977 | value is 'clamd' (... clamd[1234] ...). Can be overwritten with --clamd or -n. 978 | 979 | =item CLAMSMTPD_NAME 980 | 981 | Syslog name of clamsmtpd. Default value is 'clamsmtpd' (... clamsmtpd: ...). 982 | 983 | =item POSTGREY_NAME 984 | 985 | Syslog name of Postgrey or sqlgrey. Syslog writes Postgrey to maillog with the 986 | pid as follows: ... postgrey[1234] ... and sqlgrey as follow: ... sqlgrey: ... 987 | This is required to only parse relevant logged lines. Can be overwritten with 988 | --postgrey or -g. Default is set to postgrey|sqlgrey 989 | 990 | =item SPAMD_NAME 991 | 992 | Syslog name of Spamd. Syslog writes it to maillog with the pid as follow: 993 | ... spamd[1234] ... This is required to only parse relevant logged lines 994 | Can be overwritten with --spamd. Default is spamd. 995 | 996 | =item LOCAL_DOMAIN 997 | 998 | Comma separated list of internal domains to be used when SendmailAnalyzer 999 | is running on a mail host which received message from any side. SA can't 1000 | know what message are internal or external in this case, so the only way 1001 | to know if a mail come from Internet or Lan/Wan is to check the domain 1002 | part of the relay sender address. You can have multiple LOCAL_DOMAIN lines 1003 | for better reading. 1004 | 1005 | For example: 1006 | 1007 | LOCAL_DOMAIN domain1.com,domain2.com,... 1008 | LOCAL_DOMAIN domain3.com 1009 | LOCAL_DOMAIN domain4.com 1010 | 1011 | If you want you can also give the path to a file containing a list of 1012 | domain, one per line. Ex: 1013 | 1014 | LOCAL_DOMAIN /usr/local/sendmailanalyzer/domain.lst 1015 | 1016 | if the file exist SendmailAnalyzer will load the domain list from its 1017 | content. 1018 | 1019 | =item LOCAL_HOST_DOMAIN 1020 | 1021 | Same as above but with host distinction for use with rsyslog. 1022 | You can have multiple LOCAL_HOST_DOMAIN lines, ie: one per host. 1023 | 1024 | For example: 1025 | 1026 | LOCAL_HOST_DOMAIN sysloghost1 domain1.com,domain2.com 1027 | LOCAL_HOST_DOMAIN sysloghost2 domain3.com,domain4.com 1028 | 1029 | =item MAIL_HUB 1030 | 1031 | Comma separated ip addresses list of internal mail hubs, aka: where email 1032 | are redirected if the host is a gateway. For example: mailhost.mydom.dom 1033 | This directive is very important to help SendmailAnalyzer to find the 1034 | direction of incoming and outgoing message. 1035 | 1036 | =item MAIL_GW 1037 | 1038 | Comma separated ip addresses list of MTA gateways where external mail comes 1039 | from. This directive is very important to help SendmailAnalyzer to find the 1040 | direction of incoming and outgoing message. 1041 | 1042 | =item DEFAULT_DOMAIN 1043 | 1044 | Default domain or hostname to add to an email address if there's just the 1045 | username. When the host is a delivery system it is possible that the user 1046 | email address do not have the domain part (ex: @domain.com). By default 1047 | SendmailAnalyzer will add the '@localhost' domain but you may want to change 1048 | this domain, so use this directive 1049 | 1050 | =item SPAM_DETAIL 1051 | 1052 | This directive allows report for Spam details. Enable by default. This allows 1053 | you to see complete detail of your favorite antispam as well as score, cache 1054 | hit and autolearn if your antispam reports it. To disable set it to 0, you 1055 | will save disk space. 1056 | 1057 | =item SMTP_AUTH 1058 | 1059 | This directive allows report for SMTP authentication. Enabled by default. This 1060 | allow you to see per authent type (server or client) user and relay statistics. 1061 | If you do not use SMTP Auth set it to 0 to disable this feature. These stats 1062 | are not available in per domain views. 1063 | 1064 | =item MERGING_HOST 1065 | 1066 | Use this directive to combine multiple mailhost reports on a single report. 1067 | This allows you to aggregate multiple mailhost that syslogs to a remote server 1068 | through rsyslog to have only one SendmailAnalyzer report. The value must only 1069 | use alphanumeric characters as it is used to create a subdirectory. 1070 | 1071 | =item SKIP_RCPT_RELAY 1072 | 1073 | Use this to set the recipient relay used for local delivery if your message 1074 | appears twice in details view and in messaging, sender and recipient counter. 1075 | This is especially right with postfix configured to have local delivery via 1076 | dovecot service. Default: dovecot, that means that recipient log lines with 1077 | relay=dovecot will instruct sendmailanalyzer to skip those messages. A common 1078 | value can also be 127.0.0.1 with MTA where the message is first sent locally. 1079 | 1080 | =item EXCLUDE_TO 1081 | 1082 | Use this directive to set a pipe separated list of destination email address 1083 | that should be excluded from the report. They will not be reported into data 1084 | files too. The value should be a valid regex, the addresses will be search 1085 | in all destination adresses with $TO =~ /^$EXCLUDE_TO$/. For example: 1086 | 1087 | EXCLUDE_TO bcc-addr1\@domain1.com|bcc-addr2\@domain2.com 1088 | 1089 | will exclude from report all recipient statistics sent to bcc-addr1@domain1.com 1090 | and bcc-addr2@domain2.com 1091 | 1092 | =item RELAY_IP_ONLY 1093 | 1094 | When possible sendmailanalyzer extract the fqdn part of the sender or 1095 | recipient relay. Enable this directive if you just want Ip addresses. 1096 | 1097 | 1098 | =item POSTSCREEN_DNSBL_THRESHOLD 1099 | 1100 | Threshold to detect case where postscreen reject an ip address. By 1101 | default "reject: RCPT from ..." are not logged by postfix, we mark the 1102 | message as DNSBL rejected when DNSBL rank value is upper or equal than 1103 | this threshold value. Default value: 3 1104 | 1105 | =item MILTER_REJECT_REGEX 1106 | 1107 | Use this directive to defined a custom regular expression that will be 1108 | applied on status part of a Postfix milter-reject message. A Postfix 1109 | milter-reject message is of the form: 1110 | 1111 | milter-reject: END-OF-MESSAGE from ... 1112 | 1113 | The default is to treat any message with status not containing string 1114 | "Spam message rejected" as rejected. If you want to treat some other 1115 | messages as spam instead of rejected you can give a regexp that can catch 1116 | them. For example 1117 | 1118 | MILTER_REJECT_REGEX Mailbox not found 1119 | 1120 | will treat all messages with a status including "Mailbox not found" as 1121 | spam. 1122 | 1123 | The value must be a valid Perl regular expression. 1124 | 1125 | =back 1126 | 1127 | =head2 Domain / user views options 1128 | 1129 | =over 4 1130 | 1131 | =item LOW_LIMIT, MEDIUM_LIMIT, HIGH_LIMIT (NO MORE USED) 1132 | 1133 | User messaging data limit in megabytes to show/warn the level of mail activity. 1134 | LOW_LIMIT (3 by default), mail activity under this limit is shown as green. 1135 | MEDIUM_LIMIT (5 by default), mail activity under this limit is shown as orange. 1136 | HIGH_LIMIT (10 by default), mail activity under this limit is shown as red. 1137 | above the hight limit the user is warn for abuse. Set all to 0 if you want to 1138 | disable this feature. 1139 | 1140 | =item ADMIN 1141 | 1142 | List of admin usernames separated by a comma that must have full access to all 1143 | report. The username is checked against the http REMOTE_USER environment 1144 | variable. By default anyone can access, in this case you may want to add a 1145 | .htaccess file. 1146 | 1147 | =item DOMAIN_USER 1148 | 1149 | List of per user domain access control. The first field is the username and 1150 | the second field (separated by tabulation) is a comma separated list of domain 1151 | names to be allowed to this user. You could add as many lines of DOMAIN_USER 1152 | as you want in the configuration file. 1153 | 1154 | =back 1155 | 1156 | =head1 ACCESS CONTROL 1157 | 1158 | Access control is based on the REMOTE_USER environment variable stored by the 1159 | httpd server during an htaccess Authentication. If this variable is not set, 1160 | there is full access for anyone. 1161 | 1162 | =head1 REBUILD / RECOVER LOG FILES 1163 | 1164 | You have missed a bunch of log files or you want to rebuild your reports after 1165 | a sendmailanalyzer bug. What's the best way to go back and (re)parse your log 1166 | files to bring everything back upto date? 1167 | 1168 | =head2 Rebuild report from scratch 1169 | 1170 | If you want to restart from scratch, the best way is to proceed as follow: 1171 | 1172 | /etc/init.d/sendmailanalyzer stop 1173 | rm -rf /usr/local/sendmailanalyzer/data/* 1174 | for log in ls -tr /var/log/dmz-relays* 1175 | do 1176 | /usr/local/sendmailanalyzer/sendmailanalyzer -b -f -i -l $log 1177 | done 1178 | /etc/init.d/sendmailanalyzer start 1179 | 1180 | Of courses, this mean that you still have all the log files even if they 1181 | have been rotated. 1182 | 1183 | =head2 Rebuild since a specific log 1184 | 1185 | If you want to keep old data but just want to rewind for some days, you have 1186 | to stop sendmailanalyzer then: 1187 | 1188 | * remove all data directories corresponding to days including and after the first log entry 1189 | * remove the data directories of the corresponding weeks 1190 | * remove all files cache.pm in the corresponding month and year directories. 1191 | 1192 | Before reparsing all necessary log files, you need to remove history file 1193 | /usr/local/sendmailanalyzer/data/LAST_PARSED . And then: 1194 | 1195 | for log in ls -tr /var/log/dmz-relays* 1196 | do 1197 | /usr/local/sendmailanalyzer/sendmailanalyzer -b -f -i -l $log 1198 | done 1199 | /etc/init.d/sendmailanalyzer start 1200 | 1201 | Following the interval of the cache execution in your crontab you may want to 1202 | execute /usr/local/sendmailanalyzer/sa_cache . 1203 | 1204 | Data directory is build as follow for example: 1205 | 1206 | /usr/local/sendmailanalyzer/data/ 1207 | |-- LAST_PARSED 1208 | |-- smtp-gw-hostname 1209 | |-- #year 1210 | |-- #month 1211 | | |-- #day 1212 | ... 1213 | | |-- cache.pm 1214 | |-- cache.pm 1215 | |-- weeks 1216 | |-- #week 1217 | ... 1218 | 1219 | 1220 | =head1 AUTHOR 1221 | 1222 | Gilles Darold 1223 | 1224 | =head1 COPYRIGHT 1225 | 1226 | Copyright (c) 2002-2020 Gilles Darold - All rights reserved. 1227 | 1228 | This program is free software: you can redistribute it and/or modify 1229 | it under the terms of the GNU General Public License as published by 1230 | the Free Software Foundation, either version 3 of the License, or 1231 | any later version. 1232 | 1233 | This program is distributed in the hope that it will be useful, 1234 | but WITHOUT ANY WARRANTY; without even the implied warranty of 1235 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1236 | GNU General Public License for more details. 1237 | 1238 | You should have received a copy of the GNU General Public License 1239 | along with this program. If not, see < http://www.gnu.org/licenses/ >. 1240 | 1241 | =head1 BUGS 1242 | 1243 | Your volontee to help construct a better software by submitting bug report or 1244 | feature request as well as code contribution are welcome. 1245 | 1246 | 1247 | =head1 ACKNOWLEDGEMENT 1248 | 1249 | Thank to Sendmail.org for the kind permission to use the "Bat" logo. 1250 | 1251 | -------------------------------------------------------------------------------- /docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM httpd 2 | 3 | RUN apt-get update -yqq && apt-get install -y \ 4 | build-essential \ 5 | cron \ 6 | git \ 7 | perl \ 8 | supervisor \ 9 | procps \ 10 | libcgi-session-perl \ 11 | && apt-get clean 12 | 13 | RUN git clone https://github.com/darold/sendmailanalyzer.git /tmp/sendmailanalyzer 14 | 15 | WORKDIR /tmp/sendmailanalyzer 16 | 17 | RUN perl Makefile.PL && make && make install && rm -rf /tmp/sendmailanalyzer 18 | 19 | WORKDIR /usr/local/sendmailanalyzer 20 | 21 | COPY supervisord.conf /etc/supervisor/supervisord.conf 22 | 23 | COPY httpd.conf /usr/local/apache2/conf/httpd.conf 24 | 25 | COPY sa_cache.sh /etc/cron.daily/sa_cache.sh 26 | 27 | RUN mkdir -p /var/www/htdocs 28 | 29 | CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"] 30 | 31 | -------------------------------------------------------------------------------- /docker/docker-compose.yml.example: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | sma: 4 | restart: always 5 | build: . 6 | expose: 7 | - 80 8 | volumes: 9 | - /path/to/mail.log:/var/log/mail.log:ro 10 | - /path/to/data:/usr/local/sendmailanalyzer/data 11 | - /path/to/sendmailanalyzer.conf:/usr/local/sendmailanalyzer/sendmailanalyzer.conf 12 | -------------------------------------------------------------------------------- /docker/httpd.conf: -------------------------------------------------------------------------------- 1 | LoadModule mpm_event_module modules/mod_mpm_event.so 2 | LoadModule authnz_fcgi_module modules/mod_authnz_fcgi.so 3 | LoadModule access_compat_module modules/mod_access_compat.so 4 | LoadModule auth_basic_module modules/mod_auth_basic.so 5 | LoadModule authz_core_module modules/mod_authz_core.so 6 | LoadModule authz_host_module modules/mod_authz_host.so 7 | LoadModule reqtimeout_module modules/mod_reqtimeout.so 8 | LoadModule filter_module modules/mod_filter.so 9 | LoadModule mime_module modules/mod_mime.so 10 | LoadModule log_config_module modules/mod_log_config.so 11 | LoadModule env_module modules/mod_env.so 12 | LoadModule headers_module modules/mod_headers.so 13 | LoadModule setenvif_module modules/mod_setenvif.so 14 | LoadModule version_module modules/mod_version.so 15 | LoadModule unixd_module modules/mod_unixd.so 16 | LoadModule status_module modules/mod_status.so 17 | LoadModule autoindex_module modules/mod_autoindex.so 18 | LoadModule cgid_module modules/mod_cgid.so 19 | LoadModule dir_module modules/mod_dir.so 20 | LoadModule alias_module modules/mod_alias.so 21 | 22 | 23 | # 24 | # If you wish httpd to run as a different user or group, you must run 25 | # httpd as root initially and it will switch. 26 | # 27 | # User/Group: The name (or #number) of the user/group to run httpd as. 28 | # It is usually good practice to create a dedicated user and group for 29 | # running httpd, as with most system services. 30 | # 31 | User www-data 32 | Group www-data 33 | 34 | 35 | 36 | ServerAdmin admin@domain.com 37 | Listen 80 38 | 39 | 40 | # Deny access to the entirety of your server's filesystem. You must 41 | # explicitly permit access to web content directories in other 42 | # blocks below. 43 | # 44 | 45 | AllowOverride none 46 | Require all denied 47 | 48 | 49 | # DocumentRoot: The directory out of which you will serve your 50 | # documents. By default, all requests are taken from this directory, but 51 | # symbolic links and aliases may be used to point to other locations. 52 | # 53 | DocumentRoot "/usr/local/sendmailanalyzer/www" 54 | 55 | # 56 | # Possible values for the Options directive are "None", "All", 57 | # or any combination of: 58 | # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews 59 | # 60 | # Note that "MultiViews" must be named *explicitly* --- "Options All" 61 | # doesn't give it to you. 62 | # 63 | # The Options directive is both complicated and important. Please see 64 | # http://httpd.apache.org/docs/2.4/mod/core.html#options 65 | # for more information. 66 | # 67 | #Options Indexes Includes 68 | 69 | # 70 | # AllowOverride controls what directives may be placed in .htaccess files. 71 | # It can be "All", "None", or any combination of the keywords: 72 | # AllowOverride FileInfo AuthConfig Limit 73 | # 74 | #AllowOverride None 75 | 76 | Options ExecCGI 77 | AddHandler cgi-script .cgi 78 | DirectoryIndex sa_report.cgi 79 | Require all granted 80 | 81 | 82 | # 83 | # The following lines prevent .htaccess and .htpasswd files from being 84 | # viewed by Web clients. 85 | # 86 | 87 | Require all denied 88 | 89 | 90 | # 91 | # ErrorLog: The location of the error log file. 92 | # If you do not specify an ErrorLog directive within a 93 | # container, error messages relating to that virtual host will be 94 | # logged here. If you *do* define an error logfile for a 95 | # container, that host's errors will be logged there and not here. 96 | # 97 | ErrorLog /proc/self/fd/2 98 | 99 | # 100 | # LogLevel: Control the number of messages logged to the error_log. 101 | # Possible values include: debug, info, notice, warn, error, crit, 102 | # alert, emerg. 103 | # 104 | LogLevel warn 105 | 106 | 107 | # 108 | # The following directives define some format nicknames for use with 109 | # a CustomLog directive (see below). 110 | # 111 | LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined 112 | LogFormat "%h %l %u %t \"%r\" %>s %b" common 113 | 114 | 115 | # You need to enable mod_logio.c to use %I and %O 116 | LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio 117 | 118 | 119 | # 120 | # The location and format of the access logfile (Common Logfile Format). 121 | # If you do not define any access logfiles within a 122 | # container, they will be logged here. Contrariwise, if you *do* 123 | # define per- access logfiles, transactions will be 124 | # logged therein and *not* in this file. 125 | # 126 | CustomLog /proc/self/fd/1 common 127 | 128 | # 129 | # If you prefer a logfile with access, agent, and referer information 130 | # (Combined Logfile Format) you can use the following directive. 131 | # 132 | #CustomLog "logs/access_log" combined 133 | 134 | 135 | 136 | # 137 | # Avoid passing HTTP_PROXY environment to CGI's on this or any proxied 138 | # backend servers which have lingering "httpoxy" defects. 139 | # 'Proxy' request header is undefined by the IETF, not listed by IANA 140 | # 141 | RequestHeader unset Proxy early 142 | 143 | 144 | 145 | # 146 | # TypesConfig points to the file containing the list of mappings from 147 | # filename extension to MIME-type. 148 | # 149 | TypesConfig conf/mime.types 150 | 151 | # 152 | # AddType allows you to add to or override the MIME configuration 153 | # file specified in TypesConfig for specific file types. 154 | # 155 | #AddType application/x-gzip .tgz 156 | # 157 | # AddEncoding allows you to have certain browsers uncompress 158 | # information on the fly. Note: Not all browsers support this. 159 | # 160 | #AddEncoding x-compress .Z 161 | #AddEncoding x-gzip .gz .tgz 162 | # 163 | # If the AddEncoding directives above are commented-out, then you 164 | # probably should define those extensions to indicate media types: 165 | # 166 | AddType application/x-compress .Z 167 | AddType application/x-gzip .gz .tgz 168 | 169 | # 170 | # AddHandler allows you to map certain file extensions to "handlers": 171 | # actions unrelated to filetype. These can be either built into the server 172 | # or added with the Action directive (see below) 173 | # 174 | # To use CGI scripts outside of ScriptAliased directories: 175 | # (You will also need to add "ExecCGI" to the "Options" directive.) 176 | # 177 | #AddHandler cgi-script .cgi 178 | 179 | # For type maps (negotiated resources): 180 | #AddHandler type-map var 181 | 182 | # 183 | # Filters allow you to process content before it is sent to the client. 184 | # 185 | # To parse .shtml files for server-side includes (SSI): 186 | # (You will also need to add "Includes" to the "Options" directive.) 187 | # 188 | #AddType text/html .shtml 189 | #AddOutputFilter INCLUDES .shtml 190 | 191 | -------------------------------------------------------------------------------- /docker/sa_cache.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | /usr/local/sendmailanalyzer/sa_cache > /dev/null 2>&1 4 | /usr/bin/pkill -HUP sendmailanalyzer 5 | -------------------------------------------------------------------------------- /docker/supervisord.conf: -------------------------------------------------------------------------------- 1 | ; supervisor config file 2 | 3 | ;[unix_http_server] 4 | ;file=/dev/shm/supervisor.sock ; (the path to the socket file) 5 | ;chmod=0700 ; sockef file mode (default 0700) 6 | 7 | [supervisord] 8 | logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log) 9 | pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) 10 | childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP) 11 | 12 | ; the below section must remain in the config file for RPC 13 | ; (supervisorctl/web interface) to work, additional interfaces may be 14 | ; added by defining them in separate rpcinterface: sections 15 | [rpcinterface:supervisor] 16 | supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface 17 | 18 | [supervisorctl] 19 | serverurl=unix:///dev/shm/supervisor.sock ; use a unix:// URL for a unix socket 20 | 21 | ; The [include] section can just contain the "files" setting. This 22 | ; setting can list multiple files (separated by whitespace or 23 | ; newlines). It can also contain wildcards. The filenames are 24 | ; interpreted as relative to this file. Included files *cannot* 25 | ; include files themselves. 26 | 27 | 28 | [supervisord] 29 | nodaemon=true 30 | 31 | [program:sendmailanalyzer] 32 | startsecs=0 33 | autostart=true 34 | autorestart=false 35 | stdout_logfile=/dev/stdout 36 | stdout_logfile_maxbytes=0 37 | stderr_logfile=/dev/stderr 38 | stderr_logfile_maxbytes=0 39 | command=/usr/local/sendmailanalyzer/sendmailanalyzer 40 | 41 | [program:apache2] 42 | command=apachectl -D "FOREGROUND" -k start 43 | stdout_logfile=/dev/stdout 44 | stdout_logfile_maxbytes=0 45 | stderr_logfile=/dev/stderr 46 | stderr_logfile_maxbytes=0 47 | 48 | [program:cron] 49 | startsecs=0 50 | autostart=true 51 | autorestart=true 52 | stdout_logfile=/var/log/supervisor/%(program_name)s.log 53 | stderr_logfile=/var/log/supervisor/%(program_name)s.log 54 | command=/usr/sbin/cron -f 55 | 56 | -------------------------------------------------------------------------------- /packaging/README: -------------------------------------------------------------------------------- 1 | RPM/ 2 | Holds sendmailanalyzer.spec need to build an RPM package for RH/Fedora. 3 | It may also be usable for other RPM based distribution. 4 | 5 | Copy the sendmailanalyzer source tarball here: 6 | 7 | ~/rpmbuild/SOURCES/ 8 | 9 | Then create the RPM binary package as follow: 10 | 11 | rpmbuild -bb sendmailanalyzer.spec 12 | 13 | The binary package may be found here: 14 | 15 | ~/rpmbuild/RPMS/noarch/sendmailanalyzer-9.4-1.noarch.rpm 16 | 17 | To install run: 18 | 19 | rpm -i ~/rpmbuild/RPMS/noarch/sendmailanalyzer-9.4-1.noarch.rpm 20 | 21 | 22 | slackbuild/ 23 | Holds all files necessary to build a Slackware package. 24 | Copy the source tarball into the slackbuild directory and run 25 | 26 | sh sendmailanalyzer.SlackBuild 27 | 28 | then take a look at /tmp/build/ to find the Slackware package. 29 | To install run the following command: 30 | 31 | installpkg /tmp/build/sendmailanalyzer-9.4-i486-1gda.tgz 32 | 33 | 34 | debian/ 35 | Holds all files to build debian package. 36 | Go to the sendmailanalyzer source directory and just run the following 37 | command to generate the debian package: 38 | 39 | dpkg-buildpackage -us -uc 40 | 41 | To install the package, run: 42 | 43 | dpkg -i sendmailanalyzer_9.4-1_all.deb 44 | 45 | from parent directory. 46 | 47 | 48 | 49 | Feel free to send me other. 50 | 51 | -------------------------------------------------------------------------------- /packaging/RPM/sendmailanalyzer.spec: -------------------------------------------------------------------------------- 1 | %define uname sendmailanalyzer 2 | %define webdir %{_localstatedir}/www/%{uname} 3 | %define rundir %{_localstatedir}/run 4 | %define _unpackaged_files_terminate_build 0 5 | 6 | Name: %{uname} 7 | Epoch: 0 8 | Version: 9.4 9 | Release: 1%{?dist} 10 | Summary: Sendmail/Postfix log analyser with graphical reports 11 | 12 | Group: System Environment/Daemons 13 | License: GPLv3+ 14 | URL: http://sareport.darold.net/ 15 | Source0: http://downloads.sourceforge.net/%{name}/%{uname}-%{version}.tar.gz 16 | BuildArch: noarch 17 | BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) 18 | 19 | Requires: libpng 20 | Requires: gd 21 | Requires: httpd 22 | Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) 23 | Requires: vixie-cron 24 | 25 | %description 26 | %{uname} continuously read your mail log file to generate 27 | periodical HTML and graph reports. All reports are shown throught 28 | a CGI web interface. It reports all you ever wanted to know about 29 | email trafic on your network. You can also use it in ISP environment 30 | with per domain report. 31 | 32 | %prep 33 | %setup -q -n %{uname}-%{version} 34 | 35 | # create default crontab entry 36 | %{__cat} > %{uname}.cron << _EOF1_ 37 | # Sendmail log reporting daily cache 38 | #0 1 * * * root %{_bindir}/sa_cache > /dev/null 2>&1 39 | # Daemon restart after maillog logrotate (cron jobs at 4:04 every day) 40 | # Feel free to replace this line by an entry in /etc/logrotate.d/syslog 41 | #4 4 * * * root /etc/rc.d/init.d/sendmailanalyzer restart > /dev/null 2>&1 42 | # On huge MTA you may want to have five minutes caching 43 | #*/5 * * * * root %{_bindir}/sa_cache -a > /dev/null 2>&1 44 | 45 | _EOF1_ 46 | 47 | # create default httpd configuration 48 | %{__cat} > httpd-%{uname}.conf << _EOF2_ 49 | # 50 | # By default %{uname} statistics are only accessible from the local host. 51 | # 52 | #Alias /sareport %{webdir} 53 | # 54 | # 55 | # Options ExecCGI 56 | # AddHandler cgi-script .cgi 57 | # DirectoryIndex sa_report.cgi 58 | # Order deny,allow 59 | # Deny from all 60 | # Allow from 127.0.0.1 61 | # Allow from ::1 62 | # # Allow from .example.com 63 | # 64 | 65 | _EOF2_ 66 | 67 | # create README.RPM 68 | %{__cat} > README.RPM << _EOF3_ 69 | 70 | 1. Start $PNAME daemon with: /etc/rc.d/init.d/sendmailanalyzer start 71 | or /sbin/service sendmailanalyzer start 72 | 73 | 2. Uncomment the entries in %{_sysconfdir}/httpd/conf.d/%{uname}.conf. 74 | 75 | 3. Restart and ensure that httpd is running. 76 | 77 | 4. Browse to http://localhost/sareport/ to ensure that things are working 78 | properly. 79 | 80 | 5. If necessary, give additional hosts access to %{uname} by adding them to 81 | %{_sysconfdir}/httpd/conf.d/%{uname}.conf. 82 | 83 | 6. Setup a cronjob to run sa_cache and restart %{uname} daemon after maillog 84 | logrotate. Uncomment the entries in %{_sysconfdir}/cron.d/%{uname} or 85 | create a custom cronjob. 86 | 87 | _EOF3_ 88 | 89 | %build 90 | # Make Perl and SendmailAnalyzer distrib files 91 | %{__perl} Makefile.PL \ 92 | INSTALLDIRS=vendor \ 93 | QUIET=1 \ 94 | LOGFILE=/var/log/maillog \ 95 | BINDIR=%{_bindir} \ 96 | CONFDIR=%{_sysconfdir} \ 97 | PIDDIR=%{rundir} \ 98 | BASEDIR=%{_localstatedir}/lib/%{uname} \ 99 | HTMLDIR=%{webdir} \ 100 | MANDIR=%{_mandir}/man3 \ 101 | DOCDIR=%{_docdir}/%{uname}-%{version} \ 102 | DESTDIR=%{buildroot} < /dev/null 103 | %{__make} 104 | 105 | 106 | # nope, gotta love perl 107 | 108 | %install 109 | %{__rm} -rf %{buildroot} 110 | # set up path structure 111 | %{__install} -d -m 0755 %{buildroot}/%{_bindir} 112 | %{__install} -d -m 0755 %{buildroot}/%{_sysconfdir} 113 | %{__install} -d -m 0755 %{buildroot}/%{_localstatedir}/lib/%{uname} 114 | %{__install} -d -m 0755 %{buildroot}/%{_localstatedir}/run 115 | %{__install} -d -m 0755 %{buildroot}/%{webdir} 116 | %{__install} -d -m 0755 %{buildroot}/%{webdir}/lang 117 | 118 | 119 | # Make distrib files 120 | %{__make} install \ 121 | DESTDIR=%{buildroot} 122 | 123 | # Remove empty perl directory 124 | %{__rm} -rf %{buildroot}/usr/lib 125 | 126 | %{__install} -D -m 0644 %{uname}.cron \ 127 | %{buildroot}/%{_sysconfdir}/cron.d/%{uname} 128 | %{__install} -D -m 0644 httpd-%{uname}.conf \ 129 | %{buildroot}/%{_sysconfdir}/httpd/conf.d/%{uname}.conf 130 | %{__install} -D -m 0644 doc/%{uname}.3 \ 131 | %{buildroot}/%{_mandir}/man3/%{uname}.3 132 | %{__install} -D -m 0644 doc/sa_cache.3 \ 133 | %{buildroot}/%{_mandir}/man3/sa_cache.3 134 | %{__install} -D -m 0644 salogo.png \ 135 | %{buildroot}/%{webdir}/salogo.png 136 | %{__install} -D -m 0644 flotr2.js \ 137 | %{buildroot}/%{webdir}/flotr2.js 138 | %{__install} -Dpm 0755 start_scripts/sendmailanalyzer %{buildroot}%{_sysconfdir}/rc.d/init.d/sendmailanalyzer 139 | 140 | %clean 141 | %{__rm} -rf %{buildroot} 142 | 143 | %post 144 | if [ $1 -eq 1 ]; then 145 | /sbin/chkconfig --add sendmailanalyzer 146 | fi 147 | 148 | %preun 149 | if [ $1 -eq 0 ]; then 150 | /sbin/service sendmailanalyzer stop &>/dev/null || : 151 | /sbin/chkconfig --del sendmailanalyzer 152 | fi 153 | 154 | 155 | %files 156 | %defattr(0644,root,root,0755) 157 | %doc Change* README TODO README.RPM 158 | %attr(0755,root,root) %{_bindir}/%{uname} 159 | %attr(0755,root,root) %{_bindir}/sa_cache 160 | %attr(0644,root,root) %{_mandir}/man3/%{uname}.3.gz 161 | %attr(0644,root,root) %{_mandir}/man3/sa_cache.3.gz 162 | %attr(0644,root,root) %{webdir}/salogo.png 163 | %attr(0755,root,root) %{webdir}/sa_report.cgi 164 | %attr(0644,root,root) %{webdir}/flotr2.js 165 | %attr(0644,root,root) %{webdir}/lang/ERROR_CODE 166 | %attr(0644,root,root) %{webdir}/lang/en_US 167 | %attr(0644,root,root) %{webdir}/lang/fr_FR 168 | %attr(0644,root,root) %{webdir}/lang/es_ES 169 | %attr(0644,root,root) %{webdir}/lang/bg_BG 170 | %attr(0644,root,root) %{webdir}/lang/de_DE 171 | %attr(0644,root,root) %{webdir}/lang/pt_BR 172 | %attr(0644,root,root) %{webdir}/lang/es_ES 173 | %attr(0644,root,root) %{webdir}/lang/it_IT 174 | %attr(0644,root,root) %{webdir}/lang/ru_RU 175 | %attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/sendmailanalyzer 176 | %config(noreplace) %{_sysconfdir}/%{uname}.conf 177 | %config(noreplace) %{_sysconfdir}/cron.d/%{uname} 178 | %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{uname}.conf 179 | %dir %{_localstatedir}/lib/%{uname} 180 | %dir %{_localstatedir}/run 181 | %dir %{webdir} 182 | 183 | %changelog 184 | * Wed Aug 12 2020 Gilles Darold 185 | - Remove INSTALL file 186 | 187 | * Mon Dec 23 2013 Igor Vuk 188 | - Remove a rogue tab character, add pt_BR translation 189 | 190 | * Sun Jan 06 2013 Gilles Darold 191 | - Add man page for sa_cache. 192 | 193 | * Mon Dec 31 2012 Igor Vuk 194 | - Fix the .sample file install in doc folder. 195 | 196 | * Mon Dec 24 2012 Gilles Darold 197 | - Copy sendmailanalyzer.conf in _sysconfdir and sendmailanalyzer.conf.sample 198 | in _docdir 199 | 200 | * Wed Dec 19 2012 Igor Vuk 201 | - Update change of sendmailanalyzer.conf in sendmailanalyzer.conf.sample 202 | 203 | * Wed Jan 20 2010 Gilles Darold 204 | - Fix overide of http-sendmailanalyzer.conf 205 | 206 | * Wed Dec 30 2009 Gilles Darold 207 | - first packaging attempt 208 | 209 | -------------------------------------------------------------------------------- /packaging/slackbuild/README: -------------------------------------------------------------------------------- 1 | SendmailAnalyzer (Perl Sendmail log analyser) continuously read your maillog 2 | file to generate periodical HTML and graph reports. All reports are shown 3 | throught a CGI web interface. 4 | 5 | It reports all you ever wanted to know about email trafic on your network. 6 | You can also use it in ISP environment with per domain report. 7 | 8 | After installing the package you must follow the instructions displayed at 9 | the end. 10 | 11 | -------------------------------------------------------------------------------- /packaging/slackbuild/doinst.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Create crontab entry 4 | cat > sendmailanalyzer.cron << _EOF_ 5 | # 6 | # SendmailAnalyzer log reporting daily cache 7 | #0 1 * * * /usr/bin/sa_cache > /dev/null 2>&1 8 | # Daemon restart after maillog logrotate (cron jobs at 4:41 every day) 9 | # Feel free to replace this line by an entry in /etc/logrotate.d/syslog 10 | #41 4 * * * /etc/rc.d/rc.sendmailanalyzer restart >/dev/null 2>&1 11 | # On huge MTA you may want to have five minutes caching 12 | #*/5 * * * * /usr/bin/sa_cache -a > /dev/null 2>&1 13 | 14 | _EOF_ 15 | 16 | # Create default httpd configuration 17 | cat > httpd-sendmailanalyzer.conf << _EOF_ 18 | # 19 | # By default SendmailAnalyzer statistics are only accessible from localhost. 20 | # 21 | Alias /sareport /var/www/sendmailanalyzer 22 | 23 | 24 | Options ExecCGI 25 | AddHandler cgi-script .cgi 26 | DirectoryIndex sa_report.cgi 27 | Order deny,allow 28 | Deny from all 29 | Allow from 127.0.0.1 30 | Allow from ::1 31 | # Allow from .example.com 32 | 33 | 34 | _EOF_ 35 | 36 | # Append crontab entry to root user 37 | cat sendmailanalyzer.cron >> /var/spool/cron/crontabs/root 38 | rm -f sendmailanalyzer.cron 39 | # Append Apache configuration 40 | install -D -m 0644 httpd-sendmailanalyzer.conf /etc/httpd/extra/httpd-sendmailanalyzer.conf 41 | rm -f httpd-sendmailanalyzer.conf 42 | 43 | cat >> /etc/httpd/httpd.conf << _EOF_ 44 | 45 | # Uncomment the following line to limit access to SysUsage statistics 46 | # 47 | #Include /etc/httpd/extra/httpd-sendmailanalyzer.conf 48 | 49 | _EOF_ 50 | 51 | 52 | -------------------------------------------------------------------------------- /packaging/slackbuild/sendmailanalyzer.info: -------------------------------------------------------------------------------- 1 | PRGNAM="sendmailanalyzer" 2 | VERSION="9.4" 3 | HOMEPAGE="http://sareport.darold.net/" 4 | DOWNLOAD="http://downloads.sourceforge.net/sa-report/sendmailanalyzer-9.4.tar.gz" 5 | MD5SUM="" 6 | DOWNLOAD_x86_64="UNTESTED" 7 | MD5SUM_x86_64="" 8 | MAINTAINER="Gilles Darold" 9 | EMAIL="gilles@darold.net" 10 | APPROVED="" 11 | -------------------------------------------------------------------------------- /packaging/slackbuild/sendmailanalyzer.slackBuild: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Written by Gilles Darold < gilles at darold dot net > 3 | # Licence: GPL v3 4 | # 5 | # Build script for Slackware - SendmailAnalyzer SlackBuild 6 | # 7 | # Latest Software sourcecode is available at: 8 | # http://sareport.darold.net/ 9 | # 10 | # Depends: l/libpng n/httpd d/perl l/gd 11 | # Suggests: 12 | 13 | ## Fill these variables to your needs ## 14 | NAMESRC=${NAMESRC:-sendmailanalyzer} 15 | VERSION=${VERSION:-9.4} 16 | EXT=${EXT:-tar.gz} 17 | NAMEPKG=${NAMEPKG:-sendmailanalyzer} 18 | PKGEXT=${PKGEXT:-tgz/txz} 19 | BUILD=${BUILD:-1} 20 | TAG=${TAG:-_gda} 21 | PNAME=${PNAME:-sendmailanalyzer} 22 | 23 | TMP=${TMP:-/tmp} 24 | OUT=${OUT:-$TMP/build} 25 | ARCH=${ARCH:-i486} 26 | TARGET=${TARGET:-i486} 27 | WGET=${WGET:-http://downloads.sourceforge.net/sa-report/$NAMESRC-$VERSION.$EXT} 28 | DOC="Change* README TODO" 29 | SUM="" 30 | ######################################## 31 | 32 | set -e 33 | umask 022 34 | 35 | if [ ! -r $NAMESRC-$VERSION.$EXT ]; then 36 | wget -vc $WGET -O $NAMESRC-$VERSION.$EXT.part 37 | mv $NAMESRC-$VERSION.$EXT.part $NAMESRC-$VERSION.$EXT 38 | fi 39 | 40 | # if checksum is include in the script : generate and check 41 | if [ -n "$SUM" ]; then 42 | echo "$SUM $NAMESRC-$VERSION.$EXT" > $NAMESRC-$VERSION.$EXT.sha1 43 | sha1sum -c $NAMESRC-$VERSION.$EXT.sha1 44 | elif [ -f $NAMESRC-$VERSION.$EXT.sha1 ]; then 45 | sha1sum -c $NAMESRC-$VERSION.$EXT.sha1 46 | fi 47 | 48 | # or just check if the .sha1 is another file 49 | 50 | CWD=$(pwd) 51 | PKG=$TMP/build/$NAMEPKG 52 | NAME=$(tar ft $NAMESRC-$VERSION.$EXT | head -n 1 | awk -F/ '{ print $1 }') 53 | 54 | case $ARCH in 55 | i386)SLKCFLAGS="-O2 -march=i386 -mtune=i686";LIBDIRSUFFIX="";; 56 | i486)SLKCFLAGS="-O2 -march=i486 -mtune=i686";LIBDIRSUFFIX="";; 57 | i586)SLKCFLAGS="-O2 -march=i586 -mtune=i686";LIBDIRSUFFIX="";; 58 | i686)SLKCFLAGS="-O2 -march=i686 -mtune=i686";LIBDIRSUFFIX="";; 59 | s390)SLKCFLAGS="-O2";LIBDIRSUFFIX="";; 60 | x86_64)SLKCFLAGS="-O2 -fPIC";LIBDIRSUFFIX="64" 61 | esac 62 | 63 | if [ ! -d $TMP ]; then 64 | echo "$TMP doesn't exist or is not a directory !" 65 | exit 1 66 | fi 67 | 68 | # Build the software 69 | cd $TMP 70 | 71 | echo "Building $NAMESRC-$VERSION.$EXT..." 72 | tar xf $CWD/$NAMESRC-$VERSION.$EXT 73 | cd $NAME 74 | perl Makefile.PL \ 75 | INSTALLDIRS=vendor \ 76 | QUIET=1 \ 77 | LOGFILE=/var/log/maillog \ 78 | BINDIR=/usr/bin \ 79 | CONFDIR=/etc \ 80 | PIDDIR=/var/run \ 81 | BASEDIR=/var/lib/$PNAME \ 82 | HTMLDIR=/var/www/$PNAME \ 83 | MANDIR=/usr/man/man3 \ 84 | DOCDIR=/usr/share/doc/$PNAME \ 85 | DESTDIR=$PKG || exit 1 86 | 87 | make 88 | make install DESTDIR=$PKG 89 | # Please note that some software use INSTALL_ROOT=$PKG or prefix=$PKG/usr or install_root=$PKG ... 90 | 91 | DOC="Change* README TODO $PNAME.conf" 92 | 93 | # Install a slack-desc 94 | mkdir -p $PKG/install 95 | cat $CWD/slack-desc > $PKG/install/slack-desc 96 | 97 | # Install a doinst.sh, if it exists 98 | if [ -r $CWD/doinst.sh ]; then 99 | cat $CWD/doinst.sh > $PKG/install/doinst.sh 100 | fi 101 | 102 | # Add this to the doinst.sh 103 | cat <<_EOF_ >> $PKG/install/doinst.sh 104 | # Handle the incoming configuration files: 105 | config() { 106 | for infile in \$1; do 107 | NEW="\$infile" 108 | OLD="\`dirname \$NEW\`/\`basename \$NEW .new\`" 109 | # If there's no config file by that name, mv it over: 110 | if [ ! -r \$OLD ]; then 111 | mv \$NEW \$OLD 112 | elif [ "\`cat \$OLD | md5sum\`" = "\`cat \$NEW | md5sum\`" ]; then 113 | # toss the redundant copy 114 | rm \$NEW 115 | fi 116 | # Otherwise, we leave the .new copy for the admin to consider... 117 | done 118 | } 119 | 120 | config etc/sendmailanalyzer.conf.sample 121 | 122 | cat install/README.Slackware 123 | 124 | _EOF_ 125 | 126 | 127 | # Write post install information 128 | cat > $PKG/install/README.Slackware << _EOF_ 129 | 130 | 131 | 1. Start $PNAME daemon with: /etc/rc.d/rc.$PNAME start 132 | 133 | 2. Uncomment the entries in /etc/httpd/httpd.conf: 134 | Include /etc/httpd/extra/httpd-$PNAME.conf 135 | 136 | 3. Restart and ensure that httpd is running. 137 | 138 | 4. Browse to http://localhost/sareport/ to ensure that things are working 139 | properly. 140 | 141 | 5. If necessary, give additional hosts access to $PNAME by adding them to 142 | /etc/httpd/extra/httpd-$PNAME.conf 143 | 144 | 6. Setup a cronjob to run sa_cache and restart $PNAME daemon after maillog 145 | logrotate. Uncomment the entries in /var/spool/cron/crontabs/root or 146 | create a custom cronjob. 147 | 148 | _EOF_ 149 | 150 | # Install starter script 151 | mkdir -p $PKG/etc/rc.d 152 | install -m 755 start_scripts/rc.$PNAME $PKG/etc/rc.d/rc.$PNAME 153 | 154 | # Install a documentation 155 | mkdir -p $PKG/usr/doc/$PNAME-$VERSION 156 | cp -a $DOC $PKG/usr/doc/$PNAME-$VERSION 157 | 158 | # Compress the man pages 159 | if [ -d $PKG/usr/man ]; then 160 | find $PKG/usr/man -type f -name "*.?" -exec gzip -9 {} \; 161 | for manpage in $(find $PKG/usr/man -type l) ; do 162 | ln -s $(readlink $manpage).gz $manpage.gz 163 | rm -f $manpage 164 | done 165 | fi 166 | 167 | # Compress the info pages 168 | if [ -d $PKG/usr/info ]; then 169 | rm -f $PKG/usr/info/dir 170 | gzip -9 $PKG/usr/info/*.info* 171 | fi 172 | 173 | # Remove 'special' files 174 | find $PKG -name perllocal.pod \ 175 | -o -name ".packlist" \ 176 | -o -name "*.bs" \ 177 | | xargs rm -f 178 | # Remove lib perl directory as nothing is installed here. 179 | rm -rf $PKG/usr/lib 180 | 181 | # Strip binaries, libraries and archives 182 | find $PKG -type f | xargs file | grep "LSB executable" | cut -f 1 -d : | xargs \ 183 | strip --strip-unneeded 2> /dev/null || echo "No binaries to strip" 184 | find $PKG -type f | xargs file | grep "shared object" | cut -f 1 -d : | xargs \ 185 | strip --strip-unneeded 2> /dev/null || echo "No shared objects to strip" 186 | find $PKG -type f | xargs file | grep "current ar archive" | cut -f 1 -d : | \ 187 | xargs strip -g 2> /dev/null || echo "No archives to strip" 188 | 189 | # Build the package 190 | cd $PKG 191 | mkdir -p $OUT 192 | PACKAGING=" 193 | chown root:root . -R 194 | /sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD$TAG.tgz 195 | rm -rf $PKG 196 | rm -rf $TMP/$NAME 197 | " 198 | if [ "$(which fakeroot 2> /dev/null)" ]; then 199 | echo "$PACKAGING" | fakeroot 200 | else 201 | su -c "$PACKAGING" 202 | fi 203 | 204 | -------------------------------------------------------------------------------- /packaging/slackbuild/slack-desc: -------------------------------------------------------------------------------- 1 | |-----handy-ruler------------------------------------------------------| 2 | SendmailAnalyzer: SendmailAnalyzer (Perl Sendmail log analyser) 3 | SendmailAnalyzer: 4 | SendmailAnalyzer: SendmailAnalyzer continuously read your maillog file to generate 5 | SendmailAnalyzer: periodical HTML and graph reports. All reports are shown throught 6 | SendmailAnalyzer: a CGI web interface. 7 | SendmailAnalyzer: It reports all you ever wanted to know about email trafic on your network. 8 | SendmailAnalyzer: You can also use it in ISP environment with per domain report. 9 | SendmailAnalyzer: 10 | SendmailAnalyzer: 11 | SendmailAnalyzer: 12 | SendmailAnalyzer: 13 | -------------------------------------------------------------------------------- /salogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darold/sendmailanalyzer/7dbc6c53014571dd85fa3f53a9e683b5b142eb59/salogo.png -------------------------------------------------------------------------------- /sorttable.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darold/sendmailanalyzer/7dbc6c53014571dd85fa3f53a9e683b5b142eb59/sorttable.js -------------------------------------------------------------------------------- /start_scripts/README: -------------------------------------------------------------------------------- 1 | Here a some scripts to start sendmailanalyzer at boot time or manually. 2 | 3 | Standard System V startup script, should works on all distibution using 4 | the init SysV: 5 | 6 | rc.sendmailanalyzer 7 | 8 | just copy as root this script into /etc/init.d/sendmailanalyzer and 9 | make it executable (chmod 755). If you want sendmailanalyzer to be 10 | run at boot time and stopped at poweroff, you have to create the 11 | corresponding symlinks into /etc/rc3.d/, /etc/rc6.d/ and /etc/rc0.d/. 12 | 13 | For convenience, there's also a starter script for RedHat like system: 14 | 15 | sendmailanalyzer 16 | 17 | Just copy as root this script into /etc/init.d/sendmailanalyzer and 18 | make it executable (chmod 755). If you want sendmailanalyzer to be 19 | run at boot time and stopped at poweroff, you have to run the following 20 | command: 21 | 22 | chkconfig --add sendmailanalyzer 23 | 24 | New Linux distributions have replaced the standard init SysV by the new 25 | systemd linux centrics startup system. If you are using this system here 26 | is the service file definition to use: 27 | 28 | sendmailanalyzer.service 29 | 30 | just copy it under /usr/lib/systemd/system/sendmailanalyzer.service 31 | as root. Edit it to change the path to the sendmailanalyzer program 32 | and change Requires/After directives whether you are running sendmail 33 | or postfix. Then reload systemd with the following command as root: 34 | 35 | systemctl --system daemon-reload 36 | 37 | To start/stop sendmailanalyer use the following commands: 38 | 39 | systemctl start sendmailanalyzer.service 40 | systemctl stop sendmailanalyzer.service 41 | 42 | If you want sendmailanalyzer to be run at boot time and stopped at 43 | poweroff, you have to run the following command: 44 | 45 | systemctl enable sendmailanalyzer.service 46 | 47 | This will create the symlinks for you into the /etc/systemd/system/ 48 | directory. 49 | 50 | -------------------------------------------------------------------------------- /start_scripts/rc.sendmailanalyzer: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Slackware and generic starter script. 3 | # 4 | # Start/stop/restart SendmailAnalyzer. 5 | # 6 | 7 | SALYZER=/usr/local/sendmailanalyzer/sendmailanalyzer 8 | PIDFILE=/var/run/sendmailanalyzer.pid 9 | 10 | # Start SendmailAnalyzer: 11 | sa_start() { 12 | if [ ! -x $SALYZER ]; then 13 | echo "ERROR: can not execute $SALYZER" 1>&2 14 | exit 1 15 | fi 16 | echo 'Starting SendmailAnalyzer Daemon...' 17 | $SALYZER -f 18 | } 19 | 20 | # Stop SendmailAnalyzer: 21 | sa_stop() { 22 | echo 'Stopping SendmailAnalyzer Daemon...' 23 | pid=$(cat $PIDFILE) 24 | kill -- -$pid 1> /dev/null 2> /dev/null 25 | } 26 | 27 | # Restart SendmailAnalyzer: 28 | sa_restart() { 29 | sa_stop 30 | sleep 2 31 | sa_start 32 | } 33 | 34 | case "$1" in 35 | 'start') 36 | sa_start 37 | ;; 38 | 'stop') 39 | sa_stop 40 | ;; 41 | 'restart') 42 | sa_restart 43 | ;; 44 | *) 45 | echo "usage $0 start|stop|restart" 46 | esac 47 | 48 | -------------------------------------------------------------------------------- /start_scripts/sendmailanalyzer: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Start/stop/restart SendmailAnalyzer. 3 | # chkconfig: 35 40 40 4 | # description: Sendmail Log File Analyzer 5 | # processname: sendmailanalyzer 6 | # config: /etc/sendmailanalyzer.conf 7 | # pidfile: /var/run/sendmailanalyzer.pid 8 | 9 | # Source function library. 10 | . /etc/rc.d/init.d/functions 11 | 12 | # Source networking configuration. 13 | . /etc/sysconfig/network 14 | 15 | SALYZER=/usr/local/sendmailanalyzer/sendmailanalyzer 16 | PIDFILE=/var/run/sendmailanalyzer.pid 17 | LOCKFILE=/var/lock/subsys/sendmailanalyzer 18 | 19 | [ -x $SALYZER ] || exit 0 20 | 21 | 22 | # Start SendmailAnalyzer: 23 | sa_start() { 24 | if [ ! -x $SALYZER ]; then 25 | echo"ERROR: can't execute $SALYZER" 26 | exit 1 27 | fi 28 | echo -n "Starting SendmailAnalyzer Daemon: " 29 | daemon $SALYZER -f 30 | RETVAL1=$? 31 | if [ $RETVAL1 -eq 0 ]; then 32 | touch $LOCKFILE 33 | fi 34 | echo 35 | } 36 | 37 | # Stop SendmailAnalyzer: 38 | sa_stop() { 39 | echo -n "Stopping SendmailAnalyzer Daemon: " 40 | kill -s kill `cat $PIDFILE` 41 | rm -f $LOCKFILE 42 | echo 43 | } 44 | 45 | # Restart SendmailAnalyzer: 46 | sa_restart() { 47 | sa_stop 48 | sleep 2 49 | sa_start 50 | } 51 | 52 | case "$1" in 53 | 'start') 54 | sa_start 55 | ;; 56 | 'stop') 57 | sa_stop 58 | ;; 59 | 'restart') 60 | sa_restart 61 | ;; 62 | 'condrestart') 63 | if [ -e $LOCKFILE ]; then 64 | sa_restart 65 | fi 66 | ;; 67 | 'status') 68 | status sendmailanalyzer 69 | ;; 70 | *) 71 | echo "usage $0 start|stop|restart|status" 72 | esac 73 | 74 | -------------------------------------------------------------------------------- /start_scripts/sendmailanalyzer.gentoo: -------------------------------------------------------------------------------- 1 | #!/sbin/runscript 2 | #Rudimental init script for sendmailanalyzer for Gentoo Linux (openrc) 3 | # by Edoardo Liverani 2016 4 | 5 | SALYZER=/usr/local/sendmailanalyzer/sendmailanalyzer 6 | PIDFILE=/var/run/sendmailanalyzer.pid 7 | 8 | 9 | depend() { 10 | use syslog net 11 | } 12 | 13 | start() { 14 | 15 | if [ ! -x $SALYZER ]; then 16 | echo "ERROR: can not execute $SALYZER" 1>&2 17 | exit 1 18 | fi 19 | ebegin 'Starting SendmailAnalyzer Daemon...' 20 | 21 | #$SALYZER -f 22 | 23 | start-stop-daemon --start --exec $SALYZER \ 24 | --pidfile $PIDFILE -- -f 25 | eend $? 26 | 27 | } 28 | 29 | stop() { 30 | 31 | ebegin 'Stopping SendmailAnalyzer Daemon...' 32 | start-stop-daemon --stop --exec $SALYZER \ 33 | --pidfile $PIDFILE 34 | eend $? 35 | 36 | } 37 | -------------------------------------------------------------------------------- /start_scripts/sendmailanalyzer.service: -------------------------------------------------------------------------------- 1 | # Copy the file as "/etc/systemd/system/sendmailanalyzer.service" 2 | # To run sendmailanalyzer, use: 3 | # systemctl start sendmailanalyzer.service 4 | # to enable automatic start at boot time, use: 5 | # systemctl enable sendmailanalyzer.service 6 | # to stop sendmailanalyzer: 7 | # systemctl stop sendmailanalyzer.service 8 | # 9 | # Feel free to modify the name of the PostgreSQL service following 10 | # your installation. 11 | # 12 | # For more info about custom unit files, see 13 | # http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F 14 | [Unit] 15 | Description=SendmailAnalyzer a sendmail/postfix log analyzer 16 | Requires=sendmail.service 17 | After=sendmail.service 18 | #Requires=postfix.service 19 | #After=postfix.service 20 | 21 | [Service] 22 | Type=forking 23 | PIDFile=/var/run/sendmailanalyzer.pid 24 | ExecStart=/usr/local/sendmailanalyzer/sendmailanalyzer -f 25 | ExecStop=/bin/bash -c "/bin/kill -TERM `/usr/bin/cat /var/run/sendmailanalyzer.pid`" 26 | 27 | [Install] 28 | WantedBy=multi-user.target 29 | --------------------------------------------------------------------------------