exim отправка почты

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

Модератор: xM

Правила форума
Убедительная просьба юзать теги [code] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
Outdoor
проходил мимо
Сообщения: 5
Зарегистрирован: 2010-08-16 20:25:58
Откуда: Санкт-Петербург

exim отправка почты

Непрочитанное сообщение Outdoor » 2010-08-16 20:49:46

Всем привет! Подскажите плиз в чем может быть проблема заменил postfix на exim, теперь когда отправляю письма с почтового адреса сервера на внешний адрес например на почту yandex.ru приходит в теле письма места русского языка, вот такая штука:

Алексей:\
попробуем, я
просто так и
не видел
чего за игра,
нашел

менял кодировку на доменах сервера, все равно письма приходят с таким текстом,
в тоже время письма приходящие на почтовый адрес сервера, с внешних ящиков читаются нормально. Подскажите где и что можно подправить?

Хостинговая компания 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/
Выделенные сервера, Россия, Москва, от 2520 рублей (8 CPU, 8Gb RAM, 2x500Gb HDD, RAID 3ware 9750):
https://www.host-food.ru/tariffs/vydelennyi-server-ds/
Недорогие домены в популярных зонах: https://www.host-food.ru/domains/

Gerk
сержант
Сообщения: 194
Зарегистрирован: 2009-09-23 23:01:37
Откуда: Симферополь, UA

Re: exim отправка почты

Непрочитанное сообщение Gerk » 2010-08-16 21:17:42

конфиг экзима покажите.

Outdoor
проходил мимо
Сообщения: 5
Зарегистрирован: 2010-08-16 20:25:58
Откуда: Санкт-Петербург

Re: exim отправка почты

Непрочитанное сообщение Outdoor » 2010-08-16 21:36:12

exim.conf

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

SPAMCBIN=__ISP_SPAMCBIN__
EXIMBIN=/usr/sbin/exim
log_selector =  \
        +all_parents \
        +lost_incoming_connection \
        +received_sender \
        +received_recipients \
        +tls_cipher +tls_peerdn \
        +smtp_confirmation \
        +smtp_syntax_error \
        +smtp_protocol_error
  
# CONFDIR=__ISP_CONFDIR__
# daemon_smtp_port = 25:465
# tls_certificate = CONFDIR/certificate.crt
# tls_privatekey = CONFDIR/certificate.key
# tls_on_connect_ports = 465

.ifdef MAILMAN_ENABLE
MAILMAN_HOME=__MAILMAN_HOME__
MAILMAN_WRAP=__MAILMAN_WRAP__
MAILMAN_USER=__MAILMAN_USER__
MAILMAN_GROUP=__MAILMAN_GROUP__
.endif

trusted_groups = mgrsecure
trusted_users = apache

domainlist local_domains = lsearch;/etc/exim/domains
domainlist dummy_domains =
hostlist relay_from_hosts = 127.0.0.1 : *внешний IP*

domainlist relay_to_domains = lsearch;/etc/exim/domains
exim_user = exim
exim_group = exim

.ifdef VIRUS_SCAN
av_scanner = __CLAMAV_SOCKET__
.endif

never_users = root
host_lookup = *
rfc1413_hosts = *
rfc1413_query_timeout = 0s
ignore_bounce_errors_after = 2d
timeout_frozen_after = 7d
acl_smtp_rcpt = acl_check_rcpt
acl_smtp_data = acl_check_data

begin acl
	acl_check_rcpt:
		accept	hosts = net-lsearch;/etc/exim/whitelist
		
		deny	hosts = net-lsearch;/etc/exim/blacklist
				message = $host_data                        

		deny	message       = Restricted characters in address
				domains       = +local_domains
				local_parts   = ^[.] : ^.*[@%!/|]

		deny    message       = Restricted characters in address
				domains       = !+local_domains
				local_parts   = ^[./|] : ^.*[@%!] : ^.*/\\.\\./

		accept  local_parts   = postmaster
				verify        = recipient
				domains       = +local_domains

		require verify        = sender

