Неполучается подружитьpostfix+dovecot+mysql (почтовый сервер)

Обсуждение настройки и работы сервисов, резервирования, сетевых настроек и вопросов безопасности ОС.

Модераторы: SLEDopit, Модераторы разделов

Аватара пользователя
VIRUS_T
Сообщения: 84

Неполучается подружитьpostfix+dovecot+mysql

Сообщение VIRUS_T »

Здравстуйте уважаемые жители форума!
Начал я настраивать вышеописанную связку и возникли проблемки/сразу говорю поиск юзал, но по своей пробеме ничего вразумительног не нашел/
создал мускул базу: имя postfix, пароль и юзер тоже postfix дал привилегии+прикрутил постфиксадмина/здесь все нормально работает/
Далее main.conf /postfix/

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

# is no cure for address rewriting mistakes or mail routing mistakes.
#
#soft_bounce = no

# LOCAL PATHNAME INFORMATION
#
# The queue_directory specifies the location of the Postfix queue.
# This is also the root directory of Postfix daemons that run chrooted.
# See the files in examples/chroot-setup for setting up Postfix chroot
# environments on different UNIX systems.
#
queue_directory = /var/spool/postfix

# The command_directory parameter specifies the location of all
# postXXX commands.
#
command_directory = /usr/sbin

# The daemon_directory parameter specifies the location of all Postfix
# daemon programs (i.e. programs listed in the master.cf file). This
# directory must be owned by root.
#
daemon_directory = /usr/lib/postfix

# The data_directory parameter specifies the location of Postfix-writable
# data files (caches, random numbers). This directory must be owned
# by the mail_owner account (see below).
#
data_directory = /var/lib/postfix

# QUEUE AND PROCESS OWNERSHIP
#
# The mail_owner parameter specifies the owner of the Postfix queue
# and of most Postfix daemon processes.  Specify the name of a user
# account THAT DOES NOT SHARE ITS USER OR GROUP ID WITH OTHER ACCOUNTS
# AND THAT OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM.  In
# particular, don't specify nobody or daemon. PLEASE USE A DEDICATED
# USER.
#
mail_owner = postfix

# The default_privs parameter specifies the default rights used by
# the local delivery agent for delivery to external file or command.
# These rights are used in the absence of a recipient user context.
# DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
#
#default_privs = nobody

# INTERNET HOST AND DOMAIN NAMES
#
# The myhostname parameter specifies the internet hostname of this
# mail system. The default is to use the fully-qualified domain name
# from gethostname(). $myhostname is used as a default value for many
# other configuration parameters.
#
myhostname = mail.kovteplo.gov
#myhostname = virtual.domain.tld

# The mydomain parameter specifies the local internet domain name.
# The default is to use $myhostname minus the first component.
# $mydomain is used as a default value for many other configuration
# parameters.
#
mydomain = kovteplo.gov

# SENDING MAIL
#
# The myorigin parameter specifies the domain that locally-posted
# mail appears to come from. The default is to append $myhostname,
# which is fine for small sites.  If you run a domain with multiple
# machines, you should (1) change this to $mydomain and (2) set up
# a domain-wide alias database that aliases each user to
# user@that.users.mailhost.
#
# For the sake of consistency between sender and recipient addresses,
# myorigin also specifies the default domain name that is appended
# to recipient addresses that have no @domain part.
#
myorigin = $myhostname
#myorigin = $mydomain

# RECEIVING MAIL

# The inet_interfaces parameter specifies the network interface
# addresses that this mail system receives mail on.  By default,
# the software claims all active interfaces on the machine. The
# parameter also controls delivery of mail to user@[ip.address].
#
# See also the proxy_interfaces parameter, for network addresses that
# are forwarded to us via a proxy or network address translator.
#
# Note: you need to stop/start Postfix when this parameter changes.
#
inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost

# The proxy_interfaces parameter specifies the network interface
# addresses that this mail system receives mail on by way of a
# proxy or network address translation unit. This setting extends
# the address list specified with the inet_interfaces parameter.
#
# You must specify your proxy/NAT addresses when your system is a
# backup MX host for other domains, otherwise mail delivery loops
# will happen when the primary MX host is down.
#
#proxy_interfaces =
#proxy_interfaces = 1.2.3.4

# The mydestination parameter specifies the list of domains that this
# machine considers itself the final destination for.
#
# These domains are routed to the delivery agent specified with the
# local_transport parameter setting. By default, that is the UNIX
# compatible delivery agent that lookups all recipients in /etc/passwd
# and /etc/aliases or their equivalent.
#
# The default is $myhostname + localhost.$mydomain.  On a mail domain
# gateway, you should also include $mydomain.
#
# Do not specify the names of virtual domains - those domains are
# specified elsewhere (see VIRTUAL_README).
#
# Do not specify the names of domains that this machine is backup MX
# host for. Specify those names via the relay_domains settings for
# the SMTP server, or use permit_mx_backup if you are lazy (see
# STANDARD_CONFIGURATION_README).
#
# The local machine is always the final destination for mail addressed
# to user@[the.net.work.address] of an interface that the mail system
# receives mail on (see the inet_interfaces parameter).
#
# Specify a list of host or domain names, /file/name or type:table
# patterns, separated by commas and/or whitespace. A /file/name
# pattern is replaced by its contents; a type:table is matched when
# a name matches a lookup key (the right-hand side is ignored).
# Continue long lines by starting the next line with whitespace.
#
# See also below, section "REJECTING MAIL FOR UNKNOWN LOCAL USERS".
#
mydestination = $myhostname, localhost.$mydomain, localhost
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
#    mail.$mydomain, www.$mydomain, ftp.$mydomain

# REJECTING MAIL FOR UNKNOWN LOCAL USERS
#
# The local_recipient_maps parameter specifies optional lookup tables
# with all names or addresses of users that are local with respect
# to $mydestination, $inet_interfaces or $proxy_interfaces.
#
# If this parameter is defined, then the SMTP server will reject
# mail for unknown local users. This parameter is defined by default.
#
# To turn off local recipient checking in the SMTP server, specify
# local_recipient_maps = (i.e. empty).
#
# The default setting assumes that you use the default Postfix local
# delivery agent for local delivery. You need to update the
# local_recipient_maps setting if:
#
# - You define $mydestination domain recipients in files other than
#   /etc/passwd, /etc/aliases, or the $virtual_alias_maps files.
#   For example, you define $mydestination domain recipients in
#   the $virtual_mailbox_maps files.
#
# - You redefine the local delivery agent in master.cf.
#
# - You redefine the "local_transport" setting in main.cf.
#
# - You use the "luser_relay", "mailbox_transport", or "fallback_transport"
#   feature of the Postfix local delivery agent (see local(8)).
#
# Details are described in the LOCAL_RECIPIENT_README file.
#
# Beware: if the Postfix SMTP server runs chrooted, you probably have
# to access the passwd file via the proxymap service, in order to
# overcome chroot restrictions. The alternative, having a copy of
# the system passwd file in the chroot jail is just not practical.
#
# The right-hand side of the lookup tables is conveniently ignored.
# In the left-hand side, specify a bare username, an @domain.tld
# wild-card, or specify a user@domain.tld address.
#
local_recipient_maps = unix:passwd.byname $alias_maps
#local_recipient_maps = proxy:unix:passwd.byname $alias_maps
#local_recipient_maps =

# The unknown_local_recipient_reject_code specifies the SMTP server
# response code when a recipient domain matches $mydestination or
# ${proxy,inet}_interfaces, while $local_recipient_maps is non-empty
# and the recipient address or address local-part is not found.
#
# The default setting is 550 (reject mail) but it is safer to start
# with 450 (try again later) until you are certain that your
# local_recipient_maps settings are OK.
#
unknown_local_recipient_reject_code = 550

# TRUST AND RELAY CONTROL

# The mynetworks parameter specifies the list of "trusted" SMTP
# clients that have more privileges than "strangers".
#
# In particular, "trusted" SMTP clients are allowed to relay mail
# through Postfix.  See the smtpd_recipient_restrictions parameter
# in postconf(5).
#
# You can specify the list of "trusted" network addresses by hand
# or you can let Postfix do it for you (which is the default).
#
# By default (mynetworks_style = subnet), Postfix "trusts" SMTP
# clients in the same IP subnetworks as the local machine.
# On Linux, this does works correctly only with interfaces specified
# with the "ifconfig" command.
#
# Specify "mynetworks_style = class" when Postfix should "trust" SMTP
# clients in the same IP class A/B/C networks as the local machine.
# Don't do this with a dialup site - it would cause Postfix to "trust"
# your entire provider's network.  Instead, specify an explicit
# mynetworks list by hand, as described below.
#
# Specify "mynetworks_style = host" when Postfix should "trust"
# only the local machine.
#
#mynetworks_style = class
#mynetworks_style = subnet
mynetworks_style = host

