Обсуждение статьи Exim&Dovecot + fetchmail

EXIM, sendmail, postfix, Dovecot и прочие. Решение проблем связанных с работой электронной почты

Модератор: xM

Правила форума
Убедительная просьба юзать теги [code] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
Аватара пользователя
Cancer
Гл. Кастратор
Сообщения: 1269
Зарегистрирован: 2008-03-25 12:21:36
Откуда: г. Ростов-на-Дону
Контактная информация:

Re: Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение Cancer » 2009-07-16 12:42:17

Archy писал(а):Еще один вопросик, ты мускул с какой кодировкой собирал? Я с cp1251, может в этом проблемка?
А в чем собственно проблема????
я же написал решение,.....А ставил мусю я стандартом utf8

Хостинговая компания Host-Food.ru
Хостинг HostFood.ru
 

Услуги хостинговой компании Host-Food.ru

Хостинг HostFood.ru

Тарифы на хостинг в России, от 12 рублей: https://www.host-food.ru/tariffs/hosting/
Тарифы на виртуальные сервера (VPS/VDS/KVM) в РФ, от 189 руб.: https://www.host-food.ru/tariffs/virtualny-server-vps/
Выделенные сервера, Россия, Москва, от 2000 рублей (HP Proliant G5, Intel Xeon E5430 (2.66GHz, Quad-Core, 12Mb), 8Gb RAM, 2x300Gb SAS HDD, P400i, 512Mb, BBU):
https://www.host-food.ru/tariffs/vydelennyi-server-ds/
Недорогие домены в популярных зонах: https://www.host-food.ru/domains/

Archy
рядовой
Сообщения: 21
Зарегистрирован: 2008-03-15 12:26:48

Re: Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение Archy » 2009-07-16 13:42:52

Все получилось, большое спасибо! :drinks:

Аватара пользователя
melkiy985
проходил мимо
Сообщения: 1
Зарегистрирован: 2009-10-09 10:31:35
Откуда: Иркутск
Контактная информация:

Re: Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение melkiy985 » 2009-10-09 10:37:31

Помогите плиз собрал связку по статье http://www.lissyara.su/?id=1728
И после установки RoundCube его запускаю выходит окно введите имя пользователя и пароль,
не могу понять где его создать. в PostfixAdmine ущик сделал а база roundcubemail там все таблицы пустые.
В чем причина подскажите.
Заранее спасибо!

Аватара пользователя
Cancer
Гл. Кастратор
Сообщения: 1269
Зарегистрирован: 2008-03-25 12:21:36
Откуда: г. Ростов-на-Дону
Контактная информация:

Re: Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение Cancer » 2009-10-20 6:05:51

melkiy985 писал(а):Помогите плиз собрал связку по статье http://www.lissyara.su/?id=1728
И после установки RoundCube его запускаю выходит окно введите имя пользователя и пароль,
не могу понять где его создать. в PostfixAdmine ущик сделал а база roundcubemail там все таблицы пустые.
В чем причина подскажите.
Заранее спасибо!

Решил ??? напиши что сделал !

zyurik
проходил мимо
Сообщения: 1
Зарегистрирован: 2009-11-24 11:33:56

Re: Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение zyurik » 2009-11-24 11:52:08

Добрый день!Вопрос по rouncube. Все установилось почта уходит приходит, но есть одна ошибка, при входе на сервер, выборе папки или обновлении, выдает ошибку на верху: на красном квадрате Ошибка Сервера (Х). Что может быть, в логах ничего нету. единственно apach2/acces.log пишет: 94.246.126.114 - - [24/Nov/2009:11:46:21 +0300] "GET /webmail/?_task=mail&_action=check-recent&_t=1259052380992&_list=1&_remote=1&_=1259052380992&_unlock=1 HTTP/1.1" 404 352 "http://zubihin.no-ip.biz/webmail/?_task ... mbox=INBOX" "Opera/9.80 (X11; Linux i686; U; ru) Presto/2.2.15 Version/10.01"

При работе через localhost/webmail все замечательно, каталоги обновляются, но через zubihin.no-ip.biz/webmail/
Помогите весь интернет перерыл, но не смог найти что-то подобное .


УРА!!! Сам нашел, хост завиртуалил и все заработало.
Вложения
Снимок.png
Так это выглядит

Иван
проходил мимо

Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение Иван » 2009-12-19 12:28:26

Вопрос по Roundcube
Roundcube не работает.
вот такая ошибка дает:

SERVICE CURRENTLY NOT AVAILABLE!Error No. [500], Roundcube

как решать эту проблему?.

Аватара пользователя
Cancer
Гл. Кастратор
Сообщения: 1269
Зарегистрирован: 2008-03-25 12:21:36
Откуда: г. Ростов-на-Дону
Контактная информация:

Re: Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение Cancer » 2009-12-19 12:34:05

Конфиг куба и довекота в студию!

Иван
проходил мимо

Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение Иван » 2009-12-19 23:57:22

Спосиба огромное, но нашел ошибку , проблема была в таблицы,

Но появился другая ошибка, и не могу решать,

открывается интерфеиса Roundcube, ставлю логин и пароль (тот которого ставил как администратора у PostfixAdmin,) и дает вот такая ошибка: "connection to IMAP server failed",

в логах у куба написано: IMAP Error: Could not connect to ssl://pop.pronoi.md at port 9143: php_network_getaddresses: getaddrinfo failed: hostname

???

Аватара пользователя
Mag
проходил мимо
Сообщения: 1
Зарегистрирован: 2009-12-20 15:56:15
Контактная информация:

Re: Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение Mag » 2009-12-22 13:23:50

Здраствуите,
ставил я почтовик по этои сылке http://www.lissyara.su/articles/freebsd ... smtp_relay

но вот такакя ошибка: не могу создать ящики в Postfixadmin, написано "Invalid domain name selected, or you tried to select a domain you are not an admin for" ,

вот сам конфиг - config.inc.php:

Код: Выделить всё

_____________________________________________________
<?php
/**
 * Postfix Admin
 *
 * LICENSE
 * This source file is subject to the GPL license that is bundled with
 * this package in the file LICENSE.TXT.
 *
 * Further details on the project are available at :
 *     http://www.postfixadmin.com or http://postfixadmin.sf.net
 *
 * @version $Id: config.inc.php 736 2009-10-24 00:11:09Z christian_boltz $
 * @license GNU GPL v2 or later.
 *
 * File: config.inc.php
 * Contains configuration options.
 */

if (ereg ("config.inc.php", $_SERVER['PHP_SELF']))
{
   header ("Location: login.php");
   exit;
}

/*****************************************************************
 *  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 * You have to set $CONF['configured'] = true; before the
 * application will run!
 * Doing this implies you have changed this file as required.
 * i.e. configuring database etc; specifying setup.php password etc.
 */
$CONF['configured'] = true;

// In order to setup Postfixadmin, you MUST specify a hashed password here.
// To create the hash, visit setup.php in a browser and type a password into the field,
// on submission it will be echoed out to you as a hashed value.
$CONF['setup_password'] = 'f66f913b6d4fa255ad2e73b4ba38d1d9:a18f4254c6f42d111dc6041a9ba578a963ad6c05';

// Postfix Admin Path
// Set the location of your Postfix Admin installation here.
// YOU MUST ENTER THE COMPLETE URL e.g. http://domain.tld/postfixadmin
$CONF['postfix_admin_url'] = 'http://mail.pronoi.md/postfixadmin/';

// shouldn't need changing.
$CONF['postfix_admin_path'] = '/usr/local/www/postfixadmin/';

// Language config
// Language files are located in './languages', change as required..
$CONF['default_language'] = 'en';


// Database Config
// mysql = MySQL 3.23 and 4.0, 4.1 or 5
// mysqli = MySQL 4.1+
// pgsql = PostgreSQL
$CONF['database_type'] = 'mysqli';
$CONF['database_host'] = 'localhost';
$CONF['database_user'] = 'exim';
$CONF['database_password'] = 'exim';
$CONF['database_name'] = 'exim';
$CONF['database_prefix'] = '';

// If you need to specify a different port for a MYSQL database connection, use e.g.
//   $CONF['database_host'] = '172.30.33.66:3308';
// If you need to specify a different port for POSTGRESQL database connection
//   uncomment and change the following
// $CONF['database_port'] = '5432';


// Here, if you need, you can customize table names.
$CONF['database_prefix'] = '';
$CONF['database_tables'] = array (
    'admin' => 'admin',
    'alias' => 'alias',
    'alias_domain' => 'alias_domain',
    'config' => 'config',
    'domain' => 'domain',
    'domain_admins' => 'domain_admins',
    'fetchmail' => 'fetchmail',
    'log' => 'log',
    'mailbox' => 'mailbox',
    'vacation' => 'vacation',
    'vacation_notification' => 'vacation_notification',
);

// Site Admin
// Define the Site Admins email address below.
// This will be used to send emails from to create mailboxes.
$CONF['admin_email'] = 'postmaster@pronoi.md';

// Mail Server
// Hostname (FQDN) of your mail server.
// This is used to send email to Postfix in order to create mailboxes.
$CONF['smtp_server'] = 'localhost';
$CONF['smtp_port'] = '25';

// Encrypt
// In what way do you want the passwords to be crypted?
// md5crypt = internal postfix admin md5
// md5 = md5 sum of the password
// system = whatever you have set as your PHP system default

// cleartext = clear text passwords (ouch!)
// mysql_encrypt = useful for PAM integration
// authlib = support for courier-authlib style passwords
// dovecot:CRYPT-METHOD = use dovecotpw -s 'CRYPT-METHOD'. Example: dovecot:CRAM-MD5
$CONF['encrypt'] = 'cleartext';

// In what flavor should courier-authlib style passwords be enrypted?
// md5 = {md5} + base64 encoded md5 hash
// md5raw = {md5raw} + plain encoded md5 hash
// SHA = {SHA} + base64-encoded sha1 hash
// crypt = {crypt} + Standard UNIX DES-enrypted with 2-character salt
// $CONF['authlib_default_flavor'] = 'md5raw';

// If you use the dovecot encryption method: where is the dovecotpw binary located?
// $CONF['dovecotpw'] = "/usr/sbin/dovecotpw";

// Minimum length required for passwords. Postfixadmin will not
// allow users to set passwords which are shorter than this value.
$CONF['min_password_length'] = 5;

// Generate Password
// Generate a random password for a mailbox or admin and display it.
// If you want to automagically generate paswords set this to 'YES'.
$CONF['generate_password'] = 'NO';

// Show Password
// Always show password after adding a mailbox or admin.
// If you want to always see what password was set set this to 'YES'.
$CONF['show_password'] = 'NO';

// Page Size
// Set the number of entries that you would like to see
// in one page.
$CONF['page_size'] = '25';

// Default Aliases
// The default aliases that need to be created for all domains.
$CONF['default_aliases'] = array (
    'abuse' => 'abuse@pronoi.md',
    'hostmaster' => 'hostmaster@pronoi.md',
    'postmaster' => 'postmaster@pronoi.md',
    'webmaster' => 'webmaster@pronoi.md'
);

// Mailboxes
// If you want to store the mailboxes per domain set this to 'YES'.
// Examples:
//   YES: /usr/local/virtual/domain.tld/username@domain.tld
//   NO:  /usr/local/virtual/username@domain.tld
$CONF['domain_path'] = 'YES';
// If you don't want to have the domain in your mailbox set this to 'NO'.
// Examples:
//   YES: /usr/local/virtual/domain.tld/username@domain.tld
//   NO:  /usr/local/virtual/domain.tld/username
// Note: If $CONF['domain_path'] is set to NO, this setting will be forced to YES.
$CONF['domain_in_mailbox'] = 'NO';

// Default Domain Values
// Specify your default values below. Quota in MB.
$CONF['aliases'] = '0';
$CONF['mailboxes'] = '0';
$CONF['maxquota'] = '0';

// Quota
// When you want to enforce quota for your mailbox users set this to 'YES'.
$CONF['quota'] = 'YES';
// You can either use '1024000' or '1048576'
$CONF['quota_multiplier'] = '1024000';

// Transport
// If you want to define additional transport options for a domain set this to 'YES'.
// Read the transport file of the Postfix documentation.
$CONF['transport'] = 'NO';
// Transport options
// If you want to define additional transport options put them in array below.
$CONF['transport_options'] = array (
    'virtual',  // for virtual accounts
    'local',    // for system accounts
    'relay'     // for backup mx
);
// Transport default
// You should define default transport. It must be in array above.
$CONF['transport_default'] = 'virtual';

// Virtual Vacation
// If you want to use virtual vacation for you mailbox users set this to 'YES'.
// NOTE: Make sure that you install the vacation module. (See VIRTUAL-VACATION/)
$CONF['vacation'] = 'NO';
// This is the autoreply domain that you will need to set in your Postfix
// transport maps to handle virtual vacations. It does not need to be a
// real domain (i.e. you don't need to setup DNS for it).
$CONF['vacation_domain'] = 'autoreply.pronoi.md';

// Vacation Control
// If you want users to take control of vacation set this to 'YES'.
$CONF['vacation_control'] ='YES';

// Vacation Control for admins
// Set to 'YES' if your domain admins should be able to edit user vacation.
$CONF['vacation_control_admin'] = 'YES';
// Alias Control
// Postfix Admin inserts an alias in the alias table for every mailbox it creates.
// The reason for this is that when you want catch-all and normal mailboxes
// to work you need to have the mailbox replicated in the alias table.
// If you want to take control of these aliases as well set this to 'YES'.
$CONF['alias_control'] = 'YES';

// Alias Control for admins
// Set to 'NO' if your domain admins shouldn't be able to edit user aliases.
$CONF['alias_control_admin'] = 'YES';

// Special Alias Control
// Set to 'NO' if your domain admins shouldn't be able to edit default aliases.
$CONF['special_alias_control'] = 'YES';

// Alias Goto Field Limit
// Set the max number of entries that you would like to see
// in one 'goto' field in overview, the rest will be hidden and "[and X more...]" will be added.
// '0' means no limits.
$CONF['alias_goto_limit'] = '0';

// Alias Domains
// Alias domains allow to "mirror" aliases and mailboxes to another domain. This makes
// configuration easier if you need the same set of aliases on multiple domains, but
// also requires postfix to do more database queries.
// Note: If you update from 2.2.x or earlier, you will have to update your postfix configuration.
// Set to 'NO' to disable alias domains.
// $CONF['alias_domain'] = 'YES';

// Backup
// If you don't want backup tab set this to 'NO';
$CONF['backup'] = 'YES';

// Send Mail
// If you don't want sendmail tab set this to 'NO';
$CONF['sendmail'] = 'YES';

// Logging
// If you don't want logging set this to 'NO';
$CONF['logging'] = 'YES';

// Fetchmail
// If you don't want fetchmail tab set this to 'NO';
$CONF['fetchmail'] = 'YES';

// fetchmail_extra_options allows users to specify any fetchmail options and any MDA
// (it will even accept 'rm -rf /' as MDA!)
// This should be set to NO, except if you *really* trust *all* your users.
$CONF['fetchmail_extra_options'] = 'NO';
// Header
$CONF['show_header_text'] = 'NO';
$CONF['header_text'] = ':: Postfix Admin ::';

// link to display under 'Main' menu when logged in as a user.
$CONF['user_footer_link'] = "http://mail.pronoi.md/postfixadmin";

// Footer
// Below information will be on all pages.
// If you don't want the footer information to appear set this to 'NO'.
$CONF['show_footer_text'] = 'YES';
$CONF['footer_text'] = 'Return to change-this-to-your.domain.tld';
$CONF['footer_link'] = 'http://mail.pronoi.md/postfixadmin';

// Welcome Message
// This message is send to every newly created mailbox.
// Change the text between EOM.
$CONF['welcome_text'] = <<<EOM
Hi,

Welcome to your new account. Enjoy our mailbox in company PRO NOI.
EOM;

// When creating mailboxes or aliases, check that the domain-part of the
// address is legal by performing a name server look-up.
$CONF['emailcheck_resolve_domain']='NO';


// Optional:
// Analyze alias gotos and display a colored block in the first column
// indicating if an alias or mailbox appears to deliver to a non-existent
// account.  Also, display indications, for POP/IMAP mailboxes and
// for custom destinations (such as mailboxes that forward to a UNIX shell
// account or mail that is sent to a MS exchange server, or any other
// domain or subdomain you use)
// See http://www.w3schools.com/html/html_colornames.asp for a list of
// color names available on most browsers

//set to YES to enable this feature
$CONF['show_status']='NO';
//display a guide to what these colors mean
$CONF['show_status_key']='NO';
// 'show_status_text' will be displayed with the background colors
// associated with each status, you can customize it here
$CONF['show_status_text']='&nbsp;&nbsp;';
// show_undeliverable is useful if most accounts are delivered to this
// postfix system.  If many aliases and mailboxes are forwarded
// elsewhere, you will probably want to disable this.
$CONF['show_undeliverable']='NO';
$CONF['show_undeliverable_color']='tomato';
// mails to these domains will never be flagged as undeliverable
$CONF['show_undeliverable_exceptions']=array("unixmail.domain.ext","exchangeserver.domain.ext","gmail.com");
$CONF['show_popimap']='NO';
$CONF['show_popimap_color']='darkgrey';
// you can assign special colors to some domains. To do this,
// - add the domain to show_custom_domains
// - add the corresponding color to show_custom_colors
$CONF['show_custom_count']=2;
$CONF['show_custom_domains']=array("subdomain.domain.ext","domain2.ext");
$CONF['show_custom_colors']=array("lightgreen","lightblue");
// If you use a recipient_delimiter in your postfix config, you can also honor it when aliases are checked.
// Example: $CONF['recipient_delimiter'] = "+";
// Set to "" to disable this check.
// $CONF['recipient_delimiter'] = "";


// Optional:
// Script to run after creation of mailboxes.
// Note that this may fail if PHP is run in "safe mode", or if
// operating system features (such as SELinux) or limitations
// prevent the web-server from executing external scripts.
// $CONF['mailbox_postcreation_script']='sudo -u courier /usr/local/bin/postfixadmin-mailbox-postcreation.sh';

// Optional:
// Script to run after alteration of mailboxes.
// Note that this may fail if PHP is run in "safe mode", or if
// operating system features (such as SELinux) or limitations
// prevent the web-server from executing external scripts.
// $CONF['mailbox_postedit_script']='sudo -u courier /usr/local/bin/postfixadmin-mailbox-postedit.sh';

// Optional:
// Script to run after deletion of mailboxes.
// Note that this may fail if PHP is run in "safe mode", or if
// operating system features (such as SELinux) or limitations
// prevent the web-server from executing external scripts.
// $CONF['mailbox_postdeletion_script']='sudo -u courier /usr/local/bin/postfixadmin-mailbox-postdeletion.sh';

// Optional:
// Script to run after creation of domains.
// Note that this may fail if PHP is run in "safe mode", or if
// operating system features (such as SELinux) or limitations
// prevent the web-server from executing external scripts.
// $CONF['domain_postcreation_script']='sudo -u courier /usr/local/bin/postfixadmin-domain-postcreation.sh';

// Optional:
// Script to run after deletion of domains.
// Note that this may fail if PHP is run in "safe mode", or if
// operating system features (such as SELinux) or limitations
// prevent the web-server from executing external scripts.

// $CONF['domain_postdeletion_script']='sudo -u courier /usr/local/bin/postfixadmin-domain-postdeletion.sh';

// Optional:
// Sub-folders which should automatically be created for new users.
// The sub-folders will also be subscribed to automatically.
// Will only work with IMAP server which implement sub-folders.
// Will not work with POP3.
// If you define create_mailbox_subdirs, then the
// create_mailbox_subdirs_host must also be defined.
//
// $CONF['create_mailbox_subdirs']=array('Spam');
// $CONF['create_mailbox_subdirs_host']='localhost';
//
// Specify '' for Dovecot and 'INBOX.' for Courier.
// $CONF['create_mailbox_subdirs_prefix']='INBOX.';

// Optional:
// Show used quotas from Dovecot dictionary backend in virtual
// mailbox listing.
// See: DOCUMENTATION/DOVECOT.txt
//      http://wiki.dovecot.org/Quota/Dict
//
// $CONF['used_quotas'] = 'NO';

// if you use dovecot >= 1.2, set this to yes.
// Note about dovecot config: table "quota" is for 1.0 & 1.1, table "quota2" is for dovecot 1.2 and newer
// $CONF['new_quota_table'] = 'NO';

//
// Normally, the TCP port number does not have to be specified.
// $CONF['create_mailbox_subdirs_hostport']=143;
//
// If you have trouble connecting to the IMAP-server, then specify
// a value for $CONF['create_mailbox_subdirs_hostoptions']. These
// are some examples to experiment with:
// $CONF['create_mailbox_subdirs_hostoptions']=array('notls');
// $CONF['create_mailbox_subdirs_hostoptions']=array('novalidate-cert','norsh');
// See also the "Optional flags for names" table at
// http://www.php.net/manual/en/function.imap-open.php


// Theme Config
// Specify your own logo and CSS file
$CONF['theme_logo'] = 'images/logo-default.png';
$CONF['theme_css'] = 'css/default.css';

// XMLRPC Interface.
// This should be only of use if you wish to use e.g the
// Postfixadmin-Squirrelmail package
//  change// $CONF['xmlrpc_enabled'] = false;


// If you want to keep most settings at default values and/or want to ensure
// that future updates work without problems, you can use a separate config
// file (config.local.php) instead of editing this file and override some
// settings there.
if (file_exists(dirname(__FILE__) . '/config.local.php')) {
    include(dirname(__FILE__) . '/config.local.php');
}

//
// END OF CONFIG FILE
//
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */
 to boolean true to enable xmlrpc
________________________________________________________________________________________

beeline
проходил мимо
Сообщения: 1
Зарегистрирован: 2010-02-03 17:56:10

Re: Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение beeline » 2010-02-03 19:58:37

Здравствуйте.
Настроил почтовик по статье http://www.lissyara.su/?id=1728, есть проблема с доменами, dovecot не подхватывает домены, только если явно по дефолту в dovecot.conf указать:

Код: Выделить всё

auth_default_realm = mydomain.com
все, как в статье, самодеятельность всю убрал, кто-нибудь встречался с такой проблемой?

Аватара пользователя
server801
ст. лейтенант
Сообщения: 1421
Зарегистрирован: 2008-09-27 21:15:16
Откуда: Саратов
Контактная информация:

Re: Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение server801 » 2010-02-03 19:59:59

есть проблема,делал все по статье

Код: Выделить всё

Feb  3 19:55:00 alpha exim[1512]: 1NciVI-0000ON-TI failed to expand "${lookup mysql{SELECT `domain` FROM `domain` WHERE `domain`='${domain}' AND `active`='1'}}" while checking a list: lookup of "SELECT `domain` FROM `domain` WHERE `domain`='mail.******.ru' AND `active`='1'" gave DEFER: MYSQL connection failed: Доступ закрыт для пользователя 'exim'@'localhost' (был использован пароль: ДА)
Feb  3 19:55:00 alpha exim[1512]: 1NciVI-0000ON-TI failed to expand "${lookup mysql{SELECT `domain` FROM `domain` WHERE `domain`='${domain}' AND `active`='1'}}" while checking a list: lookup of "SELECT `domain` FROM `domain` WHERE `domain`='mail.*****.ru' AND `active`='1'" gave DEFER: MYSQL connection failed: Доступ закрыт для пользователя 'exim'@'localhost' (был использован пароль: ДА)
куда копать?
configure

Код: Выделить всё

primary_hostname = mail.staynet.ru
hide mysql_servers = localhost/exim/exim/exim

domainlist local_domains = ${lookup mysql{SELECT `domain` \
                            FROM `domain` WHERE \
                            `domain`='${domain}' AND \
                            `active`='1'}}

domainlist relay_to_domains = ${lookup mysql{SELECT `domain` \
                            FROM `domain` WHERE \
                            `domain`='${domain}' AND \
                            `active`='1'}}

hostlist   relay_from_hosts = localhost:127.0.0.0/8
acl_smtp_rcpt = acl_check_rcpt
acl_smtp_data = acl_check_data
#av_scanner = clamd:/var/run/clamav/clamd
#av_scanner = clamd:/usr/sbin/clamd
#spamd_address = 127.0.0.1 783
qualify_domain = mail.staynet.ru
qualify_recipient = mail.staynet.ru
allow_domain_literals = false
exim_user = mailnull
exim_group = mail
never_users = root
rfc1413_query_timeout = 0s
ignore_bounce_errors_after = 45m
timeout_frozen_after = 7d
freeze_tell = admin@mail.staynet.ru
helo_accept_junk_hosts = 192.168.0.0/24
auto_thaw = 1h
smtp_banner = "$primary_hostname, ESMTP EXIM $version_number"
smtp_accept_max = 180
smtp_accept_max_per_connection = 25
smtp_connect_backlog = 30
smtp_accept_max_per_host = 20
split_spool_directory = true
remote_max_parallel = 15
return_size_limit = 70k
message_size_limit = 15M
helo_allow_chars = _
smtp_enforce_sync = true

log_selector = \
    +all_parents \
    +connection_reject \
    +incoming_interface \
    +lost_incoming_connection \
    +received_sender \
    +received_recipients \
    +smtp_confirmation \
    +smtp_syntax_error \
    +smtp_protocol_error \
    -queue_run
syslog_timestamp = no
#system_filter = /usr/local/etc/exim/copy_mail.conf

#########################################################
begin acl
#########################################################
acl_check_rcpt:

accept  hosts = :
deny    message       = "Not permit simbols in address"
        domains       = +local_domains
        local_parts   = ^[.] : ^.*[@%!/|]

deny    message       = "Not permit simbols in address"
        domains       = !+local_domains
        local_parts   = ^[./|] : ^.*[@%!] : ^.*/\\.\\./

#  accept  local_parts   = postmaster
#          domains       = +local_domains

#require verify        = sender

deny    message       = "HELO/EHLO must be SMTP RFC"
        condition     = ${if eq{$sender_helo_name}{}{yes}{no}}

accept  authenticated = *

deny    message       = "Dont use your IP as HELO!"
        hosts         =  *:!+relay_from_hosts
        condition     = ${if eq{$sender_helo_name}\
                         {$sender_host_address}{true}{false}}

deny    condition     = ${if eq{$sender_helo_name}\
                          {$interface_address}{yes}{no}}
        hosts         = !127.0.0.1 : !localhost : *
        message       = "Its my IP-address! Go away!"

deny    condition     = ${if match{$sender_helo_name}\
                          {\N^\d+$\N}{yes}{no}}
        hosts         = !127.0.0.1:!localhost:*
        message       = "HELO dont have only digits!"

deny    message       = "Dont like your host ..."
        condition     = ${if match{$sender_host_name} \
                               {adsl|dialup|pool|peer|dhcp} \
                               {yes}{no}}

deny    message       = "host in blacklist - $dnslist_domain \n $dnslist_text"
        dnslists      =   opm.blitzed.org : \
                          proxies.blackholes.easynet.nl : \
                          cbl.abuseat.org : \
                          bl.spamcop.net : \
                          bl.csma.biz : \
                          dynablock.njabl.org

#warn
#        set acl_m0 = 20s
#warn
#        hosts = +relay_from_hosts : 193.232.248.0/24
#        set acl_m0 = 0s
#warn
#        logwrite = Delay $acl_m0 for $sender_host_name \
#       [$sender_host_address] with HELO=$sender_helo_name. Mail \
#       from $sender_address to $local_part.
#        delay = $acl_m0

accept  domains       = +local_domains
        endpass
        message       = "Dont have user in this domain"
        verify        = recipient

accept  domains       = +relay_to_domains
        endpass
        message       = "I dont know route to this host..."
        verify        = recipient

accept  hosts         = +relay_from_hosts
deny    message       = "My server is not an open relay"

#####################################################################
acl_check_data:

deny message = "this is spam - denied"
   condition = ${if match{$message_body} \
              {105[-_]*51[-_]*86|778[-_]*98[-_]*94} \
              {yes}{no}}

#deny malware = *                                       # UNCOMMENT THESE LINES WHEN INSTALL AV
#  message = "In e-mail found VIRUS - $malware_name"

accept
#######################################################################
begin routers

dnslookup:
  driver = dnslookup
  domains = ! +local_domains
  transport = remote_smtp
  ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
  no_more

system_aliases:
    driver      = redirect
    allow_fail
    allow_defer
    data = ${lookup mysql{SELECT `goto` FROM `alias` WHERE \
           `address`='${quote_mysql:$local_part@$domain}' OR \
           `address`='${quote_mysql:@$domain}'}}

mysqluser:
  driver = accept
  condition = ${if eq{}{${lookup mysql{SELECT `maildir` FROM `mailbox` \
              WHERE `username`='$local_part'}}}{no}{yes}}
  transport = mysql_delivery

#############################################################################
begin transports

remote_smtp:
    driver = smtp

mysql_delivery:
    driver = appendfile
    check_string = ""
    create_directory
    delivery_date_add
    directory = ${lookup mysql{SELECT CONCAT('/var/mail/exim/', `maildir`) \
                FROM `mailbox` WHERE `username`='${local_part}'}}
    directory_mode = 770
    envelope_to_add
    group = mail
    maildir_format
    maildir_tag = ,S=$message_size
    message_prefix = ""
    message_suffix = ""
    mode = 0600

address_file:
    driver = appendfile
    delivery_date_add
    envelope_to_add
    return_path_add

address_pipe:
  driver = pipe
  return_output

address_reply:
  driver = autoreply
#####################################################################
begin retry

*                    *       F,2h,15m; G,16h,1h,1.5; F,4d,6h
#####################################################################
begin rewrite
#####################################################################
begin authenticators


auth_plain:
  driver = plaintext
  public_name = PLAIN
  server_condition = ${lookup mysql{SELECT `username` FROM \
                     `mailbox` WHERE `username` = \
                     '${quote_mysql:${local_part:$2}}' AND `password` = \
                     OLD_PASSWORD('${quote_mysql:$3}')}{yes}{no}}
  server_prompts = :
  server_set_id = $2

auth_login:
  driver = plaintext
  public_name = LOGIN
  server_condition = ${lookup mysql{SELECT `username` FROM \
                     `mailbox` WHERE `username` = \
                     '${quote_mysql:${local_part:$1}}' AND `password` = \
                     OLD_PASSWORD('${quote_mysql:$2}')}{yes}{no}}
  server_prompts = Username:: : Password::
  server_set_id = $1

#auth_cram_md5:
#  driver = cram_md5
#  public_name = CRAM-MD5
#  server_secret = ${lookup mysql{SELECT `password` FROM \
#                        `mailbox` WHERE `username` \
#                        = '${quote_mysql:${local_part:$1}}'}{$value}fail}
#  server_set_id = $1
dovecot-sql.conf

Код: Выделить всё

driver = mysql
connect = host=localhost dbname=exim user=exim password=********
default_pass_scheme = PLAIN
password_query = SELECT `username` as `user`, `password` FROM  \
`mailbox` WHERE `username` = '%n@%d' AND `active`='1'
user_query = SELECT `maildir` AS `home`, 26 AS `uid`, 26 AS `gid` \
FROM `mailbox` WHERE `username` = '%n@%d' AND `active`='1'
dovecot.conf

Код: Выделить всё

base_dir = /var/run/dovecot/
protocols = imap imaps pop3 pop3s
# Renamed ssl_disable = yes to ssl = no
ssl = yes
ssl_cert_file = /etc/dovecot/ssl/dovecot.crt
ssl_key_file = /etc/dovecot/ssl/dovecot.key
protocol imap {
       listen = *:143
       ssl_listen = *:9143
}


protocol pop3 {
        listen = *:110
        ssl_listen = *:9110
}
disable_plaintext_auth = no
shutdown_clients = yes
log_timestamp = "%b %d %H:%M:%S "
syslog_facility = mail
login_dir = /var/run/dovecot/login
login_chroot = yes
login_user = dovecot
login_process_size = 64
login_process_per_connection = yes
login_processes_count = 3
login_max_processes_count = 64
login_greeting = dovecot MUA ready
login_log_format_elements = user=<%u> method=%m rip=%r lip=%l %c
login_log_format = %$: %s
verbose_proctitle = yes
first_valid_uid = 25
first_valid_gid = 0
mail_access_groups = mail
# После отладки убрать mail_debug
mail_debug = yes
mail_location = maildir:/var/mail/exim/%d/%n
# Removed umask. It wasn't really used anywhere anymore
# umask = 0077

protocol imap {
  imap_client_workarounds = delay-newmail outlook-idle \
  netscape-eoh tb-extra-mailbox-sep
}


protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}
protocol lda {
  postmaster_address = postmaster@staynet.ru
  auth_socket_path = /var/run/dovecot/auth-master
}
auth default { 
mechanisms = plain
   socket listen {
     master {
       path = /var/run/dovecot/auth-master
       mode = 0600
       user = mailnull
     }
   }
  passdb sql {
    args = /usr/local/etc/dovecot-sql.conf
  }
  userdb sql {
    args = /usr/local/etc/dovecot-sql.conf
}
  user = root
}
plugin {
}

CrazyPilot
ст. сержант
Сообщения: 321
Зарегистрирован: 2008-08-14 9:17:58
Откуда: Санкт-Петербург
Контактная информация:

Re: Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение CrazyPilot » 2010-02-03 20:29:38

server801 писал(а):есть проблема,делал все по статье

Код: Выделить всё

Feb  3 19:55:00 alpha exim[1512]: .....gave DEFER: MYSQL connection failed: Доступ закрыт для пользователя 'exim'@'localhost' (был использован пароль: ДА)
Копать видимо в сиквел?

Аватара пользователя
server801
ст. лейтенант
Сообщения: 1421
Зарегистрирован: 2008-09-27 21:15:16
Откуда: Саратов
Контактная информация:

Re: Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение server801 » 2010-02-03 20:32:50

не понял....
вот что пишет при загрузке екзима в логах

Код: Выделить всё

Feb  3 20:31:17 alpha exim[2129]: 1NchKi-0000Un-84 == root@domain-ak.ru R=system_aliases defer (-1): failed to expand "${lookup mysql{SELECT `goto` FROM `alias` WHERE `address`='${quote_mysql:$local_part@$domain}' OR `address`='${quote_mysql:@$domain}'}}": lookup of "SELECT `goto` FROM `alias` WHERE `address`='root@domain-ak.ru' OR `address`='@domain-ak.ru'" gave DEFER: MYSQL connection failed: \344\317\323\324\325\320 \332\301\313\322\331\324 \304\314\321 \320\317\314\330\332\317\327\301\324\305\314\321 'exim'@'localhost' (\302\331\314 \311\323\320\317\314\330\332\317\327\301\316 \320\301\322\317\314\330: \344\341)                                                                                  

Аватара пользователя
server801
ст. лейтенант
Сообщения: 1421
Зарегистрирован: 2008-09-27 21:15:16
Откуда: Саратов
Контактная информация:

Re: Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение server801 » 2010-02-03 20:34:51

Код: Выделить всё

WHERE `address`='root@domain-ak.ru' OR `address`='@domain-ak.ru'" gave
записи нет domain-ak.ru нигде в конфигах,а все равно присутствует............ :st:

CrazyPilot
ст. сержант
Сообщения: 321
Зарегистрирован: 2008-08-14 9:17:58
Откуда: Санкт-Петербург
Контактная информация:

Re: Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение CrazyPilot » 2010-02-03 20:37:31

у вас exim в базу попасть не может, попробуйте подключиться из консоли в мускул под exim@localhost и выбрать что-нить из таблицы. Копайте в пермишены и grant, либо пароль неверный прописали.

Аватара пользователя
server801
ст. лейтенант
Сообщения: 1421
Зарегистрирован: 2008-09-27 21:15:16
Откуда: Саратов
Контактная информация:

Re: Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение server801 » 2010-02-03 20:40:12

так с пыхадмина заходит ведь... :pardon:
и с консоли

Код: Выделить всё

mysql -u exim -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 43
Server version: 5.0.89 FreeBSD port: mysql-server-5.0.89

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| abills             |
| cacti              |
| exim               |
| forum              |
| ftp                |
| marxservis         |
| mysql              |
| openfire           |
| roundcubemail      |
+--------------------+
10 rows in set (0.00 sec)

mysql> use exim;

CrazyPilot
ст. сержант
Сообщения: 321
Зарегистрирован: 2008-08-14 9:17:58
Откуда: Санкт-Петербург
Контактная информация:

Re: Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение CrazyPilot » 2010-02-03 20:45:30

ну хер знает, попробуйте для успокоения совести mysql -u exim -h localhost -p
и select, который exim пытается провернуть, из базы exim сделать. Если сработает - смотрите конфиг экзима, наверно там пароль неправильный.

Аватара пользователя
server801
ст. лейтенант
Сообщения: 1421
Зарегистрирован: 2008-09-27 21:15:16
Откуда: Саратов
Контактная информация:

Re: Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение server801 » 2010-02-03 20:48:12

CrazyPilot писал(а):ну хер знает, попробуйте для успокоения совести mysql -u exim -h localhost -p
и select, который exim пытается провернуть, из базы exim сделать. Если сработает - смотрите конфиг экзима, наверно там пароль неправильный.
ну так заходит ведь.а по русски
попробуйте для успокоения совести mysql -u exim -h localhost -p
и select, который exim пытается провернуть, из базы exim сделать
что именно сделать?

Аватара пользователя
server801
ст. лейтенант
Сообщения: 1421
Зарегистрирован: 2008-09-27 21:15:16
Откуда: Саратов
Контактная информация:

Re: Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение server801 » 2010-02-03 20:50:36

Код: Выделить всё

Feb  3 20:31:17 alpha exim[2219]: 1Nciey-0000QD-Bk == root@mail.staynet.ru routing defer (-51): retry time not reached
Feb  3 20:31:17 alpha exim[2220]: 1NcS2L-0002MD-1F == root@staynet.ru routing defer (-51): retry time not reached
это нормально в логах?

CrazyPilot
ст. сержант
Сообщения: 321
Зарегистрирован: 2008-08-14 9:17:58
Откуда: Санкт-Петербург
Контактная информация:

Re: Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение CrazyPilot » 2010-02-03 20:53:45

ну ваще, а я на каком написал? :)

Код: Выделить всё

mysql -u exim -h localhost -p
use exim;
select * from domain;
про retry time not reached - нормально. Сообщения висят в очереди наверно, таймаут для повторной попытки еще не прошел просто.

Аватара пользователя
server801
ст. лейтенант
Сообщения: 1421
Зарегистрирован: 2008-09-27 21:15:16
Откуда: Саратов
Контактная информация:

Re: Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение server801 » 2010-02-03 20:57:33

Код: Выделить всё

mysql -u exim -h localhost -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 95
Server version: 5.0.89 FreeBSD port: mysql-server-5.0.89

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use exim;
Database changed
mysql> select * from domain;
+------------+-------------+---------+-----------+----------+-------+-----------+----------+---------------------+---------------------+--------+
| domain     | description | aliases | mailboxes | maxquota | quota | transport | backupmx | created             | modified            | active |
+------------+-------------+---------+-----------+----------+-------+-----------+----------+---------------------+---------------------+--------+
| ALL        |             |       0 |         0 |        0 |     0 |           |        0 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 |      1 |
| staynet.ru |             |       0 |         0 |        0 |     0 | virtual   |        0 | 2010-02-02 22:17:47 | 2010-02-02 22:17:47 |      1 |
+------------+-------------+---------+-----------+----------+-------+-----------+----------+---------------------+---------------------+--------+
2 rows in set (0.00 sec)

mysql>                                        
:pardon:

CrazyPilot
ст. сержант
Сообщения: 321
Зарегистрирован: 2008-08-14 9:17:58
Откуда: Санкт-Петербург
Контактная информация:

Re: Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение CrazyPilot » 2010-02-03 21:01:01

Эээ, проверьте в configure пароль в опции hide mysql_servers
и покажите вывод

Код: Выделить всё

sockstat -4 -P tcp | grep mysql

Аватара пользователя
server801
ст. лейтенант
Сообщения: 1421
Зарегистрирован: 2008-09-27 21:15:16
Откуда: Саратов
Контактная информация:

Re: Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение server801 » 2010-02-03 21:04:36

Код: Выделить всё

sockstat -4 -P tcp | grep mysql
mysql    mysqld     1020  10 tcp4   127.0.0.1:3306        *:*
mysql    mysqld     1020  26 tcp4   127.0.0.1:3306        127.0.0.1:41805
mysql    mysqld     1020  27 tcp4   127.0.0.1:3306        127.0.0.1:53759
mysql    mysqld     1020  28 tcp4   127.0.0.1:3306        127.0.0.1:25644
mysql    mysqld     1020  29 tcp4   127.0.0.1:3306        127.0.0.1:44631
mysql    mysqld     1020  30 tcp4   127.0.0.1:3306        127.0.0.1:55061
configure

Код: Выделить всё

hide mysql_servers = localhost/exim/exim/exim

CrazyPilot
ст. сержант
Сообщения: 321
Зарегистрирован: 2008-08-14 9:17:58
Откуда: Санкт-Петербург
Контактная информация:

Re: Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение CrazyPilot » 2010-02-03 21:08:06

у вас пароль совпадает с именем пользователя и названием базы данных - все три exim?

Аватара пользователя
server801
ст. лейтенант
Сообщения: 1421
Зарегистрирован: 2008-09-27 21:15:16
Откуда: Саратов
Контактная информация:

Re: Обсуждение статьи Exim&Dovecot + fetchmail

Непрочитанное сообщение server801 » 2010-02-03 21:14:33

во!не совпадал!исправил,перегрузил.идем далее!пытаюсь отправить с постфихадмина сообщение

Код: Выделить всё

Feb  3 21:10:00 alpha exim[1531]: 1Ncjfs-0000Oh-HE <= root@staynet.ru U=root P=local S=832 from <root@staynet.ru> for root
Feb  3 21:10:03 alpha exim[1532]: 1Ncjfs-0000Oh-HE ** root@staynet.ru R=masterhost_router T=masterhost_transport: SMTP error from remote mail server after RCPT TO:<root@staynet.ru>: host smtp.masterhost.ru [217.16.16.82]: 535 5.7.0 Authentication credentials invalid
Feb  3 21:10:03 alpha exim[1534]: 1Ncjfv-0000Ok-Sj <= <> R=1Ncjfs-0000Oh-HE U=mailnull P=local S=1763 from <> for root@staynet.ru
Feb  3 21:10:07 alpha exim[1535]: 1Ncjfv-0000Ok-Sj ** root@staynet.ru R=masterhost_router T=masterhost_transport: SMTP error from remote mail server after RCPT TO:<root@staynet.ru>: host smtp.masterhost.ru [217.16.16.82]: 535 5.7.0 Malformed login
Feb  3 21:10:07 alpha exim[1535]: 1Ncjfv-0000Ok-Sj Frozen (delivery error message)
Feb  3 21:10:07 alpha exim[1532]: 1Ncjfs-0000Oh-HE Completed
Feb  3 21:11:47 alpha exim[1558]: Delay 0s for  [127.0.0.1] with HELO=staynet.ru. Mail from root@staynet.ru to server801@rambler.ru.
Feb  3 21:12:09 alpha exim[1558]: DNS list lookup defer (probably timeout) for 1.0.0.127.bl.csma.biz: assumed not in list
Feb  3 21:12:31 alpha exim[1558]: DNS list lookup defer (probably timeout) for 1.0.0.127.dynablock.njabl.org: assumed not in list
Feb  3 21:12:31 alpha exim[1558]: 1NcjiJ-0000P8-UI <= root@staynet.ru H=(staynet.ru) [127.0.0.1] I=[127.0.0.1]:25 P=esmtp S=515 from <root@staynet.ru> for server801@rambler.ru
Feb  3 21:12:34 alpha exim[1559]: 1NcjiJ-0000P8-UI ** server801@rambler.ru R=donpac_router T=donpac_transport: SMTP error from remote mail server after MAIL FROM:<root@staynet.ru> SIZE=1554: host smtp.donpac.ru [80.254.111.90]: 550 if you our user, then you must authentication
Feb  3 21:12:34 alpha exim[1561]: 1NcjiM-0000PB-Rt <= <> R=1NcjiJ-0000P8-UI U=mailnull P=local S=1470 from <> for root@staynet.ru
Feb  3 21:12:34 alpha exim[1559]: 1NcjiJ-0000P8-UI Completed
Feb  3 21:12:38 alpha exim[1562]: 1NcjiM-0000PB-Rt ** root@staynet.ru R=masterhost_router T=masterhost_transport: SMTP error from remote mail server after RCPT TO:<root@staynet.ru>: host smtp.masterhost.ru [217.16.16.82]: 535 5.7.0 Malformed login
Feb  3 21:12:38 alpha exim[1562]: 1NcjiM-0000PB-Rt Frozen (delivery error message)
чуть позже

Код: Выделить всё

Feb  3 21:20:00 alpha exim[1585]: 1NcjpY-0000PZ-4H <= root@staynet.ru U=root P=local S=832 from <root@staynet.ru> for root
Feb  3 21:20:03 alpha exim[1586]: 1NcjpY-0000PZ-4H ** root@staynet.ru R=masterhost_router T=masterhost_transport: SMTP error from remote mail server after RCPT TO:<root@staynet.ru>: host smtp.masterhost.ru [217.16.16.82]: 535 5.7.0 Authentication credentials invalid
Feb  3 21:20:03 alpha exim[1588]: 1Ncjpb-0000Pc-EL <= <> R=1NcjpY-0000PZ-4H U=mailnull P=local S=1763 from <> for root@staynet.ru
Feb  3 21:20:06 alpha exim[1589]: 1Ncjpb-0000Pc-EL ** root@staynet.ru R=masterhost_router T=masterhost_transport: SMTP error from remote mail server after RCPT TO:<root@staynet.ru>: host smtp.masterhost.ru [217.16.16.82]: 535 5.7.0 Malformed login
Feb  3 21:20:06 alpha exim[1589]: 1Ncjpb-0000Pc-EL Frozen (delivery error message)
Feb  3 21:20:06 alpha exim[1586]: 1NcjpY-0000PZ-4H Completed