.ifdef VIRUS_SCAN
        warn set acl_m3 = no
        
        warn set acl_m3 = ok
            condition        = ${lookup{$domain}lsearch{__ANTIVIRUS_DOMAINS__} {yes}{no}}
            control          = fakedefer
            
        warn set acl_m3 = no
            condition        = ${lookup{$domain}lsearch{__ANTIVIRUS_DOMAINS__} {no}{yes}}
.endif

		accept  hosts         = +relay_from_hosts
				control       = submission

		accept  authenticated = *
				condition     = ${if eq{${extract{5}{:}{${lookup{$authenticated_id}lsearch{/etc/exim/passwd}}}}}{no} {yes}{no}}
				condition     = ${if eq{${extract{3}{:}{${lookup{${domain:$authenticated_id}}lsearch{/etc/exim/domains}}}}}{no} {yes}{no}}
				control       = submission/domain=

		deny	message       = rejected because $sender_host_address is in a black list at $dnslist_domain\\n$dnslist_text
				dnslists      = ${readfile {/etc/exim/dnsblists}{:}} 

		require message       = relay not permitted
				domains       = +local_domains : +relay_to_domains

		require verify        = recipient

.ifdef POSTGREY_SOCKET
		defer log_message = greylisted host $sender_host_address
			set acl_m0  = request=smtpd_access_policy\nprotocol_state=RCPT\nprotocol_name=${uc:$received_protocol}\nhelo_name=$sender_helo_name\nclient_address=$sender_host_address\nclient_name=$sender_host_name\nsender=$sender_address\nrecipient=$local_part@$domain\ninstance=$sender_host_address/$sender_address/$local_part@$domain\n\n
			set acl_m0  = ${sg{${readsocket{POSTGREY_SOCKET}{$acl_m0}{5s}{}{action=DUNNO}}}{action=}{}}
			message     = ${sg{$acl_m0}{^\\w+\\s*}{}}
			condition   = ${if eq{${uc:${substr{0}{5}{$acl_m0}}}}{DEFER}{true}{false}}
.endif

		accept

	acl_check_data:
.ifdef VIRUS_SCAN
        deny message = This message contains virus ($malware_name)
        demime  = *
        malware = *
        condition = ${if eq{$acl_m3}{ok}{yes}{no}}
.endif
		accept

begin routers
	dnslookup:
		driver = dnslookup
		domains = !+dummy_domains
		transport = remote_smtp
		ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
		self = pass
		no_more

	disabled_domains:
		driver = redirect
		condition = ${extract{3}{:}{${lookup{$domain}lsearch{/etc/exim/domains}}}}
		allow_fail = yes
		data = :fail: Domain disabled
		no_more

	disabled_users:
		driver = redirect
		condition = ${extract{5}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/passwd}}}}
		allow_fail = yes
		data = :fail: User disabled
		no_more

	local_domains:
		driver = redirect
		data = ${quote_local_part:$local_part}@${extract{1}{:}{${lookup{$domain}lsearch{/etc/exim/domains}}}}
		cannot_route_message = Unknown user
		no_more

.ifdef SA_ENABLE
	spamcheck_router:
		no_verify
		condition = "${if and { {!def:h_X-Spam-Flag:} {!eq {$received_protocol}{spam-scanned}}} {1}{0}}"
		driver = accept
		transport = spamcheck
.endif

	group_aliases:
		driver = redirect
		data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/aliases}}}}
		condition = ${if and{\
						{exists{/etc/exim/aliases}}\
						{eq {${extract{2}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/aliases}}}}} {group} }\
					} {yes} {no} }
		redirect_router = a_dnslookup
		pipe_transport = address_pipe

	aliases:
		driver = redirect
		data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/aliases}}}}
		condition = ${if exists{/etc/exim/aliases} {yes} {no} }
		pipe_transport = address_pipe

	local_users:
		driver = redirect
		condition = ${lookup {$local_part@$domain} lsearch {/etc/exim/passwd} {yes} {no} }
		data = $local_part@$domain
		redirect_router = autoreplay

