Проблема после установки Postfix

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

Модератор: xM

Правила форума
Убедительная просьба юзать теги [code] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
Dj-Snegir
мл. сержант
Сообщения: 110
Зарегистрирован: 2008-08-07 14:26:30

Проблема после установки Postfix

Непрочитанное сообщение Dj-Snegir » 2008-12-15 17:51:06

Hi All. OS FreeBSD

Решил поднять Postfix по одной теме из архивов.

http://www.lissyara.su/?id=1019

Установка прошла успешно однако в логах пишет -

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

postfix/qmgr[754]: fatal unsupported dictionary type: mysql
postfix/cleanup[755]: fatal: unsupported dictionary type: mysql
Погуглив увидел что ошибка такая возникает когда postfix собирают без поддержки mysql.
Однако собран postfix с поддержкой mysql.
Пробовал переустановить postfix - результат всё тот же .
Может у кого возникал данный косяк?

Хостинговая компания 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/

Аватара пользователя
Fastman
ст. лейтенант
Сообщения: 1236
Зарегистрирован: 2006-07-07 10:20:38
Откуда: Минск. РБ

Re: Проблема после установки Postfix

Непрочитанное сообщение Fastman » 2008-12-15 20:10:11

покажи
ну и я конечно верю что он у тя собран с mysql но на всякий случай дай вывод:

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

postconf -m
Главное в жизни здоровье и любовь, остальное я все куплю.

Dj-Snegir
мл. сержант
Сообщения: 110
Зарегистрирован: 2008-08-07 14:26:30

Re: Проблема после установки Postfix

Непрочитанное сообщение Dj-Snegir » 2008-12-16 9:20:49

postconf -m

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

btree
cdb
cidr
environ
hash
nis
proxy
regexp
static
unix
Ниже привожу main.cf скриншот где отмечал галочкой MySQL =)
Последний раз редактировалось Dj-Snegir 2008-12-16 9:44:49, всего редактировалось 2 раза.

Dj-Snegir
мл. сержант
Сообщения: 110
Зарегистрирован: 2008-08-07 14:26:30

Re: Проблема после установки Postfix

Непрочитанное сообщение Dj-Snegir » 2008-12-16 9:21:28

main.cf

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

#
queue_directory = /var/spool/postfix

#
command_directory = /usr/local/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/local/libexec/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/db/postfix

#
mail_owner = postfix

# 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.FreeBSDComp.lan
#myhostname = virtual.domain.tld

#
mydomain = FreeBSDComp.lan

#myorigin = $myhostname
myorigin = $mydomain


#
mydestination = $myhostname, localhost.$mydomain, mail.$mydomain, FreeBSDComp.lan, localhost
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
#	mail.$mydomain, www.$mydomain, ftp.$mydomain


unknown_local_recipient_reject_code = 550

# TRUST AND RELAY CONTROL

#mynetworks_style = class
#mynetworks_style = subnet
mynetworks_style = host

#
mynetworks = 168.168.0.0/24, 127.0.0.0/8
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/usr/local/etc/postfix/network_table

# The default relay_domains value is $mydestination.
smtp_recipient_restrictions =
    permit_mynetworks,
    reject_non_fqdn_hostname,
    reject_non_fqdn_sender,
    reject_unauth_destination,
    reject_unauth_pipelining,
    reject_invalid_hostname,
    reject_rbl_client list.dbsl.org
    reject_rbl_client bl.spamcop.net
    reject_rbl_client sbl-xbl.spamhaus.org
content_filter = scan:127.0.0.1:10025
recive_override_options = no_address_mappings


relay_domains = mysql:/usr/local/etc/postfix/mysql_relay_domains_maps.cf
virtual_alias_maps = mysql:/usr/local/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:125
virtual_mailbox_base = /var/spool/postfix/virtual
virtual_mailbox_domains = mysql:/usr/local/etc/postfix/mysql/mysql_relay_domains_maps.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_maps = mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 125
virtual_transport = virtual
virtual_uid_maps = static:125
# QUOTA
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Mailbox is full need delete
virtual_overquota_bounce = yes
transport_map = mysql:/usr/local/etc/postfix/mysql_virtual_domains_maps.cf
message_size_limit = 10240000
smtpd_recipient_limit = 5