# Alternatively, you can specify the mynetworks list by hand, in
# which case Postfix ignores the mynetworks_style setting.
#
# Specify an explicit list of network/netmask patterns, where the
# mask specifies the number of bits in the network part of a host
# address.
#
# You can also specify the absolute pathname of a pattern file instead
# of listing the patterns here. Specify type:table for table-based lookups
# (the value on the table right-hand side is not used).
#
mynetworks = 192.168.1.0/50, 127.0.0.0/8    192.168.2.0/250
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/etc/postfix/network_table

# The relay_domains parameter restricts what destinations this system will
# relay mail to.  See the smtpd_recipient_restrictions description in
# postconf(5) for detailed information.
#
# By default, Postfix relays mail
# - from "trusted" clients (IP address matches $mynetworks) to any destination,
# - from "untrusted" clients to destinations that match $relay_domains or
#   subdomains thereof, except addresses with sender-specified routing.
# The default relay_domains value is $mydestination.
#
# In addition to the above, the Postfix SMTP server by default accepts mail
# that Postfix is final destination for:
# - destinations that match $inet_interfaces or $proxy_interfaces,
# - destinations that match $mydestination
# - destinations that match $virtual_alias_domains,
# - destinations that match $virtual_mailbox_domains.
# These destinations do not need to be listed in $relay_domains.
#
# Specify a list of hosts or domains, /file/name patterns or type:name
# lookup tables, separated by commas and/or whitespace.  Continue
# long lines by starting the next line with whitespace. A file name
# is replaced by its contents; a type:name table is matched when a
# (parent) domain appears as lookup key.
#
# NOTE: Postfix will not automatically forward mail for domains that
# list this system as their primary or backup MX host. See the
# permit_mx_backup restriction description in postconf(5).
#
#relay_domains = $mydestination

# INTERNET OR INTRANET

# The relayhost parameter specifies the default host to send mail to
# when no entry is matched in the optional transport(5) table. When
# no relayhost is given, mail is routed directly to the destination.
#
# On an intranet, specify the organizational domain name. If your
# internal DNS uses no MX records, specify the name of the intranet
# gateway host instead.
#
# In the case of SMTP, specify a domain, host, host:port, [host]:port,
# [address] or [address]:port; the form [host] turns off MX lookups.
#
# If you're connected via UUCP, see also the default_transport parameter.
#
#relayhost = $mydomain
#relayhost = [gateway.my.domain]
#relayhost = [mailserver.isp.tld]
#relayhost = uucphost
#relayhost = [an.ip.add.ress]

# REJECTING UNKNOWN RELAY USERS
#
# The relay_recipient_maps parameter specifies optional lookup tables
# with all addresses in the domains that match $relay_domains.
#
# If this parameter is defined, then the SMTP server will reject
# mail for unknown relay users. This feature is off by default.
#
# The right-hand side of the lookup tables is conveniently ignored.
# In the left-hand side, specify an @domain.tld wild-card, or specify
# a user@domain.tld address.
#
#relay_recipient_maps = hash:/etc/postfix/relay_recipients

# INPUT RATE CONTROL
#
# The in_flow_delay configuration parameter implements mail input
# flow control. This feature is turned on by default, although it
# still needs further development (it's disabled on SCO UNIX due
# to an SCO bug).
#
# A Postfix process will pause for $in_flow_delay seconds before
# accepting a new message, when the message arrival rate exceeds the
# message delivery rate. With the default 100 SMTP server process
# limit, this limits the mail inflow to 100 messages a second more
# than the number of messages delivered per second.
#
# Specify 0 to disable the feature. Valid delays are 0..10.
#
#in_flow_delay = 1s

# ADDRESS REWRITING
#
# The ADDRESS_REWRITING_README document gives information about
# address masquerading or other forms of address rewriting including
# username->Firstname.Lastname mapping.

# ADDRESS REDIRECTION (VIRTUAL DOMAIN)
#
# The VIRTUAL_README document gives information about the many forms
# of domain hosting that Postfix supports.

# "USER HAS MOVED" BOUNCE MESSAGES
#
# See the discussion in the ADDRESS_REWRITING_README document.

# TRANSPORT MAP
#
# See the discussion in the ADDRESS_REWRITING_README document.

# ALIAS DATABASE
#
# The alias_maps parameter specifies the list of alias databases used
# by the local delivery agent. The default list is system dependent.
#
# On systems with NIS, the default is to search the local alias
# database, then the NIS alias database. See aliases(5) for syntax
# details.
#
# If you change the alias database, run "postalias /etc/aliases" (or
# wherever your system stores the mail alias file), or simply run
# "newaliases" to build the necessary DBM or DB file.
#
# It will take a minute or so before changes become visible.  Use
# "postfix reload" to eliminate the delay.
#
#alias_maps = dbm:/etc/aliases
alias_maps = hash:/etc/aliases
#alias_maps = hash:/etc/aliases, nis:mail.aliases
#alias_maps = netinfo:/aliases

# The alias_database parameter specifies the alias database(s) that
# are built with "newaliases" or "sendmail -bi".  This is a separate
# configuration parameter, because alias_maps (see above) may specify
# tables that are not necessarily all under control by Postfix.
#
#alias_database = dbm:/etc/aliases
#alias_database = dbm:/etc/mail/aliases
alias_database = hash:/etc/aliases
#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases

# ADDRESS EXTENSIONS (e.g., user+foo)
#
# The recipient_delimiter parameter specifies the separator between
# user names and address extensions (user+foo). See canonical(5),
# local(8), relocated(5) and virtual(5) for the effects this has on
# aliases, canonical, virtual, relocated and .forward file lookups.
# Basically, the software tries user+foo and .forward+foo before
# trying user and .forward.
#
#recipient_delimiter = +

# DELIVERY TO MAILBOX
#
# The home_mailbox parameter specifies the optional pathname of a
# mailbox file relative to a user's home directory. The default
# mailbox file is /var/spool/mail/user or /var/mail/user.  Specify
# "Maildir/" for qmail-style delivery (the / is required).
#
#home_mailbox = Mailbox
home_mailbox = Maildir/

# The mail_spool_directory parameter specifies the directory where
# UNIX-style mailboxes are kept. The default setting depends on the
# system type.
#
mail_spool_directory = /var/mail
#mail_spool_directory = /var/spool/mail

# The mailbox_command parameter specifies the optional external
# command to use instead of mailbox delivery. The command is run as
# the recipient with proper HOME, SHELL and LOGNAME environment settings.
# Exception:  delivery for root is done as $default_user.
#
# Other environment variables of interest: USER (recipient username),
# EXTENSION (address extension), DOMAIN (domain part of address),
# and LOCAL (the address localpart).
#
# Unlike other Postfix configuration parameters, the mailbox_command
# parameter is not subjected to $parameter substitutions. This is to
# make it easier to specify shell syntax (see example below).
#
# Avoid shell meta characters because they will force Postfix to run
# an expensive shell process. Procmail alone is expensive enough.
#
# IF YOU USE THIS TO DELIVER MAIL SYSTEM-WIDE, YOU MUST SET UP AN
# ALIAS THAT FORWARDS MAIL FOR ROOT TO A REAL USER.
#
#mailbox_command = /some/where/procmail
#mailbox_command = /some/where/procmail -a "$EXTENSION"

# The mailbox_transport specifies the optional transport in master.cf
# to use after processing aliases and .forward files. This parameter
# has precedence over the mailbox_command, fallback_transport and
# luser_relay parameters.
#
# Specify a string of the form transport:nexthop, where transport is
# the name of a mail delivery transport defined in master.cf.  The
# :nexthop part is optional. For more details see the sample transport
# configuration file.
#
# NOTE: if you use this feature for accounts not in the UNIX password
# file, then you must update the "local_recipient_maps" setting in
# the main.cf file, otherwise the SMTP server will reject mail for
# non-UNIX accounts with "User unknown in local recipient table".
#
#mailbox_transport = lmtp:unix:/file/name
#mailbox_transport = cyrus

