Медленая отправка писем через sendmail

123 4
M
На сайте с 22.02.2007
Offline
161
7339

2-3 секунды на отправку одного письма через функцию mail (sendmail) !!! И это только поставить письмо в очередь, потом в очереди они медленно отправляются... Раньше было в несколько раз быстрее (до перехода на новый сервер). Предполагаю имеется какие-то настройки регулирующие данную скорость... Подскажите пожалуйста как можно увеличить скорость отправки писем...

И еще, что за зверь postfix? Вроде это более быстрая альтернатива sendmail?

Торрент Трекер Катушка - скачать фильмы (http://katushka.net) | SmartProgress - достижение целей (https://smartprogress.do/) Партнерская программа SmartProgress (https://smartprogress.do/affiliate)
Andreyka
На сайте с 19.02.2005
Offline
822
#1

Скорее всего проблемы в DNS

Или это не сервер а vps?

Не стоит плодить сущности без необходимости
S
На сайте с 01.04.2008
Offline
91
#2
maxttor:
И еще, что за зверь postfix? Вроде это более быстрая альтернатива sendmail?

Это просто другой MTA, также как exim, qmail и множество других. Если сравнивать postfix и sendmail, то первый более простой в конфигурировании, более безопасный, жрет меньше ресурсов. У второго огромная история, возможность работать на высоко нагруженных почтовых шлюзах и большая гибкость помощью макросов и m4. Что касается скорости такого понятия у MTA нет, все зависит от настроек, размера почтовой очереди, качества подключения, скорости резолва от DNS сервера. В любом случае если есть проблемы с отправкой нужно смотреть настройки.

Править домен летит Айболит. И одно только слово твердит: - DNS! DNS! DNS!
M
На сайте с 22.02.2007
Offline
161
#3

А где лежит конфиг от него?

Andreyka:

Или это не сервер а vps?

Сервер

S
На сайте с 01.04.2008
Offline
91
#4
maxttor:
А где лежит конфиг от него?

Зависит от установленной системы и способа установки. Могу только посоветовать запустить поиск в ssh:

find /etc/ -name sendmail.cf
или
find /usr/ -name sendmail.cf

В некоторых дистрибутивах конфиг называется sendmail.conf, еще можно поискать по макроконфигу sendmail.mc, без него не сгенерировать sendmail.cf

Andreyka
На сайте с 19.02.2005
Offline
822
#5

Если сервер свой, то тогда только DNS.

M
На сайте с 22.02.2007
Offline
161
#6
Andreyka:
Если сервер свой, то тогда только DNS.

А какие могут быть проблемы в ДНС ?

Himiko
На сайте с 28.08.2008
Offline
560
#7
maxttor:
А какие могут быть проблемы в ДНС ?

Могут быть проблемы с преобразованием доменов в ip-адреса.

По этой причине могут быть "тормоза" при отправке почты.

Профессиональное администрирование серверов (https://systemintegra.ru). Круглосуточно. Отзывы (/ru/forum/834230) Лицензии (http://clck.ru/Qhf5) ISPManager,VDSManager,Billmanager e.t.c. по низким ценам.
M
На сайте с 22.02.2007
Offline
161
#8
Himiko:
Могут быть проблемы с преобразованием доменов в ip-адреса.
По этой причине могут быть "тормоза" при отправке почты.

И как эту проблему исправить?

maxttor добавил 23.02.2009 в 20:31

Конфиг sendmail'а:


###########################################################################
# $Id: sendmail.conf,v 1.14 2005/11/30 23:58:59 bjorn Exp $
###########################################################################

# You can put comments anywhere you want to. They are effective for the
# rest of the line.

# this is in the format of <name> = <value>. Whitespace at the beginning
# and end of the lines is removed. Whitespace before and after the = sign
# is removed. Everything is case *insensitive*.

# Yes = True = On = 1
# No = False = Off = 0

Title = "sendmail"

# Which logfile group...
LogFile = maillog

# Only give lines pertaining to the sendmail service...
*MultiService = sendmail,sm-mta
*RemoveHeaders

# Previous versions of sendmail.conf allowed for the use of the
# $Sendmail_Detail variable. Because now all services have use
# of the Detail variable, $Sendmail_Detail is deprecated, and may
# be removed in a future version of the sendmail filter script.
# How Detail affects the output of sendmail is described here:
#
# The Detail is used to override the general logwatch Detail
# parameter that is set either when invoking logwatch (option --detail)
# or specified in the conf/logwatch.conf file, in the variable Detail.
# If not specified, the default is to inherit the value of the general
# logwatch Detail setting.
#
# Example:
#Detail = 5
#
# The defined values of Detail are as follows:
# Detail >= 0: Will print:";
# - severe errors and basic statistics";
# Detail >= 3: Print above plus:";
# - counts of errors handled by sendmail";
# Detail >= 5: Print above plus:";
# - details of errors handled by sendmail";
# Detail >= 10: Print above plus:";
# - all statistics gathered";

# Note that Detail is independent of sendmail's LogLevel.
# The logwatch script should be able to handle any logging level
# set in sendmail (either through confLOG_LEVEL in the *.mc files
# or through LogLevel in the *.cf files). The default setting is
# usually a LogLevel of 9. At level 15, for example, SMTP
# transactions are logged, and the logwatch script extracts additional
# information. Levels above 15 generate additional debug information,
# which is filtered by the logwatch script. Therefore, setting higher
# levels of LogLevel will yield larger mail log files, may provide
# additional parsed information in the logwatch log, but should not
# cause new unmatched entries.

# All sendmail log statements that start with "DEBUG: " will be filtered.
# This may be used for user-defined statements that should appear on the log,
# but not reported by logwatch.

# $Sendmail_PrettyHost is used to format host entries in a tabular
# format. It is mostly useful when you have a very large number of
# entries for errors that display host names/addresses. If not
# specified, the default is 0, which indicates that no additional
# host formatting is done. Set to 1 to enable the host formatting.
#$Sendmail_PrettyHost = 0


# The following are examples of the use of variables SendmailMatchFilter,
# Sendmail_ReportFilter, and $Sendmail_MilterHeadersToCount.
# To uncomment and use these specific examples, remember to remove the '#'
# from the first column. And of course, you can write your own filters.
# Note that unlike the statements in the sendmail script, you must end
# each line (except the last one) with a \ to denote a continuation line

#$Sendmail_MatchFilter = " \
# # filter and count how many times the alias database is rebuilt \
# if ( ($User) = ($ThisLine =~ /^alias database .* rebuilt by (.*)/ ) ) { \
# $DatabaseBuild{$User}++; \
# # note that we don't need to re-assign an empty string to $ThisLine \
# # because the 'alias database' line is then ignored by the \
# # scripts/services/sendmail script. \
# } \
# \
# # here we'll choose to ignore and not report the 'lost input channel' \
# # statements \
# if ( $ThisLine =~ /^lost input channel from/ ) { \
# # we re-assign an empty string to $ThisLine to prevent further \
# # processing of this log line by the sendmail script. \
# $ThisLine = ""; \
# }"

#$Sendmail_ReportFilter = " \
# if (keys %DatabaseBuild) { \
# print "\n\nDatabase re-built by:"; \
# foreach $User (keys %DatabaseBuild) { \
# print "\n $User: $DatabaseBuild{$User} Time(s)"; \
# } \
# }"

# The $Sendmail_MilterHeadersToCount will count every header added with
# one (or more) of the specified strings. Each string is specified by
# delimiting it with a vertical bar, and is counted separately:
$Sendmail_MilterHeadersToCount = "X-SPF|X-Spam|X-Scanned-By: MIMEDefang|Received-SPF: fail|Received-SPF: softfail"


#########################################################
# Sendmail Threshold values.
# These allow you to configure the output and restrict verbose reports
# by limiting what is printed to occurances >= the value you enter.
#
# Note that case is insensitive.

#Sendmail Config Values
$sendmail_mailbomblistthreshold = 25
$sendmail_mailbombthreshold = 10
$sendmail_unresolveddomainsthreshold = 1
$sendmail_knownspammerthreshold = 1
$sendmail_relaydeniedthreshold = 1
$sendmail_checkmailrejectthreshold = 1
$sendmail_checkrcptrejectthreshold = 1
$sendmail_lostinputchannelthreshold = 1
$sendmail_dummyconnectionthreshold = 1
$sendmail_unknownhoststhreshold = 1
$sendmail_unknownusersthreshold = 1
$sendmail_domainerrorsthreshold = 1
$sendmail_pregreetingthreshold = 1
$sendmail_collecterrorthreshold = 1
$sendmail_timeoutthreshold = 1
$sendmail_blackholethreshold = 1

#Set this to Null to suppress the Top 10 Email Addresses
$sendmail_tolistthreshold = 10

########################################################
# Please send all comments, suggestions, bug reports,
# etc, to logwatch-devel@logwatch.org
########################################################

# vi: shiftwidth=3 tabstop=3 et

Himiko
На сайте с 28.08.2008
Offline
560
#9
maxttor:
И как эту проблему исправить?

maxttor добавил 23.02.2009 в 20:31
Конфиг sendmail'а:

###########################################################################
# $Id: sendmail.conf,v 1.14 2005/11/30 23:58:59 bjorn Exp $
###########################################################################

# You can put comments anywhere you want to. They are effective for the
# rest of the line.

# this is in the format of <name> = <value>. Whitespace at the beginning
# and end of the lines is removed. Whitespace before and after the = sign
# is removed. Everything is case *insensitive*.

# Yes = True = On = 1
# No = False = Off = 0

Title = "sendmail"

# Which logfile group...
LogFile = maillog

# Only give lines pertaining to the sendmail service...
*MultiService = sendmail,sm-mta
*RemoveHeaders

# Previous versions of sendmail.conf allowed for the use of the
# $Sendmail_Detail variable. Because now all services have use
# of the Detail variable, $Sendmail_Detail is deprecated, and may
# be removed in a future version of the sendmail filter script.
# How Detail affects the output of sendmail is described here:
#
# The Detail is used to override the general logwatch Detail
# parameter that is set either when invoking logwatch (option --detail)
# or specified in the conf/logwatch.conf file, in the variable Detail.
# If not specified, the default is to inherit the value of the general
# logwatch Detail setting.
#
# Example:
#Detail = 5
#
# The defined values of Detail are as follows:
# Detail >= 0: Will print:";
# - severe errors and basic statistics";
# Detail >= 3: Print above plus:";
# - counts of errors handled by sendmail";
# Detail >= 5: Print above plus:";
# - details of errors handled by sendmail";
# Detail >= 10: Print above plus:";
# - all statistics gathered";

# Note that Detail is independent of sendmail's LogLevel.
# The logwatch script should be able to handle any logging level
# set in sendmail (either through confLOG_LEVEL in the *.mc files
# or through LogLevel in the *.cf files). The default setting is
# usually a LogLevel of 9. At level 15, for example, SMTP
# transactions are logged, and the logwatch script extracts additional
# information. Levels above 15 generate additional debug information,
# which is filtered by the logwatch script. Therefore, setting higher
# levels of LogLevel will yield larger mail log files, may provide
# additional parsed information in the logwatch log, but should not
# cause new unmatched entries.

# All sendmail log statements that start with "DEBUG: " will be filtered.
# This may be used for user-defined statements that should appear on the log,
# but not reported by logwatch.

# $Sendmail_PrettyHost is used to format host entries in a tabular
# format. It is mostly useful when you have a very large number of
# entries for errors that display host names/addresses. If not
# specified, the default is 0, which indicates that no additional
# host formatting is done. Set to 1 to enable the host formatting.
#$Sendmail_PrettyHost = 0


# The following are examples of the use of variables SendmailMatchFilter,
# Sendmail_ReportFilter, and $Sendmail_MilterHeadersToCount.
# To uncomment and use these specific examples, remember to remove the '#'
# from the first column. And of course, you can write your own filters.
# Note that unlike the statements in the sendmail script, you must end
# each line (except the last one) with a \ to denote a continuation line

#$Sendmail_MatchFilter = " \
# # filter and count how many times the alias database is rebuilt \
# if ( ($User) = ($ThisLine =~ /^alias database .* rebuilt by (.*)/ ) ) { \
# $DatabaseBuild{$User}++; \
# # note that we don't need to re-assign an empty string to $ThisLine \
# # because the 'alias database' line is then ignored by the \
# # scripts/services/sendmail script. \
# } \
# \
# # here we'll choose to ignore and not report the 'lost input channel' \
# # statements \
# if ( $ThisLine =~ /^lost input channel from/ ) { \
# # we re-assign an empty string to $ThisLine to prevent further \
# # processing of this log line by the sendmail script. \
# $ThisLine = ""; \
# }"

#$Sendmail_ReportFilter = " \
# if (keys %DatabaseBuild) { \
# print "\n\nDatabase re-built by:"; \
# foreach $User (keys %DatabaseBuild) { \
# print "\n $User: $DatabaseBuild{$User} Time(s)"; \
# } \
# }"

# The $Sendmail_MilterHeadersToCount will count every header added with
# one (or more) of the specified strings. Each string is specified by
# delimiting it with a vertical bar, and is counted separately:
$Sendmail_MilterHeadersToCount = "X-SPF|X-Spam|X-Scanned-By: MIMEDefang|Received-SPF: fail|Received-SPF: softfail"


#########################################################
# Sendmail Threshold values.
# These allow you to configure the output and restrict verbose reports
# by limiting what is printed to occurances >= the value you enter.
#
# Note that case is insensitive.

#Sendmail Config Values
$sendmail_mailbomblistthreshold = 25
$sendmail_mailbombthreshold = 10
$sendmail_unresolveddomainsthreshold = 1
$sendmail_knownspammerthreshold = 1
$sendmail_relaydeniedthreshold = 1
$sendmail_checkmailrejectthreshold = 1
$sendmail_checkrcptrejectthreshold = 1
$sendmail_lostinputchannelthreshold = 1
$sendmail_dummyconnectionthreshold = 1
$sendmail_unknownhoststhreshold = 1
$sendmail_unknownusersthreshold = 1
$sendmail_domainerrorsthreshold = 1
$sendmail_pregreetingthreshold = 1
$sendmail_collecterrorthreshold = 1
$sendmail_timeoutthreshold = 1
$sendmail_blackholethreshold = 1

#Set this to Null to suppress the Top 10 Email Addresses
$sendmail_tolistthreshold = 10

########################################################
# Please send all comments, suggestions, bug reports,
# etc, to logwatch-devel@logwatch.org
########################################################

# vi: shiftwidth=3 tabstop=3 et

Конфиг sendmail не причём. Проблему нужно смотреть на самом сервере.

R
На сайте с 20.09.2008
Offline
4
#10

какая у Вас ОС?

что выводит #dig yourhostname?

проверьте время резолва доменов через nslookup

Сетeвед, - Ваш путеводитель в мире ИТ. (http://www.seteved.ru)
123 4

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