.ifdef MAILMAN_ENABLE
	mailman:
		driver = accept
		require_files = MAILMAN_HOME/lists/$local_part/config.pck
		local_part_suffix_optional
		local_part_suffix = -bounces : -bounces+* : -confirm+* : -join : -leave : -owner : -request : -admin : -subscribe : -unsubscribe
		transport = mailman

	mailman_isp:
		driver = accept
		require_files = MAILMAN_HOME/lists/$local_part-$domain/config.pck
		local_part_suffix_optional
		local_part_suffix = -bounces : -bounces+* : -confirm+* : -join : -leave : -owner : -request : -admin : -subscribe : -unsubscribe
		transport = mailman_isp
.endif

	catchall_for_domains:
		driver = redirect
		headers_add = X-redirected: yes
		data = ${extract{2}{:}{${lookup{$domain}lsearch{/etc/exim/domains}}}}
		file_transport = local_delivery

	unknown_users:
		driver = redirect
		allow_fail = yes
		data = :fail: Unknown user
		no_more

	autoreplay:
		driver = accept
		condition = ${if exists{${extract{4}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/passwd}}}}/message.txt} {yes} {no}}
		retry_use_local_part
		transport = address_reply
		unseen

	localuser:
		driver = accept
		transport = local_delivery

# Same routers without autoreplay

	a_dnslookup:
		driver = dnslookup
		domains = !+dummy_domains
		transport = remote_smtp
		ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
		self = pass
		no_more

	a_disabled_domains:
		driver = redirect
		condition = ${extract{3}{:}{${lookup{$domain}lsearch{/etc/exim/domains}}}}
		allow_fail = yes
		data = :fail: Domain disabled
		no_more

	a_disabled_users:
		driver = redirect
		condition = ${extract{5}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/passwd}}}}
		allow_fail = yes
		data = :fail: User disabled
		no_more

	a_local_domains:
		driver = redirect
		data = ${quote_local_part:$local_part}@${extract{1}{:}{${lookup{$domain}lsearch{/etc/exim/domains}}}}
		cannot_route_message = Unknown user
		redirect_router = a_dnslookup
		no_more

	a_aliases:
		driver = redirect
		data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/aliases}}}}
		condition = ${if exists{/etc/exim/aliases} {yes} {no} }
		redirect_router = a_dnslookup
		pipe_transport = address_pipe

	a_local_users:
		driver = accept
		transport = local_delivery
		condition = ${lookup {$local_part@$domain} lsearch {/etc/exim/passwd} {yes} {no} }

.ifdef MAILMAN_ENABLE
	a_mailman:
		driver = accept
		require_files = MAILMAN_HOME/lists/$local_part/config.pck
		local_part_suffix_optional
		local_part_suffix = -bounces : -bounces+* : -confirm+* : -join : -leave : -owner : -request : -admin : -subscribe : -unsubscribe
		transport = mailman

	a_mailman_isp:
		driver = accept
		require_files = MAILMAN_HOME/lists/$local_part-$domain/config.pck
		local_part_suffix_optional
		local_part_suffix = -bounces : -bounces+* : -confirm+* : -join : -leave : -owner : -request : -admin : -subscribe : -unsubscribe
		transport = mailman_isp
.endif

	a_catchall_for_domains:
		driver = redirect
		headers_add = X-redirected: yes
		data = ${extract{2}{:}{${lookup{$domain}lsearch{/etc/exim/domains}}}}
		file_transport = local_delivery
		redirect_router = a_dnslookup

begin transports
	remote_smtp:
		driver = smtp
  
	local_delivery:
		driver = appendfile
		file = ${extract{4}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/passwd}}}}/mbox
		delivery_date_add
		envelope_to_add
		return_path_add
		mode = 0660
		quota = ${extract{3}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/passwd}}}}M
		quota_warn_threshold = 75%
		use_lockfile = no
		no_mode_fail_narrower
		user = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/passwd}}}}
		group = ${extract{2}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/passwd}}}}
						  
	address_pipe:
		driver = pipe
		ignore_status
		return_output
		use_shell
									
	address_reply:
		driver = autoreply
		headers = ${readfile{${extract{4}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/passwd}}}}/message.txt}}
		to = $sender_address