# The fallback_transport specifies the optional transport in master.cf
# to use for recipients that are not found in the UNIX passwd database.
# This parameter has precedence over the luser_relay parameter.
#
# Specify a string of the form transport:nexthop, where transport is
# the name of a mail delivery transport defined in master.cf.  The
# :nexthop part is optional. For more details see the sample transport
# configuration file.
#
# NOTE: if you use this feature for accounts not in the UNIX password
# file, then you must update the "local_recipient_maps" setting in
# the main.cf file, otherwise the SMTP server will reject mail for
# non-UNIX accounts with "User unknown in local recipient table".
#
#fallback_transport = lmtp:unix:/file/name
#fallback_transport = cyrus
#fallback_transport =

# The luser_relay parameter specifies an optional destination address
# for unknown recipients.  By default, mail for unknown@$mydestination,
# unknown@[$inet_interfaces] or unknown@[$proxy_interfaces] is returned
# as undeliverable.
#
# The following expansions are done on luser_relay: $user (recipient
# username), $shell (recipient shell), $home (recipient home directory),
# $recipient (full recipient address), $extension (recipient address
# extension), $domain (recipient domain), $local (entire recipient
# localpart), $recipient_delimiter. Specify ${name?value} or
# ${name:value} to expand value only when $name does (does not) exist.
#
# luser_relay works only for the default Postfix local delivery agent.
#
# NOTE: if you use this feature for accounts not in the UNIX password
# file, then you must specify "local_recipient_maps =" (i.e. empty) in
# the main.cf file, otherwise the SMTP server will reject mail for
# non-UNIX accounts with "User unknown in local recipient table".
#
#luser_relay = $user@other.host
#luser_relay = $local@other.host
#luser_relay = admin+$local

# JUNK MAIL CONTROLS
#
# The controls listed here are only a very small subset. The file
# SMTPD_ACCESS_README provides an overview.

# The header_checks parameter specifies an optional table with patterns
# that each logical message header is matched against, including
# headers that span multiple physical lines.
#
# By default, these patterns also apply to MIME headers and to the
# headers of attached messages. With older Postfix versions, MIME and
# attached message headers were treated as body text.
#
# For details, see "man header_checks".
#
header_checks = regexp:/etc/postfix/header_checks

# FAST ETRN SERVICE
#
# Postfix maintains per-destination logfiles with information about
# deferred mail, so that mail can be flushed quickly with the SMTP
# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
# See the ETRN_README document for a detailed description.
#
# The fast_flush_domains parameter controls what destinations are
# eligible for this service. By default, they are all domains that
# this server is willing to relay mail to.
#
#fast_flush_domains = $relay_domains

# SHOW SOFTWARE VERSION OR NOT
#
# The smtpd_banner parameter specifies the text that follows the 220
# code in the SMTP server's greeting banner. Some people like to see
# the mail version advertised. By default, Postfix shows no version.
#
# You MUST specify $myhostname at the start of the text. That is an
# RFC requirement. Postfix itself does not care.
#
smtpd_banner = $myhostname ESMTP $mail_name
#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)

# PARALLEL DELIVERY TO THE SAME DESTINATION
#
# How many parallel deliveries to the same user or domain? With local
# delivery, it does not make sense to do massively parallel delivery
# to the same user, because mailbox updates must happen sequentially,
# and expensive pipelines in .forward files can cause disasters when
# too many are run at the same time. With SMTP deliveries, 10
# simultaneous connections to the same domain could be sufficient to
# raise eyebrows.
#
# Each message delivery transport has its XXX_destination_concurrency_limit
# parameter.  The default is $default_destination_concurrency_limit for
# most delivery transports. For the local delivery agent the default is 2.

#local_destination_concurrency_limit = 2
#default_destination_concurrency_limit = 20

# DEBUGGING CONTROL
#
# The debug_peer_level parameter specifies the increment in verbose
# logging level when an SMTP client or server host name or address
# matches a pattern in the debug_peer_list parameter.
#
debug_peer_level = 2

# The debug_peer_list parameter specifies an optional list of domain
# or network patterns, /file/name patterns or type:name tables. When
# an SMTP client or server host name or address matches a pattern,
# increase the verbose logging level by the amount specified in the
# debug_peer_level parameter.
#
#debug_peer_list = 127.0.0.1
#debug_peer_list = some.domain

# The debugger_command specifies the external command that is executed
# when a Postfix daemon program is run with the -D option.
#
# Use "command .. & sleep 5" so that the debugger can attach before
# the process marches on. If you use an X-based debugger, be sure to
# set up your XAUTHORITY environment variable before starting Postfix.
#
debugger_command =
     PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
     ddd $daemon_directory/$process_name $process_id & sleep 5

# If you can't use X, use this to capture the call stack when a
# daemon crashes. The result is in a file in the configuration
# directory, and is named after the process name and the process ID.
#
# debugger_command =
#    PATH=/bin:/usr/bin:/usr/local/bin; export PATH; (echo cont;
#    echo where) | gdb $daemon_directory/$process_name $process_id 2>&1
#    >$config_directory/$process_name.$process_id.log & sleep 5
#
# Another possibility is to run gdb under a detached screen session.
# To attach to the screen sesssion, su root and run "screen -r
# <id_string>" where <id_string> uniquely matches one of the detached
# sessions (from "screen -list").
#
# debugger_command =
#    PATH=/bin:/usr/bin:/sbin:/usr/sbin; export PATH; screen
#    -dmS $process_name gdb $daemon_directory/$process_name
#    $process_id & sleep 1

# INSTALL-TIME CONFIGURATION INFORMATION
#
# The following parameters are used when installing a new Postfix version.
#
# sendmail_path: The full pathname of the Postfix sendmail command.
# This is the Sendmail-compatible mail posting interface.
#
sendmail_path = /usr/sbin/sendmail

# newaliases_path: The full pathname of the Postfix newaliases command.
# This is the Sendmail-compatible command to build alias databases.
#
newaliases_path = /usr/bin/newaliases

# mailq_path: The full pathname of the Postfix mailq command.  This
# is the Sendmail-compatible mail queue listing command.
#
mailq_path = /usr/bin/mailq

# setgid_group: The group for mail submission and queue management
# commands.  This must be a group name with a numerical group ID that
# is not shared with other accounts, not even with the Postfix account.
#
setgid_group = maildrop

# html_directory: The location of the Postfix HTML documentation.
#
html_directory = /usr/share/doc/packages/postfix/html

# manpage_directory: The location of the Postfix on-line manual pages.
#
manpage_directory = /usr/share/man

# sample_directory: The location of the Postfix sample configuration files.
# This parameter is obsolete as of Postfix 2.1.
#
sample_directory = /usr/share/doc/packages/postfix/samples  virtual_mailbox_base    =    /var/spool/postfix/vmail

# readme_directory: The location of the Postfix README files.
#
virtual_mailbox_domains    =    mysql:/etc/postfix/virt_domain.cf
virtual_alias_maps    =    mysql:/etc/postfix/virt_alias.cf
virtual_mailbox_maps    =    mysql:/etc/postfix/virt_mailbox.cf
transport_maps    =    mysql:/etc/postfix/transport.cf
virtual_minimum_uid    =    51
virtual_uid_maps    =    static:51
virtual_gid_maps    =    static:51


virtual_transport    =    dovecot
dovecot_destination_recipient_limit    =    1
readme_directory = /usr/share/doc/packages/postfix/README_FILES
inet_protocols = all
biff = no
mail_spool_directory = /var/mail
canonical_maps = hash:/etc/postfix/canonical
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_alias_domains = hash:/etc/postfix/virtual
relocated_maps = hash:/etc/postfix/relocated
transport_maps = hash:/etc/postfix/transport
sender_canonical_maps = hash:/etc/postfix/sender_canonical
masquerade_exceptions = root
masquerade_classes = envelope_sender, header_sender, header_recipient
myhostname = mail.kovteplo.gov
program_directory = /usr/lib/postfix
inet_interfaces = localhost
masquerade_domains =
mydestination = $myhostname, localhost.$mydomain
defer_transports =
mynetworks_style = subnet
disable_dns_lookups = no
relayhost =
mailbox_command =
mailbox_transport =
strict_8bitmime = no
disable_mime_output_conversion = no
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_client_restrictions =
smtpd_helo_required = yes
smtpd_helo_restrictions =
strict_rfc821_envelopes = no
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
smtp_sasl_auth_enable = no
smtpd_sasl_auth_enable = yes
smtpd_sasl_exceptions_networks    =    $mynetworks
smtpd_sasl_security_options    =    noanonymous
smtpd_sasl_auth_clients    =    yes
smtpd_sasl_type    =    dovecot
smtpd_sasl_path    =    private/auth
smtpd_recipient_restrictions    =
permit_mynetworks    =
permit_sasl_authenticated    =
reject_unauth_destination    =
smtpd_use_tls = no
smtp_use_tls = no
alias_maps = hash:/etc/aliases
mailbox_size_limit = 102400000
message_size_limit = 10240000


smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache


далее virt_mailbox.cf

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

user = postfix
 password = postfix
 dbname =postfix
table    =    mailbox
select_field    =    maildir
where_field    =    username
additional_conditions=and active='1'
hosts = localhost


при тестировани выдает postfix
postmap -q kovteplo.gov mysql:/etc/postfix/virt_mailbox.cfpostmap: fatal: /etc/postfix/virt_mailbox.cf: bad string length 0 < 1: dbname =

Дистибутив OPENSUSE 11.0
зы: постфикс стартует нормально без ошибок. Подскажите плиз в чем дело
МУСИ ПУСИ OPENSUSE
Спасибо сказали:
Аватара пользователя
VIRUS_T
Сообщения: 84

Re: Неполучается подружитьpostfix+dovecot+mysql

Сообщение VIRUS_T »

Вот еще
mail:/home/еее # echo foo | /usr/sbin/sendmail -f root root && tail -f /var/log/mail
Dec 9 16:50:59 mail postfix/pickup[16002]: CE726CD46: uid=0 from=<root>
Dec 9 16:50:59 mail postfix/trivial-rewrite[16402]: fatal: /etc/postfix/virt_domain.cf: bad string length 0 < 1: dbname =
Dec 9 16:51:00 mail postfix/master[15991]: warning: process /usr/lib/postfix/trivial-rewrite pid 16402 exit status 1
Dec 9 16:51:00 mail postfix/master[15991]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup -- throttling
Dec 9 16:51:32 mail dovecot: pop3-login: Can't load private key file /etc/ssl/private/aol1.key: error:0906D06C:PEM routines:PEM_read_bio:no start line
Dec 9 16:51:32 mail dovecot: child 16405 (login) returned error 89
Dec 9 16:51:32 mail dovecot: child 16406 (login) returned error 89
Dec 9 16:51:32 mail dovecot: pop3-login: Can't load private key file /etc/ssl/private/aol1.key: error:0906D06C:PEM routines:PEM_read_bio:no start line
Dec 9 16:51:32 mail dovecot: pop3-login: Can't load private key file /etc/ssl/private/aol1.key: error:0906D06C:PEM routines:PEM_read_bio:no start line
Dec 9 16:51:32 mail dovecot: child 16407 (login) returned error 89
Dec 9 16:52:00 mail postfix/trivial-rewrite[16415]: fatal: /etc/postfix/virt_domain.cf: bad string length 0 < 1: dbname =
Dec 9 16:52:01 mail postfix/master[15991]: warning: process /usr/lib/postfix/trivial-rewrite pid 16415 exit status 1
Dec 9 16:52:01 mail postfix/master[15991]: warning:
даже тестовое сообщение не шлет /ошибка фигурирует та же/
МУСИ ПУСИ OPENSUSE
Спасибо сказали:
Аватара пользователя
Frank
Сообщения: 1059
ОС: Ubuntu, Debian

Re: Неполучается подружитьpostfix+dovecot+mysql

Сообщение Frank »

после = нужно пробел ставить перед значением параметра
Изображение
Спасибо сказали:
Аватара пользователя
VIRUS_T
Сообщения: 84

Re: Неполучается подружитьpostfix+dovecot+mysql

Сообщение VIRUS_T »

Frank писал(а):
09.12.2009 17:23
после = нужно пробел ставить перед значением параметра

Пробелы чегото не проглотил а вот Tab да!!! Спасибо за подсказку)))Как я это прозевал?))
Я пока не до конца настроил так что, если что еще спрошу))Тему пока закрывать не буду
МУСИ ПУСИ OPENSUSE
Спасибо сказали:
Аватара пользователя
VIRUS_T
Сообщения: 84

Re: Неполучается подружитьpostfix+dovecot+mysql

Сообщение VIRUS_T »

Обещал обратиться обращаюсь))
Ошибка в логах Dec 11 13:13:54 mail postfix/smtpd[8331]: fatal: no SASL authentication mechanisms
Клиент почтовый говорит что sasl косячит
В какую сторону копать?
МУСИ ПУСИ OPENSUSE
Спасибо сказали:
Аватара пользователя
VIRUS_T
Сообщения: 84

Re: Неполучается подружитьpostfix+dovecot+mysql

Сообщение VIRUS_T »

конфиги притерпели изменения
итак main.conf

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

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
#
#default_privs = nobody

# INTERNET HOST AND DOMAIN NAMES
#

myhostname     =     mail.kovteplo.gov
#myhostname = virtual.domain.tld

# The mydomain parameter specifies the local internet domain name.
# The default is to use $myhostname minus the first component.
# $mydomain is used as a default value for many other configuration
# parameters.
#
mydomain     =     kovteplo.gov

# SENDING MAIL
myorigin     =     $myhostname
#myorigin = $mydomain
inet_interfaces     =     all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
#
mydestination     =     $myhostname, localhost.$mydomain, localhost
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
#    mail.$mydomain, www.$mydomain, ftp.$mydomain
#
local_recipient_maps     =     unix:passwd.byname $alias_maps
#local_recipient_maps = proxy:unix:passwd.byname $alias_maps
#local_recipient_maps =
unknown_local_recipient_reject_code     =     550

#mynetworks_style = class
#mynetworks_style = subnet
mynetworks_style     =     subnet
mynetworks     =     192.168.1.0/50     127.0.0.0/8    192.168.2.0/250
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/etc/postfix/network_table
#
#alias_maps = dbm:/etc/aliases
alias_maps     =     hash:/etc/aliases
#alias_maps = hash:/etc/aliases, nis:mail.aliases
#alias_maps = netinfo:/aliases
#alias_database = dbm:/etc/aliases
#alias_database = dbm:/etc/mail/aliases
alias_database     =     hash:/etc/aliases
#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases
#home_mailbox = Mailbox
home_mailbox     =     Maildir/
#
#mail_spool_directory     =     /var/mail
mail_spool_directory     =     /var/spool/mail
#mailbox_transport = lmtp:unix:/file/name
#mailbox_transport = cyrus
#
header_checks     =     regexp:/etc/postfix/header_checks
#
smtpd_banner     =     $myhostname ESMTP $mail_name
#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)

#local_destination_concurrency_limit = 2
#default_destination_concurrency_limit = 20

debug_peer_level     =     2
debugger_command     =
     PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
     ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = maildrop

# html_directory: The location of the Postfix HTML documentation.
#
html_directory = /usr/share/doc/packages/postfix/html

# manpage_directory: The location of the Postfix on-line manual pages.
#
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/packages/postfix/samples
virtual_mailbox_base    =    /var/spool/postfix/vmail