# 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:/usr/local/etc/postfix/relay_recipients

#
# See the discussion in the ADDRESS_REWRITING_README document.

# ALIAS DATABASE

#
#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
#
#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:/usr/local/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/local/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/local/bin/newaliases

# mailq_path: The full pathname of the Postfix mailq command.  This
# is the Sendmail-compatible mail queue listing command.
# 
mailq_path = /usr/local/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 = no

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

# sample_directory: The location of the Postfix sample configuration files.
# This parameter is obsolete as of Postfix 2.1.
#
sample_directory = /usr/local/etc/postfix

# readme_directory: The location of the Postfix README files.
#
readme_directory = no

Dj-Snegir
мл. сержант
Сообщения: 110
Зарегистрирован: 2008-08-07 14:26:30

Re: Проблема после установки Postfix

Непрочитанное сообщение Dj-Snegir » 2008-12-16 9:25:34

cd /usr/ports/mail/postfix/
make config
Вложения
postfix.JPG

Dj-Snegir
мл. сержант
Сообщения: 110
Зарегистрирован: 2008-08-07 14:26:30

Re: Проблема после установки Postfix

Непрочитанное сообщение Dj-Snegir » 2008-12-16 11:03:11

MYSQL стоит версия 5.0.51...

Есть ли мысли по поводу данной ситуации ...

Аватара пользователя
Fastman
ст. лейтенант
Сообщения: 1236
Зарегистрирован: 2006-07-07 10:20:38
Откуда: Минск. РБ

Re: Проблема после установки Postfix

Непрочитанное сообщение Fastman » 2008-12-16 11:47:53

Dj-Snegir писал(а):postconf -m

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

btree
cdb
cidr
environ
hash
nis
proxy
regexp
static
unix
Ниже привожу main.cf скриншот где отмечал галочкой MySQL =)

Ну и где вы тут MySQL увидели ? :)
Вот джопустим мой вывод:

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

postconf -m
btree
cidr
environ
hash
mysql
pcre
proxy
regexp
static
unix
То что вы отмечали галочками - тоже не факт :)
Не собран у вас постфикс с поддержкой MySQL.
Главное в жизни здоровье и любовь, остальное я все куплю.

Dj-Snegir
мл. сержант
Сообщения: 110
Зарегистрирован: 2008-08-07 14:26:30

Re: Проблема после установки Postfix

Непрочитанное сообщение Dj-Snegir » 2008-12-16 12:06:20

Ну и где вы тут MySQL увидели ? :)
Вот джопустим мой вывод:

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

postconf -m
btree
cidr
environ
hash
mysql
pcre
proxy
regexp
static
unix
То что вы отмечали галочками - тоже не факт :)
Не собран у вас постфикс с поддержкой MySQL.[/quote]

Да это я понял =(. После установки MysQL 5.0.51a я обновлял порты а затем начал ставить postfix может он не воспринимает Mysql тот что есть у меня ?
=( Что бы сделать то =) ?

Аватара пользователя
Fastman
ст. лейтенант
Сообщения: 1236
Зарегистрирован: 2006-07-07 10:20:38
Откуда: Минск. РБ

Re: Проблема после установки Postfix

Непрочитанное сообщение Fastman » 2008-12-16 12:23:21

делай
make config
Отмечаи галками с чем собираешь его.
Потом смотри в Makefile И проверяй действительно ли опция MySQL присутствует.
Либо руками опции забить.
Главное в жизни здоровье и любовь, остальное я все куплю.

Dj-Snegir
мл. сержант
Сообщения: 110
Зарегистрирован: 2008-08-07 14:26:30

Re: Проблема после установки Postfix

Непрочитанное сообщение Dj-Snegir » 2008-12-16 13:24:20

Специально привожу MakeFile в OPTIONS присутствует
MYSQL "MySQL maps (choose version with WITH_MYSQL_VER)"


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

# New ports collection makefile for:	postfix
# Date created:				18 Mar 1999
# Whom:					torstenb
#
# $FreeBSD: ports/mail/postfix/Makefile,v 1.141 2008/09/28 01:58:28 mnag Exp $
#

PORTNAME=	postfix
PORTVERSION=	2.5.5
PORTEPOCH=	1
CATEGORIES=	mail ipv6
MASTER_SITES=	ftp://ftp.porcupine.org/mirrors/postfix-release/official/ \
		ftp://ftp.aet.tu-cottbus.de/pub/postfix_tls/%SUBDIR%/ \
		ftp://ftp.tux.org/pub/net/postfix/official/ \
		ftp://ftp.utoronto.ca/mirror/packages/postfix/official/ \
		ftp://ftp.samurai.com/pub/postfix/official/ \
		${MASTER_SITE_RINGSERVER:S,%SUBDIR%,net/mail/postfix/official/&,}
MASTER_SITE_SUBDIR=	. old related/postfix
DISTNAME=	postfix-${PORTVERSION}
DIST_SUBDIR=	${PORTNAME}

# blanket approval for version updates: mnag@FreeBSD.org
MAINTAINER=	vivek@khera.org
COMMENT=	A secure alternative to widely-used Sendmail

CONFLICTS=	courier-0.* postfix-1.* postfix-2.[0-46-9].* postfix-current-2.* \
		sendmail-8.* sendmail-*-8.* smail-3.* zmailer-2.*

USE_SUBMAKE=	yes
USE_PERL5_BUILD=yes
USE_RC_SUBR=	postfix.sh

# back compat pull in settings from POSTFIX_OPTIONS for convenience when
# make config is run (happens first time port is built, too)
.for o in SASL2 SASLKRB SASLKRB5 SASLKRB5MIT TLS BDB MySQL PgSQL OpenLDAP CDB NIS VDA Test
STATUS_${o}=off
.endfor
.if defined(POSTFIX_OPTIONS)
. for o in ${POSTFIX_OPTIONS}
STATUS_${o}=on
. endfor
.endif

OPTIONS=	PCRE		"Perl Compatible Regular Expressions"			on \
		SASL2		"Cyrus SASLv2 (Simple Auth. and Sec. Layer)"		${STATUS_SASL2} \
		DOVECOT		"Dovecot SASL authentication method"			off \
		SASLKRB		"If your SASL req. Kerberos select this option"		${STATUS_SASLKRB} \
		SASLKRB5	"If your SASL req. Kerberos5 select this option"	${STATUS_SASLKRB5} \
		SASLKMIT	"If your SASL req. MIT Kerberos5 select this option"	${STATUS_SASLKRB5MIT} \
		TLS		"Enable SSL and TLS support"				${STATUS_TLS} \
		BDB		"Berkeley DB (choose version with WITH_BDB_VER)"	${STATUS_BDB} \
		MYSQL		"MySQL maps (choose version with WITH_MYSQL_VER)"	${STATUS_MySQL} \
		PGSQL		"PostgreSQL maps (choose with DEFAULT_PGSQL_VER)"	${STATUS_PgSQL} \
		OPENLDAP	"OpenLDAP maps (choose ver. with WITH_OPENLDAP_VER)"	${STATUS_OpenLDAP} \
		CDB		"CDB maps lookups"					${STATUS_CDB} \
		NIS		"NIS maps lookups"					${STATUS_NIS} \
		VDA		"VDA (Virtual Delivery Agent)"				${STATUS_VDA} \
		TEST		"SMTP/LMTP test server and generator"			${STATUS_Test}

MAN1=	postalias.1 postcat.1 postconf.1 postdrop.1 postfix.1 postkick.1 \
	postlock.1 postlog.1 postmap.1 postqueue.1 postsuper.1 sendmail.1 \
	qshape.1

MAN5=	access.5 aliases.5 bounce.5 canonical.5 cidr_table.5 generic.5 \
	header_checks.5 ldap_table.5 master.5 mysql_table.5 nisplus_table.5 \
	pcre_table.5 pgsql_table.5 postconf.5 regexp_table.5 relocated.5 \
	tcp_table.5 transport.5 virtual.5

MAN8=	anvil.8 bounce.8 cleanup.8 discard.8 error.8 flush.8 local.8 master.8 \
	oqmgr.8 pickup.8 pipe.8 proxymap.8 qmgr.8 qmqpd.8 scache.8 showq.8 \
	smtp.8 smtpd.8 spawn.8 tlsmgr.8 trivial-rewrite.8 verify.8 virtual.8

MLINKS=	sendmail.1 mailq.1 \
	sendmail.1 newaliases.1 \
	header_checks.5 body_checks.5 \
	bounce.8 defer.8 \
	bounce.8 trace.8 \
	smtp.8 lmtp.8

CONF1=	access aliases canonical generic header_checks main.cf master.cf \
	relocated transport virtual

.if !defined(DEBUG)
MAKEFILEFLAGS+=	DEBUG=
.endif

MAKEFILEFLAGS+=	CC="${CC}" OPT="${CFLAGS}"

SCRIPTS_ENV=	WRKDIRPREFIX="${WRKDIRPREFIX}" \
		TOUCH="${TOUCH}" \
		MKDIR="${MKDIR}"

.include <bsd.port.pre.mk>

# Default requirement for postfix rc script
_REQUIRE=	LOGIN cleanvar

.if defined(WITH_PCRE)
LIB_DEPENDS+=		pcre.0:${PORTSDIR}/devel/pcre
POSTFIX_CCARGS+=	-DHAS_PCRE -I${LOCALBASE}/include
POSTFIX_AUXLIBS+=	-L${LOCALBASE}/lib -lpcre
.else
POSTFIX_CCARGS+=	-DNO_PCRE
.endif

.if defined(WITH_SASL2)
LIB_DEPENDS+=		sasl2.2:${PORTSDIR}/security/cyrus-sasl2
POSTFIX_CCARGS+=	-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I${LOCALBASE}/include -I${LOCALBASE}/include/sasl
POSTFIX_AUXLIBS+=	-L${LOCALBASE}/lib -lsasl2 -lpam -lcrypt
.endif

.if defined(WITH_DOVECOT)
RUN_DEPENDS+=		dovecot:${PORTSDIR}/mail/dovecot
POSTFIX_CCARGS+=	-DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"
.endif

.if defined(WITH_SASLKRB)
.if defined(WITH_SASLKRB5) || defined(WITH_SASLKMIT)
BROKEN=			Select only one SASL Kerberos option
.endif
POSTFIX_AUXLIBS+=	-lkrb -lcrypto -lcom_err
.endif

.if defined(WITH_SASLKRB5)
.if defined(WITH_SASLKRB) || defined(WITH_SASLKMIT)
BROKEN=			Select only one SASL Kerberos option
.endif
POSTFIX_AUXLIBS+=	-lkrb5 -lcrypto -lcrypt -lcom_err -lasn1 -lroken
.endif

.if defined(WITH_SASLKMIT)
.if defined(WITH_SASLKRB) || defined(WITH_SASLKRB5)
BROKEN=			Select only one SASL Kerberos option
.endif
LIB_DEPENDS+=		krb5.3:${PORTSDIR}/security/krb5
POSTFIX_AUXLIBS+=	-Wl,--rpath,$${KRB5_HOME:-${LOCALBASE}}/lib -lkrb5 -lcrypto -lcrypt -lcom_err
.endif

.if defined(WITH_TLS)
.include "${PORTSDIR}/Mk/bsd.openssl.mk"
POSTFIX_CCARGS+=	-DUSE_TLS -I${OPENSSLINC}
POSTFIX_AUXLIBS+=	-L${OPENSSLLIB} ${LDFLAGS} -lssl -lcrypto
.endif

.if defined(WITH_BDB)
USE_BDB=		yes
POSTFIX_CCARGS+=	-I${BDB_INCLUDE_DIR}
POSTFIX_AUXLIBS+=	-L${BDB_LIB_DIR} -l${BDB_LIB_NAME}
.endif

.if defined(WITH_MYSQL)
USE_MYSQL=		yes
POSTFIX_CCARGS+=	-DHAS_MYSQL -I${LOCALBASE}/include/mysql
POSTFIX_AUXLIBS+=	-L${LOCALBASE}/lib/mysql -lmysqlclient -lz -lcrypt -lm
_REQUIRE+=		mysql
.endif

.if defined(WITH_PGSQL)
USE_PGSQL=		yes
POSTFIX_CCARGS+=	-DHAS_PGSQL -I${LOCALBASE}/include -I${LOCALBASE}/pgsql/include
POSTFIX_AUXLIBS+=	-L${LOCALBASE}/lib -L${LOCALBASE}/pgsql/lib -lpq -lcrypt
_REQUIRE+=		postgresql
.endif

.if defined(WITH_OPENLDAP)
USE_OPENLDAP=		yes
.if defined(WITH_OPENLDAP_VER)
WANT_OPENLDAP_VER=	${WITH_OPENLDAP_VER}
.endif
POSTFIX_CCARGS+=	-DHAS_LDAP -I${LOCALBASE}/include
POSTFIX_AUXLIBS+=	-L${LOCALBASE}/lib -lldap -llber
_REQUIRE+=		slapd
.endif

.if defined(WITH_CDB)
BUILD_DEPENDS+=		${LOCALBASE}/lib/libcdb.a:${PORTSDIR}/databases/tinycdb
POSTFIX_CCARGS+=	-DHAS_CDB -I${LOCALBASE}/include
POSTFIX_AUXLIBS+=	-L${LOCALBASE}/lib -lcdb
.endif

.if defined(WITH_NIS)
POSTFIX_CCARGS+=	-DHAS_NIS
_REQUIRE+=		ypserv
.endif

.if defined(WITH_VDA)
PATCH_SITES+=		http://vda.sourceforge.net/VDA/
PATCHFILES+=		postfix-2.5.4-vda-ng.patch.gz
PATCH_DIST_STRIP=	-p1
.endif

.if defined(WITH_TEST)
BINTEST=	qmqp-sink qmqp-source smtp-sink smtp-source
MANTEST=	qmqp-sink.1 qmqp-source.1 smtp-sink.1 smtp-source.1
MAN1+=		${MANTEST}
PLIST_SUB+=	SUB_TEST=""
.else
PLIST_SUB+=	SUB_TEST="@comment "
.endif

.if defined(NOPORTDOCS)
READMEDIR=no
.else
READMEDIR=${PREFIX}/share/doc/postfix
.endif

SUB_LIST+=	REQUIRE="${_REQUIRE}"

pre-patch:
.if defined(POSTFIX_OPTIONS)
	@${ECHO_MSG}
	@${ECHO_MSG}
	@${ECHO_MSG}
	@${ECHO_MSG} "***** ALERT *****"
	@${ECHO_MSG} "POSTFIX_OPTIONS is no longer supported,"
	@${ECHO_MSG} "${PORTNAME} uses options, consider running"
	@${ECHO_MSG} "# make config"
	@${ECHO_MSG}
	@${ECHO_MSG}
	@${ECHO_MSG}
	@sleep 10
.endif

.if defined(WITH_SASL2) && !defined(WITH_MYSQL) && exists(${LOCALBASE}/lib/libsasl2.a)
	@if /usr/bin/nm ${LOCALBASE}/lib/libsasl2.a | ${GREP} -wq "mysql_init"; then \
		${ECHO_MSG}; \
		${ECHO_MSG} "Your SASL2 library it's compiled with MYSQL"; \
		${ECHO_MSG} "If you use MYSQL in ${PORTNAME} consider CTRL+C and"; \
		${ECHO_MSG} "select MYSQL OPTION in config menu."; \
		${ECHO_MSG} "# make clean config"; \
		${ECHO_MSG}; \
		sleep 5; \
	fi
.endif

	@${ECHO} "<HTML><BODY>See <A HREF="header_checks.5.html">header_checks.5.html</A></BODY></HTML>" \
		> ${WRKSRC}/html/body_checks.5.html
	@${FIND} -P ${WRKSRC}/man -type f | ${XARGS} \
		${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g"
	@${FIND} -P ${WRKSRC}/README_FILES -type f | ${XARGS} \
		${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g"
	@${FIND} -P ${WRKSRC}/conf -type f | ${XARGS} \
		${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g"

post-patch:
# All files modified with ${FILESDIR}/patch-* to use !!PREFIX!! need REINPLACE. Put below.
	@${REINPLACE_CMD} -e "s,!!PREFIX!!,${PREFIX},g" \
		${WRKSRC}/conf/main.cf ${WRKSRC}/src/global/mail_params.h
	@${REINPLACE_CMD} -e "s|perl|${PERL}|" ${WRKSRC}/src/bounce/Makefile.in

do-configure:
	(cd ${WRKSRC} && ${MAKE} -f Makefile.init makefiles ${MAKEFILEFLAGS} \
	CCARGS="${POSTFIX_CCARGS}" AUXLIBS="${POSTFIX_AUXLIBS}" && \
	${ECHO} "all: default" >> Makefile)

pre-install:
	@${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL

do-install:
	cd ${WRKSRC}; ${SH} postfix-install -non-interactive install_root=/ tempdir=/tmp \
		config_directory=${PREFIX}/etc/postfix \
		data_directory=/var/db/postfix \
		daemon_directory=${PREFIX}/libexec/postfix \
		command_directory=${PREFIX}/sbin \
		queue_directory=/var/spool/postfix \
		sendmail_path=${PREFIX}/sbin/sendmail \
		newaliases_path=${PREFIX}/bin/newaliases \
		mailq_path=${PREFIX}/bin/mailq \
		mail_owner=postfix \
		setgid_group=maildrop \
		manpage_directory=${MANPREFIX}/man \
		sample_directory=${PREFIX}/etc/postfix \
		readme_directory=${READMEDIR}

	${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/rmail/rmail ${PREFIX}/bin/rmail

	${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/qshape/qshape.pl ${PREFIX}/bin/qshape
	${INSTALL_MAN} ${WRKSRC}/man/man1/qshape.1 ${MANPREFIX}/man/man1

.for f in ${BINTEST}
	${INSTALL_PROGRAM} ${WRKSRC}/bin/${f} ${PREFIX}/bin
.endfor
.for f in ${MANTEST}
	${INSTALL_MAN} ${WRKSRC}/man/man1/${f} ${MANPREFIX}/man/man1
.endfor

	@${MKDIR} ${PREFIX}/etc/postfix/dist
.for f in ${CONF1}
	${INSTALL_DATA} ${WRKSRC}/conf/${f} ${PREFIX}/etc/postfix/dist
.endfor

.if !defined(NOPORTDOCS)
	${INSTALL} -d -o ${DOCOWN} -g ${DOCGRP} -m 555 ${DOCSDIR}
	@cd ${WRKSRC}/html && ${INSTALL_DATA} *.html *.jpg *.png ${DOCSDIR} && \
		${ECHO_MSG} "Installed HTML documentation in ${DOCSDIR}"
.endif

post-install:
	@${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
# Fix compressed man pages
	@${REINPLACE_CMD} -E -e "s|(man[158]/.*.[158]):|\1.gz:|g" ${PREFIX}/etc/postfix/postfix-files
	@${RM} -f ${PREFIX}/etc/postfix/postfix-files.bak
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>

Dj-Snegir
мл. сержант
Сообщения: 110
Зарегистрирован: 2008-08-07 14:26:30

Re: Проблема после установки Postfix

Непрочитанное сообщение Dj-Snegir » 2008-12-16 13:25:52

Результат тот-же поддержки MySQL нет .

ANY IDEAS ?

Аватара пользователя
terminus
майор
Сообщения: 2305
Зарегистрирован: 2007-10-29 11:27:35
Откуда: Рига

Re: Проблема после установки Postfix

Непрочитанное сообщение terminus » 2008-12-17 12:46:11

Фыгня какая-то... А если добавить перед mysql директиву proxy?
типа

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

virtual_mailbox_domains = proxy:mysql:/usr/local/etc/postfix/mysql/mysql_relay_domains_maps.cf
:unknown:
Модель: AST-PM-105/0044; Тип: Универсальный, ремонтный; Название: Терминус; Род повреждения: Распад функций; Выводы: Сдать на слом.

Dj-Snegir
мл. сержант
Сообщения: 110
Зарегистрирован: 2008-08-07 14:26:30

Re: Проблема после установки Postfix

Непрочитанное сообщение Dj-Snegir » 2008-12-18 8:32:31

terminus писал(а):Фыгня какая-то... А если добавить перед mysql директиву proxy?
типа

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

virtual_mailbox_domains = proxy:mysql:/usr/local/etc/postfix/mysql/mysql_relay_domains_maps.cf
:unknown:
Я тоже так думаю. Чтобы развеять сомнения сразу скажу что собирал из портов, а не руками.
И что самое главное непонятно ругается Postfix на словари - значит отсутствует поддержка MySQL, а установливаться он должен был с поддержкой MYSQL но MySQL невидно собственно что он ругается если неустановился :cf:
Скорее всего нужно обновить MySQL а мне не особо хочется это делать.

Dj-Snegir
мл. сержант
Сообщения: 110
Зарегистрирован: 2008-08-07 14:26:30

Re: Проблема после установки Postfix

Непрочитанное сообщение Dj-Snegir » 2008-12-18 8:34:48

А какой версии у вас Postfix и MySQL ?

Dj-Snegir
мл. сержант
Сообщения: 110
Зарегистрирован: 2008-08-07 14:26:30

Re: Проблема после установки Postfix

Непрочитанное сообщение Dj-Snegir » 2008-12-18 10:55:38

Dj-Snegir писал(а):
terminus писал(а):Фыгня какая-то... А если добавить перед mysql директиву proxy?
типа

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

virtual_mailbox_domains = proxy:mysql:/usr/local/etc/postfix/mysql/mysql_relay_domains_maps.cf
:unknown:
Не помогло.

Dj-Snegir
мл. сержант
Сообщения: 110
Зарегистрирован: 2008-08-07 14:26:30

Re: Проблема после установки Postfix

Непрочитанное сообщение Dj-Snegir » 2008-12-18 11:24:51

Вот решил установить без поддержки Mysql.
Убрал опцию MySQL.
ошибка всё таже =(

Dj-Snegir
мл. сержант
Сообщения: 110
Зарегистрирован: 2008-08-07 14:26:30

Re: Проблема после установки Postfix

Непрочитанное сообщение Dj-Snegir » 2008-12-23 13:55:30

Решено - нужно было обновить MySQL клиент. А вообще сдаётся что и это небыло нужно.

Достаточно было бы

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

/etc/make.conf 
# пример для версии MySQL 5.0
DEFAULT_MYSQL_VER=50
 и заново переинсталить.
Однако выплыло то что в MySQL неправильно созданы базы в статье указан файл который видимо уже непоставляется с Postfix этот файл для создания БД postfix.
Я зашёл на postfix.org и по мануалу пытался сам создать БД с таблицами но видимо неправильно так как сейчас ругается

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

postfix/smpt[501]: fatal mysql:/usr/local/etc/postfix/mysql_relay_domains_maps.cf(0,lock|fold_fix:table lookup problem
Где найти этот DATABASE.TXT или как правильно пофиксить данный баг ?
Последний раз редактировалось Dj-Snegir 2008-12-23 15:38:57, всего редактировалось 1 раз.

Аватара пользователя
Alex Keda
стреляли...
Сообщения: 35456
Зарегистрирован: 2004-10-18 14:25:19
Откуда: Made in USSR
Контактная информация:

Re: Проблема после установки Postfix

Непрочитанное сообщение Alex Keda » 2008-12-23 14:48:32

2 Dj-Snegir
страницу до верху и читать текст на красном фоне
Убей их всех! Бог потом рассортирует...

Dj-Snegir
мл. сержант
Сообщения: 110
Зарегистрирован: 2008-08-07 14:26:30

Re: Проблема после установки Postfix

Непрочитанное сообщение Dj-Snegir » 2008-12-23 15:41:44

lissyara писал(а):2 Dj-Snegir
страницу до верху и читать текст на красном фоне
Да, забываю, не со зла ведь :smile:

Исправлено.

По теме могу сказать что полезу смотреть команды MySQL - скорее всего создавая таблицы я допустил ошибку .

Расскажи Лис чем exim лучше Postfix ?

Аватара пользователя
Alex Keda
стреляли...
Сообщения: 35456
Зарегистрирован: 2004-10-18 14:25:19
Откуда: Made in USSR
Контактная информация:

Re: Проблема после установки Postfix

Непрочитанное сообщение Alex Keda » 2008-12-24 9:39:00

он просто лучше.
возможностями.
=======
впрочем - большинству хватит встроенного шендмыла =))
Им незачем делать фильты по юзерам, да и спам мона руками удалять.
Убей их всех! Бог потом рассортирует...

Dj-Snegir
мл. сержант
Сообщения: 110
Зарегистрирован: 2008-08-07 14:26:30

Re: Проблема после установки Postfix

Непрочитанное сообщение Dj-Snegir » 2008-12-24 10:43:17

Ну всё зависит от конторы и аппетитов руководства и пользователей.

По теме могу сказать что пофиксил ошибку следующим образом :

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

http://www.opennet.ru/openforum/vsluhforumID1/81726.html
Остаётся вопрос как посмотреть логи в реал тайме.

Можно ли postfix запустить в debuge?

Dj-Snegir
мл. сержант
Сообщения: 110
Зарегистрирован: 2008-08-07 14:26:30

Re: Проблема после установки Postfix

Непрочитанное сообщение Dj-Snegir » 2008-12-25 10:32:21

Продолжаю тему -
Решил проверить отсылку почты

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

 telnet 127.0.0.1 25
ok показывает адрес сервака
ну и по стандарту
mail from:
rcpt to:
data:
а вот после subject: 
выдаёт 
Error I can break rules, too. Goodbye.
Ругается на правила может кто-то встречался
Последний раз редактировалось Dj-Snegir 2008-12-25 11:01:12, всего редактировалось 1 раз.

Аватара пользователя
Alex Keda
стреляли...
Сообщения: 35456
Зарегистрирован: 2004-10-18 14:25:19
Откуда: Made in USSR
Контактная информация:

Re: Проблема после установки Postfix

Непрочитанное сообщение Alex Keda » 2008-12-25 10:43:50

2 аффтар
не первый день на форуме уже.
оформляйте сообщения нормально
Убей их всех! Бог потом рассортирует...

Dj-Snegir
мл. сержант
Сообщения: 110
Зарегистрирован: 2008-08-07 14:26:30

Re: Проблема после установки Postfix

Непрочитанное сообщение Dj-Snegir » 2008-12-25 11:04:50

lissyara писал(а):2 аффтар
не первый день на форуме уже.
оформляйте сообщения нормально
Сорри косяк исправил просто забываю =) .

ЛИС ! Ну в статье ничего не рассказано про транспорт?! Да в MySQL создаётся таблица в БД но что и как туда записать информации нет :cf: . Поэтому почта просто не понимает что ей делать с тестовым письмом.

Аватара пользователя
Alex Keda
стреляли...
Сообщения: 35456
Зарегистрирован: 2004-10-18 14:25:19
Откуда: Made in USSR
Контактная информация:

Re: Проблема после установки Postfix

Непрочитанное сообщение Alex Keda » 2008-12-25 11:07:50

дык - одминка же есть.
WEB-интерфейс
как я тебе его опишу? сам разбирайся =)
Убей их всех! Бог потом рассортирует...