.ifdef MAILMAN_ENABLE
	mailman_isp: 
		driver = pipe
		command = MAILMAN_WRAP '${if def:local_part_suffix {${sg{$local_part_suffix}{-(\\w+)(\\+.*)?}{\$1}}} {post}}' $local_part-$domain
		current_directory = MAILMAN_HOME
		home_directory = MAILMAN_HOME
		user = MAILMAN_USER
		group = MAILMAN_GROUP

	mailman:
		driver = pipe
		command = MAILMAN_WRAP '${if def:local_part_suffix {${sg{$local_part_suffix}{-(\\w+)(\\+.*)?}{\$1}}} {post}}' $local_part
		current_directory = MAILMAN_HOME
		home_directory = MAILMAN_HOME
		user = MAILMAN_USER
		group = MAILMAN_GROUP
.endif

.ifdef SA_ENABLE
	spamcheck:
		debug_print = "T: spamassassin_pipe for $local_part@$domain"
		driver = pipe
		command = EXIMBIN -oMr spam-scanned -bS
		use_bsmtp
		transport_filter = SPAMCBIN
		home_directory = "/tmp"
		current_directory = "/tmp"
		user = exim
		group = exim
		return_fail_output
		message_prefix =
		message_suffix =
.endif


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

begin rewrite
.ifdef MAILMAN_ENABLE
	\N^(.*<)?([^<]*)@([^>]*).*$\N   "${if exists{MAILMAN_HOME/lists/${sg{$2}{-$3.*}{-$3}}/config.pck} {${sg{$0} {-$3} {}}} {$0} }" S
	\N^(.*<)?([^<]*)@([^>]*).*$\N   "${if exists{MAILMAN_HOME/lists/${sg{$2}{-$3.*}{-$3}}/config.pck} {${sg{$0} {-$3} {}}} {$0} }"
.endif

begin authenticators


cram:
  driver = cyrus_sasl
  public_name = CRAM-MD5
  server_set_id = $1

plain:
  driver = cyrus_sasl
  public_name = PLAIN
  server_set_id = $1

login:
  driver = cyrus_sasl
  public_name = LOGIN
  server_set_id = $1

Outdoor
проходил мимо
Сообщения: 5
Зарегистрирован: 2010-08-16 20:25:58
Откуда: Санкт-Петербург

Re: exim отправка почты

Непрочитанное сообщение Outdoor » 2010-08-25 16:43:37

Ребят, подскажите по возможности решение проблемы

masterito
рядовой
Сообщения: 42
Зарегистрирован: 2010-08-19 16:24:17
Откуда: Санкт-Петербург

Re: exim отправка почты

Непрочитанное сообщение masterito » 2010-08-25 16:48:01

Вы каким-то веб-интерфейсом пользуетесь для почты?И письма с такой кодировкой приходят из него?

Outdoor
проходил мимо
Сообщения: 5
Зарегистрирован: 2010-08-16 20:25:58
Откуда: Санкт-Петербург

Re: exim отправка почты

Непрочитанное сообщение Outdoor » 2010-08-25 16:57:11

для отправки использую интерфейс SquirrelMail 1.4.8-5.el5
да письма приходят с такой кодировкой из него.

masterito
рядовой
Сообщения: 42
Зарегистрирован: 2010-08-19 16:24:17
Откуда: Санкт-Петербург

Re: exim отправка почты

Непрочитанное сообщение masterito » 2010-08-25 17:02:18

Это не проблема exim - это проьлема Squirrel. Настройте в нем кодировку и локализацию правильно(в его рабочей директории скрипт лежит config или как-то так называется).

Outdoor
проходил мимо
Сообщения: 5
Зарегистрирован: 2010-08-16 20:25:58
Откуда: Санкт-Петербург

Re: exim отправка почты

Непрочитанное сообщение Outdoor » 2010-08-25 17:03:41

Спасибо вам большое! Буду настраивать