# readme_directory: The location of the Postfix README files.
#
virtual_mailbox_domains    =    mysql:/etc/postfix/sql/virtual_mailbox_domain.cf
virtual_alias_maps    =    mysql:/etc/postfix/sql/virt_alias_maps.cf
virtual_mailbox_maps    =    mysql:/etc/postfix/sql/virtual_mailbox_recipients.cf
########transport_maps    =    mysql:/etc/postfix/sql/transport.cf
virtual_minimum_uid    =    508
virtual_uid_maps    =    static:508
virtual_gid_maps    =    static:508
virtual_transport    =    dovecot
dovecot_destination_recipient_limit    =    1
readme_directory = /usr/share/doc/packages/postfix/README_FILES
inet_protocols     =     ipv4
biff     =     no
mail_spool_directory     =     /var/mail
canonical_maps     =     hash:/etc/postfix/canonical
virtual_alias_maps     =     hash:/etc/postfix/virtual
virtual_alias_domains     =     hash:/etc/postfix/virtual
relocated_maps     =     hash:/etc/postfix/relocated
transport_maps     =     hash:/etc/postfix/transport
sender_canonical_maps     =     hash:/etc/postfix/sender_canonical
masquerade_exceptions     =     root
masquerade_classes     =     envelope_sender, header_sender, header_recipient
program_directory     =     /usr/lib/postfix
masquerade_domains =
mydestination = $myhostname, localhost.$mydomain
defer_transports =
disable_dns_lookups     =     no
relayhost =
mailbox_command =    /usr/lib/dovecot/deliver
mailbox_transport = dovecot
strict_8bitmime = no
disable_mime_output_conversion     =     no
smtpd_sender_restrictions     =     hash:/etc/postfix/access
smtpd_client_restrictions =
smtpd_helo_required = yes
smtpd_helo_name    =    $myhostname
smtpd_helo_restrictions =
strict_rfc821_envelopes = no
smtp_sasl_auth_enable     =     no
smtpd_sasl_auth_enable     =     yes
smtpd_use_tls     =     no
smtp_use_tls     =     no
alias_maps     =     hash:/etc/aliases
mailbox_size_limit     =     102400000
message_size_limit     =     10240000
smtpd_sasl_exceptions_networks    =    $mynetworks
smtpd_sasl_security_options    =    noanonymous
smtpd_sasl_auth_clients    =    yes
smtpd_sasl_type    =    dovecot
smtpd_sasl_path    =    /var/spool/postfix/private/dovecot
###smtpd_sasl_path    =    private/auth

##smtpd_tls_cert_file    =    /etc/ssl/certs/ssl-cert-snakeoil.pem
##smtpd_tls_key_file    =    /etc/ssl/private/ssl-cert-snakeoil.key
##smtpd_use_tls    =    yes
smtpd_tls_session_cache_database     =     btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database     =     btree:${queue_directory}/smtp_scache

smtpd_recipient_restrictions    = permit_mynetworks    permit_sasl_authenticated    reject_unauth_destination    check_relay_domains

dovecot.conf

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

base_dir = /var/run/dovecot/
protocols =     pop3
#  protocol imap {
#     listen = *:10143
#     ssl_listen = *:10943
#     ..
#   }
#   protocol pop3 {
#     listen = *:10100
#     ..
#   }
listen = *
disable_plaintext_auth = no
shutdown_clients = yes
##
## Logging
##

# Log file to use for error messages, instead of sending them to syslog.
# /dev/stderr can be used to log into stderr.
log_path     =    /var/log/dovecot

# Log file to use for informational and debug messages.
# Default is the same as log_path.
info_log_path     = /var/log/dovecot

# Prefix for each line written to log file. % codes are in strftime(3)
# format.
log_timestamp = "%Y-%m-%d %H:%M:%S "
login_log_format_elements = user=<%u> method=%m rip=%r lip=%l %c
syslog_facility = mail

##
## SSL settings
##

# IP or host address where to listen in for SSL connections. Defaults
# to above if not specified.
ssl_listen =* ###################################

# Disable SSL/TLS support.
ssl_disable = yes  #################
##ssl_cert_file = /etc/ssl/certs/aol1.pem ###########
##ssl_key_file = /etc/ssl/private/aol1.key ############

# If key file is password protected, give the password here. Alternatively
# give it when starting dovecot with -p parameter.
#ssl_key_password =

##
## Login processes
##
login_chroot = yes

login_user = dovecot

##
## Mailbox locations and namespaces
##


# There are a few special variables you can use, eg.:
#
#   %u - username
#   %n - user part in user@domain, same as %u if there's no domain
#   %d - domain part in user@domain, empty if there's no domain
#   %h - home directory
#
# See doc/wiki/Variables.txt for full list. Some examples:
#
#   mail_location = maildir:~/Maildir
#   mail_location = mbox:~/mail:INBOX=/var/mail/%u
#   mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
mail_location = maildir:/var/mail/%u/Maildir:INDEX=/var/mail/%u
#
# <doc/wiki/MailLocation.txt>
#
mail_access_groups     =    mail
######mail_extra_groups = mail

# полный доступ в пределах почтового ящика
mail_full_filesystem_access = no

##
## Mail processes
##

# Enable mail process debugging. This can help you figure out why Dovecot
# isn't finding your mails.
#mail_debug = no

# Log prefix for mail processes. See doc/wiki/Variables.txt for list of
# possible variables you can use.
#mail_log_prefix = "%Us(%u): "
dotlock_use_excl = yes ############
# Show more verbose process titles (in ps). Currently shows user name and
# IP address. Useful for seeing who are actually using the IMAP processes
# (eg. shared mailboxes or if same uid is used for multiple accounts).
verbose_proctitle = yes  ############


first_valid_gid = 65534
first_valid_uid    =    65534
##last_valid_gid = 0
##
## Maildir-specific settings
##
# When copying a message, do it with hard links whenever possible. This makes
# the performance much better, and it's unlikely to have any side effects.
maildir_copy_with_hardlinks = yes

##
## mbox-specific settings

##
## IMAP specific settings
##

protocol imap {
  # Login executable location.
  ##login_executable = /usr/lib/dovecot/imap-login    #########


  mail_plugin_dir = /usr/lib/dovecot/modules/imap  #######################

  #imap_client_workarounds = outlook-idle
 login_greeting_capability = yes  #############
  imap_client_workarounds = delay-newmail netscape-eoh tb-extra-mailbox-sep


}

##
# POP3 specific settings
##

protocol pop3 {
 pop3_uidl_format = %08Xu%08Xv
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh





  mail_plugin_dir = /usr/lib/dovecot/modules/pop3        #################


##
## LDA specific settings
##

protocol lda {
 postmaster_address = 8virus8@mail.ru
  sendmail_path = /usr/sbin/sendmail
  # Address to use when sending rejection mails.
  #########postmaster_address = postmaster@example.com

  # Hostname to use in various parts of sent mails, eg. in Message-Id.
  # Default is the system's real hostname.
  #hostname =

  # Support for dynamically loadable plugins. mail_plugins is a space separated
  # list of plugins to load.
  #mail_plugins =
  mail_plugin_dir = /usr/lib/dovecot/modules/lda

  # Binary to use for sending mails.
  #sendmail_path = /usr/lib/sendmail

  # UNIX socket path to master authentication server to find users.
  auth_socket_path = /var/run/dovecot/auth-master
}

##
## Authentication processes
##cram-md5

# Executable location
#auth_executable = /usr/lib/dovecot/dovecot-auth       ######################
auth_username_format = %Lu   ###########
######auth default {
 #####mechanisms     =     plain     login sram-md5

# set this value to empty.
auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@

# Username character translations before it's looked up from databases. The
# value contains series of from -> to characters. For example "#@/@" means
# that '#' and '/' characters are translated to '@'.
auth_username_translation =#@/@

# Username to use for users logging in with ANONYMOUS SASL mechanism
auth_anonymous_username = anonymous


auth default {

  mechanisms     = cram-md5     login     plain   ##login


  #passdb passwd-file {
    # File contains a list of usernames, one per line
    #args = /etc/dovecot.deny
    #deny = yes
  #}


  # PAM-like authentication for OpenBSD.
  # <doc/wiki/PasswordDatabase.BSDAuth.txt>
  #passdb bsdauth {
    # [cache_key=<key>] - See cache_key in PAM for explanation.
    #args =
  #}

  # passwd-like file with specified location
  # <doc/wiki/AuthDatabase.PasswdFile.txt>
  #passdb passwd-file {
    # Path for passwd-file
    #args =
  #}

  # checkpassword executable authentication
  # NOTE: You will probably want to use "userdb prefetch" with this.
  # <doc/wiki/PasswordDatabase.CheckPassword.txt>
  #passdb checkpassword {
    # Path for checkpassword binary
    #args =
  #}

  # SQL database <doc/wiki/AuthDatabase.SQL.txt>
  passdb sql {
    # Path for SQL configuration file, see doc/dovecot-sql-example.conf
    #args =
args = /etc/dovecot/dovecot-sql.conf

  }

  # LDAP database <doc/wiki/AuthDatabase.LDAP.txt>
  #passdb ldap {
    # Path for LDAP configuration file, see doc/dovecot-ldap-example.conf
    #args =
  #}

  # vpopmail authentication <doc/wiki/AuthDatabase.VPopMail.txt>
  #passdb vpopmail {
    # [cache_key=<key>] - See cache_key in PAM for explanation.
    #args =
  #}

  #
  # User database specifies where mails are located and what user/group IDs
  # own them. For single-UID configuration use "static".
  #
  # <doc/wiki/UserDatabase.txt>
  #

  # System users (NSS, /etc/passwd, or similiar). In many systems nowadays this
  # uses Name Service Switch, which is configured in /etc/nsswitch.conf.
  # <doc/wiki/AuthDatabase.Passwd.txt>
  userdb passwd {
    # [blocking=yes] - By default the lookups are done in the main dovecot-auth
    # process. This setting causes the lookups to be done in auth worker
    # proceses. Useful with remote NSS lookups that may block.
    # NOTE: Be sure to use this setting with nss_ldap or users might get
    # logged in as each others!
    #args =

  }

  # passwd-like file with specified location
  # <doc/wiki/AuthDatabase.PasswdFile.txt>
  #userdb passwd-file {
    # Path for passwd-file
    #args =
  #}



  # SQL database <doc/wiki/AuthDatabase.SQL.txt>
  userdb sql {
    # Path for SQL configuration file, see doc/dovecot-sql-example.conf
    #args =
args = /etc/dovecot/dovecot-sql.conf
  }

  # LDAP database <doc/wiki/AuthDatabase.LDAP.txt>
  #userdb ldap {
    # Path for LDAP configuration file, see doc/dovecot-ldap-example.conf
    #args =
  #}


  # Directory where to chroot the process. Most authentication backends don't
  # work if this is set, and there's no point chrooting if auth_user is root.
  # Note that valid_chroot_dirs isn't needed to use this setting.
  #chroot =

  # Number of authentication processes to create
  #count = 1

  # Require a valid SSL client certificate or the authentication fails.
  #ssl_require_client_cert = no

  # Take the username from client's SSL certificate, using
  # X509_NAME_get_text_by_NID() which returns the subject's DN's
  # CommonName.
  #ssl_username_from_cert = no

  # It's possible to export the authentication interface to other programs:
  socket listen {
    master {
      # Master socket provides access to userdb information. It's typically
      # used to give Dovecot's local delivery agent access to userdb so it
      # can find mailbox locations.
      path = /var/run/dovecot/auth-master
      mode     =     0660
      # Default user/group is the one who started dovecot-auth (root)
      user = dovecot
      group = mail
    }
##user = nobody
  ##socket listen {
    ##master {
     ## path = /var/run/dovecot/auth-client
     ## mode = 0666
   ## }

    client {
      # The client socket is generally safe to export to everyone. Typical use
      # is to export it to your SMTP server so it can do SMTP AUTH lookups
      # using it.
      ##path = /var/run/dovecot/auth-client
#path = /var/run/dovecot/login
      mode = 0660
 path = /var/spool/postfix/private/auth
     mode = 0660
      user = postfix
      group = postfix

    }
  }
}

# If you wish to use another authentication server than dovecot-auth, you can
# use connect sockets. They are assumed to be already running, Dovecot's master
# process only tries to connect to them. They don't need any other settings
# than the path for the master socket, as the configuration is done elsewhere.
# Note that the client sockets must exist in the login_dir.
#auth external {
#  socket connect {
#    master {
#      path = /var/run/dovecot/auth-master
#    }
#  }
#}

Посмотрите плиз где я напортачил))И еще просьба у кого подобная связка работает выложите конфиги сюда для примеру
ЗЫ: лог довекота

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

dovecot: 2009-12-11 16:10:14 Error: Auth process died too early - shutting down
dovecot: 2009-12-11 16:10:14 Error: child 11045 (auth) returned error 89
dovecot: 2009-12-11 16:11:32 Info: Dovecot v1.0.13 starting up
dovecot: 2009-12-11 16:11:32 Error: auth(default): Unknown authentication mechanism 'plain    '
dovecot: 2009-12-11 16:11:32 Error: Auth process died too early - shutting down
dovecot: 2009-12-11 16:11:32 Error: child 11079 (auth) returned error 89
dovecot: 2009-12-11 16:12:21 Info: Dovecot v1.0.13 starting up
dovecot: 2009-12-11 16:12:21 Error: auth(default): Unknown authentication mechanism 'plain    '
dovecot: 2009-12-11 16:12:21 Error: Auth process died too early - shutting down
dovecot: 2009-12-11 16:12:21 Error: child 11110 (auth) returned error 89
dovecot: 2009-12-11 16:14:48 Info: Dovecot v1.0.13 starting up
dovecot: 2009-12-11 16:14:48 Error: auth(default): Unknown authentication mechanism 'cram-md5    '
dovecot: 2009-12-11 16:14:48 Error: Auth process died too early - shutting down
dovecot: 2009-12-11 16:14:48 Error: child 11147 (auth) returned error 89
dovecot: 2009-12-11 16:24:46 Info: Dovecot v1.0.13 starting up
dovecot: 2009-12-11 16:24:47 Error: auth(default): Unknown authentication mechanism 'cram-md5    '
dovecot: 2009-12-11 16:24:47 Error: Auth process died too early - shutting down
dovecot: 2009-12-11 16:24:47 Error: child 11234 (auth) returned error 89
dovecot: 2009-12-11 16:32:57 Info: Dovecot v1.0.13 starting up
dovecot: 2009-12-11 16:32:57 Error: auth(default): Unknown authentication mechanism 'cram-md5    '
dovecot: 2009-12-11 16:32:57 Error: Auth process died too early - shutting down
dovecot: 2009-12-11 16:32:57 Error: child 11327 (auth) returned error 89


маил лог

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

Dec 11 15:32:04 mail postfix/pipe[10627]: warning: deliver_request_get: error receiving common attributes
Dec 11 15:32:05 mail postfix/master[10209]: warning: process /usr/lib/postfix/smtpd pid 10626 exit status 1
Dec 11 15:32:05 mail postfix/master[10209]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
Dec 11 15:52:05 mail postfix/smtpd[10738]: fatal: no SASL authentication mechanisms
Dec 11 15:52:05 mail postfix/pipe[10739]: warning: unexpected end-of-input from dovecot socket while reading input attribute name
Dec 11 15:52:05 mail postfix/pipe[10739]: warning: deliver_request_get: error receiving common attributes
Dec 11 15:52:06 mail postfix/master[10209]: warning: process /usr/lib/postfix/smtpd pid 10738 exit status 1
Dec 11 15:52:06 mail postfix/master[10209]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
Dec 11 16:32:04 mail postfix/smtpd[11296]: fatal: no SASL authentication mechanisms
Dec 11 16:32:04 mail postfix/pipe[11297]: warning: unexpected end-of-input from dovecot socket while reading input attribute name
Dec 11 16:32:04 mail postfix/pipe[11297]: warning: deliver_request_get: error receiving common attributes
Dec 11 16:32:05 mail postfix/master[10209]: warning: process /usr/lib/postfix/smtpd pid 11296 exit status 1
Dec 11 16:32:05 mail postfix/master[10209]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
Dec 11 16:35:25 mail postfix/smtpd[11363]: fatal: no SASL authentication mechanisms
Dec 11 16:35:25 mail postfix/pipe[11364]: warning: unexpected end-of-input from dovecot socket while reading input attribute name
Dec 11 16:35:25 mail postfix/pipe[11364]: warning: deliver_request_get: error receiving common attributes
Dec 11 16:35:26 mail postfix/master[10209]: warning: process /usr/lib/postfix/smtpd pid 11363 exit status 1
Dec 11 16:35:26 mail postfix/master[10209]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling

Руту через echo сообщения шлет а юзер юзеру нехочет
ps: просьба сильно не пинать почтовик первый раз настриваю)))
МУСИ ПУСИ OPENSUSE
Спасибо сказали:
Аватара пользователя
strah
Сообщения: 283
ОС: Freebsd, linux, Solaris.

Re: Неполучается подружитьpostfix+dovecot+mysql

Сообщение strah »

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

rror: auth(default): Unknown authentication mechanism 'plain    '

Ты после "plain" табуляцию поставил, да?

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

Error: auth(default): Unknown authentication mechanism 'cram-md5    '

Аналогично. Попробуй заменить табуляцию на пробелы.
/earth: file system full
Спасибо сказали:
Аватара пользователя
VIRUS_T
Сообщения: 84

Re: Неполучается подружитьpostfix+dovecot+mysql

