Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support (Russian)
  3. Способ организации массовой почтовой рассылки

Способ организации массовой почтовой рассылки

Scheduled Pinned Locked Moved Support (Russian)
1 Posts 1 Posters 43.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    S
    SKYnv
    wrote on last edited by
    #1

    Способ организации массовой почтовой рассылки для NetXMS win32 (хотя аналогичный способ сработает и на других осях, но там как правило нет подобных проблем) на основе Gmail.
    Нам понадобиться

    1. Stunnel, который можно загрузить с одного из зеркал проекта
    2. Blat, который можно загрузить со страницы проекта.

    Ставим Stunnel как сервис, и меняем конфигурационный файл следующим образом.

    ; Sample stunnel configuration file for Win32 by Michal Trojnara 2002-2012
    ; Some options used here may be inadequate for your particular configuration
    ; This sample file does *not* represent stunnel.conf defaults
    ; Please consult the manual for detailed description of available options
    
    ; **************************************************************************
    ; * Global options                                                         *
    ; **************************************************************************
    
    ; Debugging stuff (may useful for troubleshooting)
    debug = 7
    output = stunnel.log
    
    ; Disable FIPS mode to allow non-approved protocols and algorithms
    ;fips = no
    
    ; **************************************************************************
    ; * Service defaults may also be specified in individual service sections  *
    ; **************************************************************************
    
    ; Certificate/key is needed in server mode and optional in client mode
    cert = stunnel.pem
    ;key = stunnel.pem
    
    ; Authentication stuff needs to be configured to prevent MITM attacks
    ; It is not enabled by default!
    ;verify = 2
    ; Don't forget to c_rehash CApath
    ;CApath = certs
    ; It's often easier to use CAfile
    ;CAfile = certs.pem
    ; Don't forget to c_rehash CRLpath
    ;CRLpath = crls
    ; Alternatively CRLfile can be used
    ;CRLfile = crls.pem
    
    ; Disable support for insecure SSLv2 protocol
    options = NO_SSLv2
    ; Workaround for Eudora bug
    ;options = DONT_INSERT_EMPTY_FRAGMENTS
    
    ; These options provide additional security at some performance degradation
    ;options = SINGLE_ECDH_USE
    ;options = SINGLE_DH_USE
    
    ; **************************************************************************
    ; * Service definitions (at least one service has to be defined)           *
    ; **************************************************************************
    
    ; Example SSL server mode services
    
    ;[pop3s]
    ;accept  = 995
    ;connect = 110
    
    ;[imaps]
    ;accept  = 993
    ;connect = 143
    
    ;[ssmtp]
    ;accept  = 465
    ;connect = 25
    
    ; Example SSL client mode services
    
    ;[gmail-pop3]
    ;client = yes
    ;accept = 127.0.0.1:110
    ;connect = pop.gmail.com:995
    
    ;[gmail-imap]
    ;client = yes
    ;accept = 127.0.0.1:143
    ;connect = imap.gmail.com:993
    
    [gmail-smtp]
    client = yes
    accept = 127.0.0.1:25
    connect = smtp.gmail.com:465
    
    ; Example SSL front-end to a web server
    
    ;[https]
    ;accept  = 443
    ;connect = 80
    ; "TIMEOUTclose = 0" is a workaround for a design flaw in Microsoft SSL
    ; Microsoft implementations do not use SSL close-notify alert and thus
    ; they are vulnerable to truncation attacks
    ;TIMEOUTclose = 0
    
    ; vim:ft=dosini
    

    запускаем сервис.

    Для удобства использования Blat лучше распаковать в netXMS/var (в этом случае нам не придется писать длинные пути или добавлять переменные path)
    Теперь для удобства (можно и не делать прописав данный профиль в файле настроек, который будет описан ниже) создадим профиль для Blat, который сохранится в реестре.
    Для этого просто нужно запустить blat.exe со следующими параметрами.

    blat.exe -install smtp.google.com почтовый_ящик 3 587 gmail юзер пароль_к_ящику
    

    gmail здесь это имя профиля, который потом можно вызывать просто добавив к параметрам данный идентификатор, профилей может быть несколько.

    Далее создадим 2 файла

    1. adr.list (имя и расширения файла может быть любым, это просто текстовый файл)
      в нем буду хранится наши адреса в следующем формате
    [email protected]
    [email protected]
    [email protected]
    

    один адрес - одна строчка. Лишних пробелов и знаков желательно избегать.

    1. opt.list (имя и расширения файла может быть любым, это просто текстовый файл)
      В данном файле будут хранится настройки в следующем формате
    -f "имя отправителя" -p gmail -log blat.log -try 1 -ti 60
    

    имя отправителя желательно использовать примерно такое

    NETXMS Server <ваш_ящик@gmail.ru>
    

    gmail здесь это имя профиля.
    В файл blat.log будут писаться логи.

    все, все приготовления завершены.

    теперь идём в  Action Configuration И создаем новый execute command on management server со следующим параметром

    blat.exe -tf adr.list -of opt.list -subject "Port down on %a!" -body "В %t порт номер %5 на коммутаторе %n был отключен."
    

    после идем в Even processing policy editor и на событие port down добавляем этот action.

    аналогичным образом создаем все требуемые action'ы

    Данный способ весьма гибок в настройках, так-как позволяет на лету менять списки рассылки либо настройки, даже из скрипта в самом netxms или ручками.


    udp1: некоторые опечатки и уточнения.
    версия первая, писал второпях, если кому нужны уточнения, то не стесняйтесь.

    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    Powered by NodeBB Contributors
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups