Quantcast
Channel: IceWarp Support
Viewing all 83 articles
Browse latest View live

How to filter services used by users

$
0
0

To filter which users has activated or deactivated services in IceWarp Server Administration Console under Domains & Acounts- users - policies tab you can follow bellow suggested example of sql query in IceWarp integrated SQL Manager or tool command.

If you are using the default SQLite database or have your accounts on filesystem, you can use tool.exe (or *.sh) with this command:

tool --filter="(u_webmail=1)" display account *@domain.com U_Name

-this comand will list all users of specific domain with enabled webclient service in admin console>domain>user>policies services chapter

 

If you are using Mysql or Microsoft sql database you have to run following query in IceWarp integrated SQL Manager because these API variables are stored in column U_ServiceAccess as bits:

SQL Manager

SELECT U_ID, U_Mailbox, (U_ServicesAccess & 8 ) AS U_IM  FROM Users where (U_ServicesAccess & 8 )=0;

-this query will list all users with enabled Instant Messaging service in their settings, you can export the list as csv file.

 

To filter all users who has e.g. disabled service groupware in their account settings use following query:

SELECT U_ID, U_Mailbox, (U_ServicesAccess & 64 ) AS U_GW  FROM Users where (U_ServicesAccess & 64 )<>0;

 

 - if you want to filter all users with enabled webclient execute:

SELECT U_ID, U_Mailbox, (U_ServicesAccess & 16 ) AS U_WebMail  FROM Users where (U_ServicesAccess & 16 )=0;

 

Here is the list of flags and values of ServieAccess column:

U_LocalDomain = $01;  // 1
  U_SMTP = $02;  // 2
  U_POPIMAP = $04;  // 4
  U_IM = $08;  // 8
  U_WebMail = $10;  // 16
  U_AS = $20;  // 32
  U_GW = $40;  // 64
  U_CR = $80;  // 128



o.vanek

 


How to export calendars and contact from IceWarp to ICS and VCF F...

$
0
0

1. Copy the file export.php to directory "icewarp/html/webmail".

2. Enter this url to your web browser "yourdomain.com/webmail/export.php"

3. Enter the name of the domain and click on the button export.

You should find the exported files in directory "icewarp/_export". 

Example for user a@test.com

All contacts will be saved in the file "icewarp/_export/test.com/a/contacts.vcf" 

All Events will be saved in the file "icewarp/_export/test.com/a/calendar.ics" 

 

Here is the download link of the scrip:

https://server.icewarp.com/webdav/ticket/eJw9yjsOgCAMANDbdPND.Q9duYepRYkmEnDw.Do5v7eRFlaO46LYImRK5ZQOTAn6T8JWQaMBlfEmaPtFIShkXBbv0WNAmeSpV7vHulc4CDOGdRaD8QVEZBuF/export.php

 

 

Exporting blacklist/whitelist

$
0
0

To export all blacklisted addresses from your database via IceWarp Server Administration console:

 

1) connect the integrated SQL Manager with your Anti-Spam database

 

2) write your appropriet query:

 

select * from senders where SndAuthorized = 0 

(for exporting whitelist use SndAuthorized = 1)

 

For exporting blacklist of one user write this query:

 

select * from senders where SndAuthorized = 0 and SndOwner = 'user@domain.net'   

(for filtering whole domain use SndDomain instead of SndOwner)

 

3) execute the query

 

4) export the query and save it as csv file on your file-system

 

 export

Security Alert (A15-06-04): Multiple Vulnerabilities in OpenSSL

$
0
0

Regarding the OpenSSL vulnerability issues covered by Security Alert (A15-06-04) please upgrade openssl libraries in your system. In order to that follow the procedure described further below.

 

Afected Systems:

 

OpenSSL versions prior to 0.9.8zg, 1.0.0s, 1.0.1n or 1.0.2b 

All current versions of IceWarp Server are using affected versions of OpenSSL libraries.

 

IceWarp Server versions 10.0.5-10.4.1 are using 0.9.8x product version of OpenSSL

IceWarp Server versions 10.4.2-11.0.0 build 2 are using 1.0.0x product version of OpenSSL

IceWarp Server versions 11.0.0 build 3 and later are using 1.0.1x product version of OpenSSL. 

 

On Windows

 

a) IceWarp Server 32 bit version

  1. check the product version of your IceWarp OpenSSL libraries located in installation directory
  2. stop all services, wait until all php session ends or kill them
  3. rename ssleay32.dll and libeay32.dll to e.g. ssleay.dll.old (for backup purposes)
  4. import new OpenSSL libraries of the same product version (same numbers, but higher letter than prior versions mentioned in affected systems) to IceWarp Server installation directory
  5. restart all services

Feel free to update to the latest OpenSSL libraries of the same product version.

 

b) IceWarp Server 64 bit version

  1. follow steps 1 and 2 from instruction for 32 bit version of IceWarp Server
  2. rename ssleay32.dll, ssleay64.dll, libeay32.dll, libeay64.dll (viz. step 3 of previous article)
  3. replace files mentioned in previous step with attached OpenSSL libraries version 1.0.1x (only for this product version! -usable for Icewarp Server 11.0.0 build 3 and later)
  4. restart all services

 

On Linux

1) update your operating system

 

o.vanek

Configuring SSO (Single Sign-on)

$
0
0

The following must be done on both the domain controller and IceWarp Server: 

  • create type A record in your DNS for the URL of webmail (i.e. mail.xmigrator.com)

  • create a “link” user in ActiveDirectory (AD) - it must be located under Users container and it must not have password expiration as well as change password on first logon set, for instance we create user: http_sso@xmigrator.com (userPrincipalName value before mapping)
  • on the domain controller (AD), open command line interface (CLI) and execute the following command:
    ktpass out c:\HTTP#mail.xmigrator.com@XMIGRATOR.COM -princ HTTP/mail.xmigrator.com@XMIGRATOR.COM -mapUser ssoiwwebmail@xmigrator.com mapOp set pass * -ptype KRB5_NT_PRINCIPAL
    pay attention to syntax as it is case sensitive - to keep the correct upper / lower case is essential; AD domain should be written with capitals
  • move file c:\HTTP#mail.xmigrator.com@XMIGRATOR.COM to IceWarp Server (the most suitable location is install_path/config/_keytabs, but it is not so important at this point); for the purpose of generating keytab file any file name can be used, however name that would be expected by IceWarp Server (explained later) is used in this example

  • on IceWarp Server go to domain properties (domain mail.xmigrator.com in our example case) - tab Directory Service and enable SSO
  • Kerberos service name must be filled in according to following pattern: <principal>/<icewarp_domain>@<AD_DOMAIN> (for our example it would be: HTTP/mail.xmigrator.com@XMIGRATOR.COM - notice how service name and keytab file name match (slash is not allowed in file name so it is replaced with hash sign)
  • Remote account matching should be left at default value - “Match with username" - as that usually works but the method depends on your directory service configuration
  • Manage keytabs.. button opens content of keytab folder which is install_path/config/_keytabs; the keytab file generated on domain controller earlier should be copied here. Also, the file must have its name set accordingly at this point, for our example it is HTTP#mail.xmigrator.com@XMIGRATOR.COM

 

 

The following must be done on the client side: 

  • add webmail URL to trusted sites, for instance in our case mail.xmigrator.com
    • in Firefox, visit about:config / search for network.negotiate-auth.trusted-uris and add the site there



    • in MSIE open the Internet Options dialog / Security tab / Trusted sites (do not require https:// if not necessary). Additionally Integrated Windows Authentication feature must be allowed (default, will allow Kerberos)


 

Now you can try to browse SSO dedicated URL of webmail (i.e. http://mail.xmigrator.com/webmail/sso) - if all went good, webmail of the same user as the one logged on to OS Windows will open. If not, Kerberos logs will become very usefull; turn them on in server Administration console: System / Logging / Debug tab / Kerberos

 known issues:

if source LDIF attribute value used for local username source contains dash, you have to enable checkbox: "add AD login to alias" and set "remote account matching" on: "match with alias".

 

a.rusek, o.vanek

 

Generating user certificates with openssl

$
0
0

Following article is about generating user certificates for signing or encryption emails of user on your mail server. If you will create your own CA authority, you can import them to users web browser and use as dual authentication for connection to users accounts, thats actually the most secure way how to use IceWarp Server. On windows based system download the binaries and run openssl.exe. On linux check if you are using the latest openssl version.

1. step is to generate private key and CSR, -des3 command is for password encryption, you will be asked for the password each time you will work with the %username%.key, e.g. exporting singned certificate to pkcs12 format or importing to users account or browser.

openssl> genrsa -des3 -%username%.key 2048 -aes-256-cbc

openssl> req -new -key %username%.key -out %username%.csr

while generating the CSR, you will be asked for various things, most important must match with reality:

Common Name (eg, YOUR name) []: full name

Email Address []: email@address

 

2.create v3.ext file which could contain following text (search google for more info):

authorityKeyIdentifier=keyid,issuer
basicConstraints=CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment

3.Now sign the CSR with your CA authority created in this article


openssl> x509 -req -days 1024 -in %username%.csr -extfile v3.ext -CA
rootCA.crt -CAkey rootCA.key
-CAcreateserial -out %username%.crt -setalias
"%Username%'s E-Mail Certificate" -addtrust emailProtection
-addreject clientAuth -addreject serverAuth -trustout

4.Now export the cert into pkcs12 form


openssl> pkcs12 -export -in %username%.crt -inkey %username%.key
 -out %username%.p12 -name "%username% pkcs12"

5.Now you can provide(secured way!) %username%.p12 file encrypted with password to the user, he can upload the p12 certificate in webclient into vcard -mydetails>certificates and options>accounts>private certificates for email signing and encryption. If you have enabled dual auth for webclient, you have to import the certificate into your browser --settings/certificates/your certificates import (depends on browser).

 

for more info about generating trusted certificates read following article

 

                                                                                                                o.vanek

Post-migration processes

$
0
0

First of all, before starting migration process it is needed to read the guide on our website (http://dl.icewarp.com/documentation/server/tools/IceWarp_Migrator_Guide.pdf) by this guide you could find all aspects of migration process.

In this KB article we will just cover some questions regarding the post migration steps, to restore target server.

First of all what you need to know, the target server is stopped. This is done in similar manner as the source server stop. Modules are not stopped, but services are disabled. Because it is necessary to have RCP working, web is disabled using API variable of c_mail_control_disableweb, but c_mail_control_active remains enabled. Thus, there is a green circle in the config services list showing, that web is running. However only RCP is available – no HTTP service. This can be confusing for an admin that does not finish the migration and ends with disabled server. Web has to be re-enabled via API, in this case open API console from File > API console (or just shortcut Shift + Ctrl + A). Type in filter c_mail_control_disableweb and change value from true to false, this will enable WebClient.

 

Second step is testing the availability of features in WebClient. Try to create meeting in Calendar, send and receive message, create new Task. Also try to upload and create files in Documents.

If you store data in MySQL, MS SQL, Oracle or another relational database management system, please make sure that all configurations in console for DB’s were correctly added at target server.

Groupware Migration from SQLite to MySQL/MS SQL

$
0
0

SQLite is file-based database engine. Each database is stored in one file. In SQLite there are no limitations for storing data into database. It could be saved the whole Iliad and Odyssey into one column.
There are more professional engines like MySQL, MS SQL etc... Here must be specified the length of the column and these engines are also checking the content.

Progress of migration is logged in to file “icewarp\calendar\calendar.log. All error messages could be found here.

There are two types of problems which could happen during migration from SQLite to MySQL/ MS SQL:

Error Data too long

Data saved in source SQLite database are longer then datatype which is used by MySQL/ MS SQL.

File calendar.xml is used during migration for creating a new database. That means the new databases will be created with increased new values of columns and data too long error should not appear again. Repeat this process until calendar.log shows no such errors.

example from calendar.log

18:59:51 Table TagLinks migration error: Error executing query: Data too long for column 'TGL_ID' at row 1

for column 'TGL_ID' at row 1 could be fixed by editing file calendar\calendar.xml.

Edit file IceWarp\calendar\calendar.xml and increase the value of mentioned column. Example of row: TGL_ID %%varchar%%(12) à TGL_ID %%varchar%%(24).

Migration should be tried again, if it gets the same error, this number should be increased two times. TGL_ID %%varchar%%(24) à TGL_ID %%varchar%%(48) etc.
For ItmCategory, ItmFirstName, ItmSuffix... and other columns must be read from error log too.

Incorrect string Value

SQLite does not check the content of data. You could save everything to one column. MySQL/MS SQL is checking the content type of each column. This problem occurs when you are trying to save something which does not fit the type of the column.

It is strongly recommend editing the source data to fit the mentioned data type in source database.

example from calendar.log

18:56:43 Table ContactItem migration error: Error executing query: Incorrect string value: '\xF0\x9F\x98\x9B\xF0\x9F...' for column 'ItmDescription' at row 1

In this case “\” character must be removed or leave whole column empty.


Слишком долгая сессия SMTP

$
0
0

Если у вас проблемы с SMTP сессиями, например они остаются активными слишком долго, тем самым используя много ресурсов вашего сервера, то вам необхомо выполнить данную инструкци.

Включите журналирование почтовой очереди с помощью командной строки

  • Linux: sh tool.sh modify system C_System_Log_MailQueue 1
  • Windows: tool.exe modify system C_System_Log_MailQueue 1

Файл дурналов вы можете найти в Icewarp\logs\queue\date.log. Таким образом вы можете найти первоначальную проблему, на каком этапе «подвисает» сессия. Файлжурналавыглядитпримернотак:

SYSTEM [165C] 11:36:48 Message JOO40048 127.0.0.1
SYSTEM [165C] 11:36:48 Size filters end [00]
SYSTEM [165C] 11:36:48 Antivirus begin
SYSTEM [165C] 11:36:51 Antivirus end [00]
SYSTEM [165C] 11:36:51 Antispam begin
SYSTEM [165C] 11:36:51 Antispam end
SYSTEM [165C] 11:36:51 Content filters begin
SYSTEM [165C] 11:36:51 Content filters end [00]
SYSTEM [165C] 11:36:51 Rules begin
SYSTEM [165C] 11:36:51 Rules end [00]
SYSTEM [165C] 11:36:51 Antispam finalization begin
SYSTEM [165C] 11:36:51 Antispam finalization end
SYSTEM [165C] 11:36:51 Delivery
SYSTEM [165C] 11:36:51 Done

После того, как вы обнаружите сесию, которая длится дольше обычного, скопируйте ID (например 165С в приведенном выше логе), и проверьте данную сессию в мониторе сессий (Статус > Сессии). Таким образом вы сможете обнаружить проблему.

Сервер ретрансляции(SMTP relay), DNS Lookup и SNMP маршрутизация ...

$
0
0

В настоящее время это, к сожалению, не редкость, что удаленные сервера могут отклонять письма от вас. Если просмотреть файлы журналов SMTP, то можно заметить, что сразу после того, как вы соеденитесь с удаленным сервером, ваше соединение закрывается, что говорит о том, что удаленный сервер блокирует ваш IP адрес. Иногда случается что IP адрес вашего сервера попадает в DNSBL (DomainNameSystemBlackList). Но и бывают случаи, когда блокируются письма из целой страны, на основе IP адресов.

В почтовом сервере IceWarp имеются две очень полезные настройки. Прежде всего хотим отметить, что для отправки почты IceWarp использует DNSlookup. Настройки вы можете найти в Почта > Основные настройки > вкладка Доставка

Таким образом, почтовой сервер IceWarp запросит DNS сервер. Указанный в настройках, MX запись удаленного сервера, чтобы соедениться на прямую и отправтиь письмо.

Если вам провайдер блокирует какие то определенные адреса, то вы можете воспользоватьс функционалом. доступным в Почта > Основные настройки > вкладка Маршрутизация, и изменить маршрут отправки письма на другой SMTP сервер, имеющий другой IP адрес.

Оптимальным способом настройки SMTP маршрутизации будетследующий способ: кликните на «Изменить», вы попадаете в файл настройки. В открывшемся окне вы можете видеть комментарии, с помощью кнопки «Comment» вы можете скрыть/отобразить справку. Данная справка включает в себя и примеры настроек.

На пример, если вы хотите отправить все письма предназначенные для @icewarp.com при помощи другого SMTP сервера (relay.isp.com) то синтаксис будет выглядить так:

icewarp.com=%%alias%%@icewarp.com;;relay.isp.com

Обратите внимание, чтобы почта отправлять через указанный вами сервер ретрансляции, как описано выше, необходимо добавить этот адрес в список доверенных IP адресов. Сделать это вы можете в Почта > Безопасность > Доверенные IP-адреса.

Альтернативный путь – воспользоваться SMTPAUTH, это может быть, на пример, любой аккаунт у вашего поставщика интернет услуг. Если требуется аутентификация, то синтаксис будет выглядить следующим образом:

icewarp.com=%%allias%%@icewarp.com;;user:pwd@relay.isp.com

Если требуется аутентефикация по полному адресу электронной почты то:

icewarp.com=%%allias%%@icewarp.com;;username@domain.com:password@relay.isp.com

После того, как внесете написанные выше изменения, не забудьте сохранить изменения и перезагрузить службу SMTP (Система > Службы / Сервисы), а также проверить фйлы журналов, чтобы убедиться в верности ретрансляции.

Другая опция доступная в почтовом сервере IceWarp, этопопытка отправить письма, которые не были доставлены, через другой SMTP сервер. Настроить данный функционал вы можете в Почта > Основные настройки > вкладка Доставка, не переключая выбора с «Опрос DNS» на «Релей сервер», введите адрес альтернативного SMTP сервера, на против «Релей сервер», после чего поставьте галочку на против «Доставлять сообщения через релей сервер при ошибке основного».

Это означает, что все письма, которые не были доставлены по средством основго сервера, будут отправлены по средством дополнительно, релей, сервера.

В данно поле можно указать как IP адрес, так и доменное имя. Если сервер требует авторизации, то необходимо заполнить поле следующим образом:

<username%domain.com>:<password>@<MyISPhostname>

На пример:

Joe%domain.com:password@relay.isp.com

Если синтаксис указанный выше не сработает, попробуйте заменить знак «%» на «@»

Проверьте журналы SMTP, чтобы понять как работает SMTP аутентификация, и как её расшифровывать. После произведенных изменений не забудьте сохранить изменения, и произвести перезагрузку службы SMTP и проверить файлы журналов.

Предотвращение вторжений

$
0
0

Предотвращение вторжения , это механизм, который призван защитить ваш сервер от СПАМа по и будет блокировать IP адрес атакующего. Как правило СПАМер имеется список адресов электронной почты, по которому и отправляется массовая рассылка СПАМа.

Например, если удаленный сервер отправляет почту на аккаунт несуществующего пользователя, после N попыток, IP адрес удаленного сервера будет заблокирован.

Ниже приведен пример настройки функции предотвращения вторжения. IP адрес в данном случае будет заблокирован на 30 минут, после 5 попыток отправки почты на несуществующий (неверный) адрес электронной почты.

Нажав кнопку F1, будучи во вкладке «Предотвращение вторжений», вы можете вызвать справку, и прочитать более детально о каждой настраеваемой функции.

Выставив максимальный размер сообщения в 100Мб, на пример, вы поставите ограничение по размеру сообщения, если размер будет превышать 100Мб, сервер заблокирует IP адрес отправителя на определенное вами время. Обратите внимание, сервер примет сообщение с любым размером, так как объем сообщения будет определен только после того, как оно будет полностью скачено, и только после этого оно будет удалено, а IP-дарес отправителя будет заблокирован.

Не забывайте, что большая часть настроек в IceWarp, включая предотвразение вторжения, имеют функцию Bypass (кнопка B), в данных списках вы можете указать IP-адреса, которые не будут блокироваться.

Базовые команды консольной программы TOOL.EXE

$
0
0

Краткий обзор

TOOL.EXE это приложение консольного типа, дающее прямой доступ к возможностям API. При помощи API вы можете настроить не только функционал доступный в панеле администрирования почтового сервера IceWarp, но так же получить инструмент для более детальной тонкой настройки почтового сервера IceWarp. Функционал доступный через TOOL.EXE более широк, и даёт возможность массовых настроек, или же изменения настроек, недоступных через консоль администрирования.

Где?

TOOL.EXE хранится в корневой папке Icewarp\tool.exe . Запустить её необходимо в интерпретаторе командной строки (cmd.exe)

Первая команда которую необходимо выполнить, чтобы ознакомится со всеми возможностями API – наберите в командой строке tool tutorial

Примеры использования

1)      Создание нового пользователя

tool create account toolusage@domain.com u_name "Tool Usage" u_password "toolpwd"

  • Новая учетная запись «toolusage» с паролем «toolpwd» будет создан в домене «domain.com»

 

2)      Изменения существующей учетной записи

tool modify account toolusage@domain.com u_password "changedpwd"

  • Пароль учетной записи «toolusage» будет сменен на «changepwd»

 

3)      Изменения существующей учетной записи

tool modify account *@domain.com u_comment "Modified account"

  • У всех существующих учетных записях в домене «domain.com» будет изменен комментарий на «Modifiedaccount»

 

4)      Удаление аккаунтов в указанном домене

tool delete account e*@domain.com

  • Данная команда удалит все учетные записи в домене «domain.com», начинающиеся с буквы «e»

 

5)      Импорт учетных записей из файла

tool import account importfile.txt u_name u_password

  • Данная команда импортирует все учетные записи, которые хранятся в файле «import.txt» в следующим виде:

tomas@domain.com, Tomas Zubov, tomaspwd

alexandra@domain.com, Alexandra Hlouskova, alexandrapwd

vagif@domain.com, Vagif Amirov, vagifpwd

Если импортируемый файл построен именно таким образом, то аккаунт tomas@domain.com будет создан с именем «Tomas Zubov» и паролем «tomaspwd» в домене «domain.com»

 

6)      Экспорт учетных записей из базы данных в файл с кодированием BASE64

tool export account *@domain.com u_backup > users-domain-com.csv

  • Экспорт всей информации и всех аккаунтов в домене «domain.com» в файл «users-domain-com.csv», который будет зашифрован в BASE64

 

TOOL.EXE и APIconst.pas

Наиболее важным файлом при работе с TOOL.EXE является apiconst.pas. Данный файл находится в корневой папке Icewarp\api\delphi\apiconst.pas. В данном файле хранятся все переменные для работы с API.

На пример, если вы хотите узнать куда установлен почтовый сервер IceWarp, то необходимо выполнить следующую команду displaysystemC_InstallPath, выполнив данную команду вы получите полный путь, куда был установлен почтовый сервер IceWarp

Как разрешить пользователем регистрировать себе аккаунты

$
0
0

Чтобы разрешить регистрацию пользователям необходимо войди в веб-клиент под аккаунтом администратора. Чтобы убидться является ли пользователь администратором или нет, откройте консоль администрирования почтового сервера IceWarp, и перейдите в Домены & Аккаунты > Управление > необходимый домен > необходимый пользователь > вкладка Свойства

Теперь войдите в веб-панель под администратором, нажмите на иконку в правом верхнем углу и выберите «Настройки администратора»

Далее перейдите на вкладку «Общие» и выберите в списке слева «Страница входа»

Теперь пользователи могут регистрироваться.

Как персанолизировать страницу входа в веб-клиент

$
0
0

Администратор обладает правами на изменение внешнего вида страницы входа в веб-клиент.

Войдите в веб-клиент под администратором, нажмите на иконку справа сверху и выберите «Настройки администратора»

Перейдите на вкладку «Общие» и выберите раздел слева «Страница входа». На данной странице вы можете изменить логотип на главной странице а также стиль входа в систему.

Как отобразить общие календари других пользователей в веб-клиенте

$
0
0

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

Кликните правой кнопкой мыши в любом месте веб-клиента и выберите в меню «Добавить общий аккаунт»

В открывшемся окне дважды кликните на пользователе, и выберите его, и далее нажмите «ОК»

Теперь календарь пользователя alex@icewarpdemo.com доступен и вам.


Как настроить несколько доменов

$
0
0

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

Чтобы сделать следующее:

  1. Войдите в веб-клиент под пользователем с правами администратора
  2. Кликните справа сверху на иконку и выберите «Настройки администратора»
  3. Перейдите на вкладку «Домены»
  4. Из списка выберите домены, настройки для которых вы хотели бы изменить
  5. Выберите нужный домен и нажмите «Изменить настройки домена»
  6. Перейдя на вкладку «Общие»
  7. Поменяйте необходимые настройки

 

 

Как настроить альтернативный авто-ответчик через Веб-Клиент

$
0
0

Почтовый сервер IceWarp позволяет настроить функция авто-ответчика. На первый взгляд функционал беден: статические сообщения, которые позволяют создать наипростешее письмо.Но! IceWarp даёт возможность использовать переменные, которые помогут вам настроить авто-ответчик с более гибкими возможностями.

Ниже приведены возможные переменные:

%%From%%

%%From_Email%%

%%From_Alias%%

%%From_Domain%%

%%From_Name%%

%%To%%

%%To_Name%%

%%To_Alias%%

%%To_Domain%%

%%Sender%%

%%Sender_Email%%

%%Sender_Alias%%

%%Sender_Domain%%

  %%Header HeaderItem%%  

%%Recipient%%

%%Recipient_Email%%

%%Recipient_Alias%%

  %%Recipient_Domain%%  

%%Subject%%

%%Message-ID%%

%%Date%%

%%Time%%

%%Header%%

%%Body%%

%%Body_HTML%%

%%Size%%

%%IP%%

%%RFC822_Date%%

Следующие переменные позволяют настроить заголовки сообщения:

$$SetSender Sender$$

  $$SetRecipient Recipient$$  

$$SetActualTo To$$

$$SetActualFrom From$$

$$SetSubject Subject$$

$$SetReplyTo ReplyTo$$

  $$SetMessageID MessageID$$  

$$SetHeader Header$$

 

  • Пример №1 (Простой Авто-ответчик)

Здравстуйте, я получил ваше письмо в %%Time%% часов %%Date%% числа

 

  • Пример №2 (Альтернативный Авто-ответчик)

$$SetSubject Message Subject: %%Subject%%$$

$$SetSender autoresponder@icewarpdemo.com$$

Здравствуйте %%From_Name%%,

Это письмо сгенерированно автоматически. Я отвечу вам как только смогу.

 

  • Пример №3 (Предупреждение о вирусе)

Внимание: был обнаружен вирус ‘%%VirusName%%’. Сообщение было откланено.

Заголовок сообщения: %%Header%%

MySQL - how to alter tables from MyISAM into InnoDB?

$
0
0

For MySQL and MariaDB databases, it is recommended to use the InnoDB engine (or XtraDb for MariaDB). It is NOT recommended to use the MyISAM engine.

InnoDB:

  • Row-level locking. Having a more fine grained locking-mechanism gives you higher concurrency compared to, for instance, MyISAM.
  • Support for transactions (giving you support for the ACID property)
  • Foreign key constraints. Allowing you to let the database ensure the integrity of the state of the database, and the relationships between tables.
  • InnoDB is more resistant to table corruption than MyISAM.
  • Support for large buffer pool for both data and indexes. MyISAM key buffer is only for indexes.
  • MyISAM is stagnant; all future enhancements will be in InnoDB

InnoDB Limitations:

  • No full text indexing (Below-5.6 mysql version)
  • Cannot be compressed for fast, read-only

The InnoDB storage engine in MySQL.

 

MyISAM:

  • Simpler to design and create, thus better for beginners. No worries about the foreign relationships between tables.
  • Faster than InnoDB on the whole as a result of the simpler structure thus much less costs of server resources.
  • Full-text indexing.
  • Especially good for read-intensive (select) tables.

MyISAM Limitations:

  • Table-level locking
  • No foreign keys and cascading deletes/updates
  • No transactional integrity (ACID compliance)
  • No rollback abilities
  • Row limit of 4,284,867,296 rows (232)
  • Maximum of 64 indexes per row

The MyISAM storage engine in MySQL.

 

Before alter tables is neccessary to dump databases!

# mysqldump -u root -p  accounts > accounts.sql

Using following SQL query you can check engine type, in this case Accounts database.

MySQL> show table status from accounts;

 Storage engine MyISAM

Now you can see all tables which have to be altered. You can achieve this goal by following SQL commands.

MySQL> ALTER TABLE accounts.aliases ENGINE=InnoDB;
MySQL> ALTER TABLE accounts.domains ENGINE=InnoDB;
MySQL> ALTER TABLE accounts.metadata ENGINE=InnoDB;
MySQL> ALTER TABLE accounts.useraccess engine=InnoDB;
MySQL> ALTER TABLE accounts.users ENGINE=InnoDB;

All tables are now using InnoDB storage engine. You can check it by following SQL query.

MySQL> show table status from accounts;

 Storage engine InnoDB

In case of needed you can change storage engine to InnoDB on other databases such as groupware, anti-spam, directory cache, active sync, webclient cache. Procedure is very similar as on example above.

How to migrate from Zimbra to ICeWarp

$
0
0

While migrating from Zimbra emails can be migrated via icewarp integrated migrator or any imap based migrator, the only problems are events and contacts, therefore its required to export all users ics(contacts) and vcf(events) and convert into directory structure with folders named according to their username and domain into a root folder as e.g.:

 

import/

     domain1/user1 -ics
                           -vcf
                 /user2 -ics
                           -vcf
     domain2/user1 -ics
                           -vcf

 

This can be imported into root folder in Zimbra or in target IceWarp server. Once this will be done icewarp support team will provide you script for import the exported data into icewarp groupware. The script is alwaus executed on target server.

Before the migration, please conntact support.eu@icewarp.com and tell them in which operating system did you exported the vcf ics files into directory structure and what is your required target operating system where your new IceWarp server will run.

auto-subscribe/unsubscribe from mailing lists

$
0
0

In case you are using lot mailing lists with expected frequent change of subscribers amount, following scenario might be helpfull for you. Its written for separate mysql database called e.g. mailing_lists with two tables, first table ml_addr is for storing mail acounts with auto-incremented ID as primary key and type 1 (for mailing list) and default null for members, unique index is set for column 'email', second table ml_lst is the "tying table" where are two columns lst_id for id of mailing list and mb_id for id of subscribers, unique index are set for combination (lst_id, mb_id) because users can be subscribed in more than 1 mailing lists.

 

Whole process is rule based, therefore you can specify in which case you want to add or remove users in/from mailing list subscription.

 

Database creation part

 

mysql>create database mailing_lists collate utf8_general_ci;

 

1.table:

mysql>create table ml_addr ( id int(11) not null auto_increment, a_type int(1) default null, email varchar (255) not null unique, primary key (id));

 

 

2.table:

mysql>create table ml_lst ( lst_id int(11), mb_id int(11), unique key (lst_id, mb_id));

 

Now you need to insert manually mailing lists addresses into database, for mutiple insertion search google how to insert from bulk file:

 

mysql>insert into ml_addr (a_type, email) values ( '1', 'mailinglist@yourdomain.net');

 

In this case as this was first record in ml_addr table its id is 1, so in console>domain>Mailing Lists>mailinglist

-select members from database

-set DB settings to connect to the created mamiling_lists database

-sql statement, I would suggest to fill there full path to txt file with following sql statement:

select ml_addr.email from ml_addr join ml_lst on ml_addr.id = ml_lst.mb_id where ml_lst.lst_id='%id of your mailing list%'

 

to show id of mailing lists simply execute: select * from ml_addr where a_type='1';

 

Content filter part:

 

subscribe member:

to auto insert account as specific mailing list create 2 rules to match:

where To: message header matches: mailinglist1@domain.net;mailinglist2@domain.org...

and where subject matches: subscribe

action:

Exectute sql statement:

insert into ml_addr (email) values ('%%Sender_Email%%');

 

create second rule with same condition as first rule with action:

Execute sql statement:

insert into ml_lst (lst_id, mb_id) select s1.id as mlid, s2.id as uid from ml_addr s1 cross join ml_addr s2 where s1.id <> s2.id and s1.email='%%Recipient_Email%%' and s2.email='%%Sender_Email%%';

-two rules are required because we can execute only one sql statement in one rule or you can use these sql statements in a script made for insertion into mysql from a bulk file: %%sender_email%% is account you want to add as a member of a mailinglist (%%recipient_email%%)

 

unsubscribe member:

create rule:

Where To: message header matches mailinglist@domain.net

 AND Where Subject: message header matches unsubscribe

actions:

Exectute sql statement:

delete from ml_lst where lst_id in (select id from ml_addr where email='%%Recipient_Email%%') and mb_id in (select id from ml_addr where email='%%Sender_Email%%');

and delete message

and stop processing more rules

 

final step is to add html footer to mailing list in mailing lists>message tab

here is an example of html footer with "mail to" function:

 

<i>
<br><a href="mailto:mailinglist@domain.net?subject=unsubscribe">unsubscribe</a>
</i>

for subscription change "unsubscribe" to "subscribe" to be triggered by the rule created for subscription, you can have both links in footer of each message.

 

To clean up the database from emails whitch are no longer used create a windows task or cron job to execute:

delete from ml_addr where id not in (select lst_id from ml_lst) and id not in (select mb_id from ml_lst);

!be aware, this will delete every record from table ml_addr which ID is not used in ml_lst table, so in case you would have there stored email of mailing list without members, it will be erased also.

 

o.vanek

 

 

 

Viewing all 83 articles
Browse latest View live