Сообщение VIRUS_T »

Судя по логу еще немного осталось мучений)))

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

Dec 14 11:58:05 mail postfix/master[7124]: terminating on signal 15
Dec 14 11:58:07 mail postfix/postfix-script[7433]: warning: group or other writable: /etc/postfix/./virt_mailbox.cf~
Dec 14 11:58:07 mail postfix/postfix-script[7434]: warning: group or other writable: /etc/postfix/./virt_mailbox.cf.db
Dec 14 11:58:07 mail postfix/postfix-script[7448]: starting the Postfix mail system
Dec 14 11:58:08 mail postfix/master[7449]: daemon started -- version 2.5.1, configuration /etc/postfix
Dec 14 11:58:08 mail postfix/qmgr[7461]: 24D9ECD88: from=<test1@kovteplo.gov>, size=532, nrcpt=1 (queue active)
Dec 14 11:58:08 mail postfix/qmgr[7461]: 22AC5CD81: from=<test1@kovteplo.gov>, size=692, nrcpt=1 (queue active)
Dec 14 11:58:08 mail postfix/qmgr[7461]: 1A943CD86: from=<test1@kovteplo.gov>, size=523, nrcpt=1 (queue active)
Dec 14 11:58:08 mail postfix/qmgr[7461]: 1BD31CD84: from=<test1@kovteplo.gov>, size=692, nrcpt=1 (queue active)
Dec 14 11:58:08 mail postfix/qmgr[7461]: 04312CD87: from=<test1@kovteplo.gov>, size=524, nrcpt=1 (queue active)
Dec 14 11:58:08 mail postfix/qmgr[7461]: C2893CD78: from=<test1@kovteplo.gov>, size=518, nrcpt=1 (queue active)
Dec 14 11:58:08 mail postfix/qmgr[7461]: 9A29ACD7C: from=<test1@kovteplo.gov>, size=692, nrcpt=1 (queue active)
Dec 14 11:58:08 mail postfix/qmgr[7461]: B7A20CD83: from=<test1@kovteplo.gov>, size=692, nrcpt=1 (queue active)
Dec 14 11:58:08 mail postfix/qmgr[7461]: F2AEACD89: from=<test1@kovteplo.gov>, size=544, nrcpt=1 (queue active)
Dec 14 11:58:08 mail postfix/qmgr[7461]: 67A92CD82: from=<test1@kovteplo.gov>, size=692, nrcpt=1 (queue active)
Dec 14 11:58:08 mail pipe[7470]: fatal: pipe_command: execvp /usr/sbin/dovecot/deliver: Not a directory
Dec 14 11:58:08 mail postfix/qmgr[7461]: 69C29CD85: from=<test1@kovteplo.gov>, size=692, nrcpt=1 (queue active)
Dec 14 11:58:08 mail pipe[7473]: fatal: pipe_command: execvp /usr/sbin/dovecot/deliver: Not a directory
Dec 14 11:58:09 mail pipe[7475]: fatal: pipe_command: execvp /usr/sbin/dovecot/deliver: Not a directory
Dec 14 11:58:09 mail pipe[7477]: fatal: pipe_command: execvp /usr/sbin/dovecot/deliver: Not a directory
Dec 14 11:58:09 mail postfix/pipe[7468]: 24D9ECD88: to=<test1@kovteplo.gov>, relay=dovecot, delay=3970, delays=3970/0.19/0/0.62, dsn=4.3.0, status=deferred (temporary failure. Command output: pipe: fatal: pipe_command: execvp /usr/sbin/dovecot/deliver: Not a directory )
Dec 14 11:58:09 mail pipe[7480]: fatal: pipe_command: execvp /usr/sbin/dovecot/deliver: Not a directory
Dec 14 11:58:09 mail pipe[7481]: fatal: pipe_command: execvp /usr/sbin/dovecot/deliver: Not a directory
Dec 14 11:58:09 mail postfix/pipe[7469]: 22AC5CD81: to=<test@kovteplo.gov>, relay=dovecot, delay=8379, delays=8378/0.18/0/0.69, dsn=4.3.0, status=deferred (temporary failure. Command output: pipe: fatal: pipe_command: execvp /usr/sbin/dovecot/deliver: Not a directory )
Dec 14 11:58:09 mail pipe[7483]: fatal: pipe_command: execvp /usr/sbin/dovecot/deliver: Not a directory
Dec 14 11:58:09 mail pipe[7486]: fatal: pipe_command: execvp /usr/sbin/dovecot/deliver: Not a directory
Dec 14 11:58:09 mail postfix/pipe[7474]: 1BD31CD84: to=<test@kovteplo.gov>, relay=dovecot, delay=8378, delays=8377/0.47/0/0.6, dsn=4.3.0, status=deferred (temporary failure. Command output: pipe: fatal: pipe_command: execvp /usr/sbin/dovecot/deliver: Not a directory )
Dec 14 11:58:09 mail pipe[7487]: fatal: pipe_command: execvp /usr/sbin/dovecot/deliver: Not a directory
Dec 14 11:58:09 mail postfix/pipe[7471]: 1A943CD86: to=<test2@kovteplo.gov>, relay=dovecot, delay=8022, delays=8021/0.35/0/0.9, dsn=4.3.0, status=deferred (temporary failure. Command output: pipe: fatal: pipe_command: execvp /usr/sbin/dovecot/deliver: Not a directory )
Dec 14 11:58:10 mail pipe[7488]: fatal: pipe_command: execvp /usr/sbin/dovecot/deliver: Not a directory
Dec 14 11:58:10 mail postfix/pipe[7476]: 04312CD87: to=<test2@kovteplo.gov>, relay=dovecot, delay=6918, delays=6917/0.64/0/0.75, dsn=4.3.0, status=deferred (temporary failure. Command output: pipe: fatal: pipe_command: execvp /usr/sbin/dovecot/deliver: Not a directory )
Dec 14 11:58:10 mail pipe[7490]: fatal: pipe_command: execvp /usr/sbin/dovecot/deliver: Not a directory
Dec 14 11:58:10 mail postfix/pipe[7468]: C2893CD78: to=<test@kovteplo.gov>, relay=dovecot, delay=8381, delays=8379/0.66/0/0.81, dsn=4.3.0, status=deferred (temporary failure. Command output: pipe: fatal: pipe_command: execvp /usr/sbin/dovecot/deliver: Not a directory )
Dec 14 11:58:10 mail postfix/pipe[7469]: 9A29ACD7C: to=<test@kovteplo.gov>, relay=dovecot, delay=8380, delays=8378/0.79/0/0.71, dsn=4.3.0, status=deferred (temporary failure. Command output: pipe: fatal: pipe_command: execvp /usr/sbin/dovecot/deliver: Not a directory )
Dec 14 11:58:10 mail postfix/pipe[7474]: F2AEACD89: to=<test2@kovteplo.gov>, relay=dovecot, delay=648, delays=647/1/0/0.52, dsn=4.3.0, status=deferred (temporary failure. Command output: pipe: fatal: pipe_command: execvp /usr/sbin/dovecot/deliver: Not a directory )
Dec 14 11:58:10 mail postfix/pipe[7471]: 67A92CD82: to=<test@kovteplo.gov>, relay=dovecot, delay=8379, delays=8377/1.2/0/0.39, dsn=4.3.0, status=deferred (temporary failure. Command output: pipe: fatal: pipe_command: execvp /usr/sbin/dovecot/deliver: Not a directory )
Dec 14 11:58:10 mail postfix/pipe[7479]: B7A20CD83: to=<test@kovteplo.gov>, relay=dovecot, delay=8379, delays=8377/0.89/0/0.68, dsn=4.3.0, status=deferred (temporary failure. Command output: pipe: fatal: pipe_command: execvp /usr/sbin/dovecot/deliver: Not a directory )
Dec 14 11:58:10 mail postfix/pipe[7476]: 69C29CD85: to=<test@kovteplo.gov>, relay=dovecot, delay=8378, delays=8376/1.4/0/0.22, dsn=4.3.0, status=deferred (temporary failure. Command output: pipe: fatal: pipe_command: execvp /usr/sbin/dovecot/deliver: Not a directory )

теперь письма уходят адресату
но вот это Dec 14 11:58:10 mail postfix/pipe[7474]: F2AEACD89: to=<test2@kovteplo.gov>, relay=dovecot, delay=648, delays=647/1/0/0.52, dsn=4.3.0, status=deferred (temporary failure. Command output: pipe: fatal: pipe_command: execvp /usr/sbin/dovecot/deliver: Not a directory )
что такое?

и при приеме почты из клиента Сбой идентификации при помощи SASL (LOGIN). Либо сервер не поддерживает LOGIN, либо был указан неверный пароль.Temporary authentication failure пишет
пароль указан верно, метод тоже login
чего нехватает?))
МУСИ ПУСИ OPENSUSE
Спасибо сказали:
Аватара пользователя
Frank
Сообщения: 1059
ОС: Ubuntu, Debian

Re: Неполучается подружитьpostfix+dovecot+mysql

Сообщение Frank »

/usr/sbin/dovecot/deliver, в который хотели положить файл сообщения, оказался файлом, а не папкой.
Изображение
Спасибо сказали:
Аватара пользователя
VIRUS_T
Сообщения: 84

Re: Неполучается подружитьpostfix+dovecot+mysql

Сообщение VIRUS_T »

Frank писал(а):
14.12.2009 12:22
/usr/sbin/dovecot/deliver, в который хотели положить файл сообщения, оказался файлом, а не папкой.

чего то не могу найти где это исправить. Этого пути в кофигах не фигурирует если только здесь debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
МУСИ ПУСИ OPENSUSE
Спасибо сказали:
Аватара пользователя
VIRUS_T
Сообщения: 84

Re: Неполучается подружитьpostfix+dovecot+mysql

Сообщение VIRUS_T »

VIRUS_T писал(а):
14.12.2009 14:41
Frank писал(а):
14.12.2009 12:22
/usr/sbin/dovecot/deliver, в который хотели положить файл сообщения, оказался файлом, а не папкой.

чего то не могу найти где это исправить. Этого пути в кофигах не фигурирует если только здесь debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5

Ой нашел... )))
вопросы еще будут, заранее благодарю
МУСИ ПУСИ OPENSUSE
Спасибо сказали:
Аватара пользователя
VIRUS_T
Сообщения: 84

Re: Неполучается подружитьpostfix+dovecot+mysql

Сообщение VIRUS_T »

Итак ... пришел к
postconf -n

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

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
biff = no
canonical_maps = hash:/etc/postfix/canonical
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
defer_transports =
disable_dns_lookups = no
disable_mime_output_conversion = no
header_checks = regexp:/etc/postfix/header_checks
home_mailbox = Maildir/
html_directory = /usr/share/doc/packages/postfix/html
inet_interfaces = all
inet_protocols = ipv4
local_recipient_maps = unix:passwd.byname $alias_maps
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_command = /usr/lib/dovecot/deliver
mailbox_size_limit = 102400000
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains =
masquerade_exceptions = root
message_size_limit = 10240000
mydestination = $myhostname, localhost
mydomain = kovteplo.gov
myhostname = mail.kovteplo.gov
mynetworks = 127.0.0.0/8
mynetworks_style = host
myorigin = $myhostname
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix/README_FILES
relayhost =
relocated_maps = hash:/etc/postfix/relocated
sample_directory = /usr/share/doc/packages/postfix/samples
sender_canonical_maps = hash:/etc/postfix/sender_canonical
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtp_sasl_auth_enable = no
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtp_use_tls = no
smtpd_banner = $myhostname MDaemon 7.1.2 on Windows 2000 Server READY
smtpd_client_restrictions =
smtpd_helo_required = yes
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_mynetworks        permit_sasl_authenticated       reject_unauth_destination       check_relay_domains
smtpd_sasl_auth_enable = yes
smtpd_sasl_exceptions_networks = $mynetworks
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtpd_use_tls = no
strict_8bitmime = no
strict_rfc821_envelopes = no
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_domains = hash:/etc/postfix/virtual
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_gid_maps = static:65535
virtual_mailbox_base = /var/spool/postfix/vmail/$mydomain
virtual_mailbox_domains = mysql:/etc/postfix/sql/virtual_mailbox_domain.cf
virtual_mailbox_maps = mysql:/etc/postfix/sql/virtual_mailbox_recipients.cf
virtual_minimum_uid = 65535
virtual_transport = dovecot
virtual_uid_maps = static:65535

master.conf /'это та строчка которую я там изменил/

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

dovecot    unix -       n       n       -       -       pipe
 flags=DRhu user=mail:mail argv=/usr/lib/dovecot/deliver -d ${user}

dovecot -n

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

base_dir: /var/run/dovecot/
log_path: /var/log/dovecot
info_log_path: /var/log/dovecot
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: pop3 imap imaps pop3s
ssl_listen: *
ssl_disable: yes
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(pop3): /usr/lib/dovecot/pop3-login
login_greeting_capability(default): yes
login_greeting_capability(imap): yes
login_greeting_capability(pop3): no
verbose_proctitle: yes
first_valid_uid: 65535
first_valid_gid: 65535
mail_access_groups: mail
mail_privileged_group: mail
mail_location: maildir:/var/spool/postfix/vmail/%d/%u/
mail_debug: yes
dotlock_use_excl: yes
maildir_copy_with_hardlinks: yes
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
imap_client_workarounds(default): delay-newmail netscape-eoh tb-extra-mailbox-sep
imap_client_workarounds(imap): delay-newmail netscape-eoh tb-extra-mailbox-sep
imap_client_workarounds(pop3): outlook-idle
pop3_uidl_format(default):
pop3_uidl_format(imap):
pop3_uidl_format(pop3): %08Xu%08Xv
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
auth default:
  mechanisms: login plain cram-md5
  username_format: %n@%d
  debug: yes
  passdb:
    driver: sql
    args: /etc/dovecot/dovecot-sql.conf
  userdb:
    driver: sql
    args: /etc/dovecot/dovecot-sql.conf
  socket:
    type: listen
    client:
      path: /var/spool/postfix/private/auth
      mode: 432
      user: postfix
      group: postfix
    master:
      path: /var/run/dovecot/auth-master
      mode: 432
      user: dovecot
      group: mail


Практически все хорошо)))..но))
если в main.conf параметр virtual_transport = virtual то почто уходит , ящики создает , все хорошо, ставлю dovecot то
вот лог

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

Dec 16 11:41:47 mail postfix/postfix-script[7362]: starting the Postfix mail system
Dec 16 11:41:48 mail postfix/master[7363]: daemon started -- version 2.5.1, configuration /etc/postfix
Dec 16 11:42:10 mail postfix/smtpd[7391]: connect from localhost[127.0.0.1]
Dec 16 11:42:10 mail postfix/smtpd[7391]: C6D05CD7C: client=localhost[127.0.0.1]
Dec 16 11:42:10 mail postfix/cleanup[7395]: C6D05CD7C: message-id=<200912161142.09538.test1@kovteplo.gov>
Dec 16 11:42:10 mail postfix/qmgr[7376]: C6D05CD7C: from=<test1@kovteplo.gov>, size=528, nrcpt=1 (queue active)
Dec 16 11:42:11 mail postfix/smtpd[7391]: disconnect from localhost[127.0.0.1]
Dec 16 11:42:11 mail postfix/pipe[7396]: C6D05CD7C: to=<test2@kovteplo.gov>, relay=dovecot, delay=0.51, delays=0.21/0.05/0/0.26, dsn=5.1.1, status=bounced (user unknown)
Dec 16 11:42:11 mail postfix/cleanup[7395]: 3B9E6CD86: message-id=<20091216084211.3B9E6CD86@mail.kovteplo.gov>
Dec 16 11:42:11 mail postfix/bounce[7398]: C6D05CD7C: sender non-delivery notification: 3B9E6CD86
Dec 16 11:42:11 mail postfix/qmgr[7376]: C6D05CD7C: removed
Dec 16 11:42:11 mail postfix/qmgr[7376]: 3B9E6CD86: from=<>, size=2238, nrcpt=1 (queue active)
Dec 16 11:42:11 mail postfix/pipe[7396]: 3B9E6CD86: to=<test1@kovteplo.gov>, relay=dovecot, delay=0.27, delays=0.11/0/0/0.16, dsn=5.1.1, status=bounced (user unknown)
Dec 16 11:42:11 mail postfix/qmgr[7376]: 3B9E6CD86: removed

то есть почта не отсылается в чем может быть дело?
МУСИ ПУСИ OPENSUSE
Спасибо сказали: