Проблемы с forward в exim

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

Модератор: xM

Правила форума
Убедительная просьба юзать теги [code] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
soloweb
проходил мимо
Сообщения: 8
Зарегистрирован: 2011-06-12 13:56:07

Проблемы с forward в exim

Непрочитанное сообщение soloweb » 2011-09-29 18:25:02

Файл .forward

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

pipe: "/home/mail-reject/mail.php"
Вот настройки Exim-а директива userforward:

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

userforward:
  debug_print = "R: userforward for $local_part@$domain"
  driver = redirect
  domains = +local_domains
  check_local_user
  file = $home/.forward
  require_files = "$local_part:$home/.forward"
  no_verify
  no_expn
  check_ancestor
  allow_filter
  forbid_smtp_code = true
  directory_transport = address_directory
  file_transport = address_file
  pipe_transport = address_pipe
  reply_transport = address_reply
  skip_syntax_errors
  syntax_errors_to = "real-${quote_local_part:$local_part}@$domain"
  syntax_errors_text = \
    This is an automatically generated message. An error has\n\
    been found in your .forward file. Details of the error are\n\
    reported below. While this error persists, you will receive\n\
    a copy of this message for every message that is addressed\n\
    to you. If your .forward file is a filter file, or if it is\n\
    a non-filter file containing no valid forwarding addresses,\n\
    a copy of each incoming message will be put in your normal\n\
    mailbox. If a non-filter file contains at least one valid\n\
    forwarding address, forwarding to the valid addresses will\n\
    happen, and those will be the only deliveries that occur.

Есть юзер в системе, его имя mail-reject
Так вот когда письмо приходит на mail-reject@mydomain.com exim в логах пишет:

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

2011-09-29 18:58:02 1R9I3m-00032K-0y DKIM: d=gmail.com s=gamma c=relaxed/relaxed a=rsa-sha256 [verification succeeded]
2011-09-29 18:58:02 1R9I3m-00032K-0y <= ***@gmail.com H=mail-bw0-f48.google.com [209.85.214.48] P=esmtp S=1527 id=DB1A71BB-22B7-4184-BCCA-DFF9E3C94BF7@gmail.com
2011-09-29 18:58:02 1R9I3m-00032K-0y userforward router: skipped error: missing or malformed local part (expected word or "<") in "pipe: "/home/mail-reject/mail.php""
2011-09-29 18:58:02 1R9I3m-00032N-9r <= <> R=1R9I3m-00032K-0y U=root P=local S=1226
2011-09-29 18:58:02 1R9I3m-00032K-0y => mail-reject <mail-reject@mydomain.com> R=local_user T=maildir_home
2011-09-29 18:58:02 1R9I3m-00032K-0y Completed
2011-09-29 18:58:02 1R9I3m-00032N-9r => mail-reject <real-mail-reject@mydomain.com> R=real_local T=maildir_home
2011-09-29 18:58:02 1R9I3m-00032N-9r Completed
Я так понял ему не нравится символ "<" в заголовке ОТ (FROM)
Но как это все пофиксить ))) я не сис админ, а в exim не очень силен )))
Гуглением ни к чему хорошему не приводит )))

Единственнео что в документации откопал строчку:
Warning: If you use an Exim expansion to construct a redirection address, and the expansion contains
a reference to $local_part, you should make use of the quote_local_part expansion operator, in
case the local part contains special characters. For example, to redirect all mail for the domain
obsolete.example, retaining the existing local part, you could use this setting:
data = ${quote_local_part:$local_part}@newdomain.example
Заранее спасибо за помощь!

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

soloweb
проходил мимо
Сообщения: 8
Зарегистрирован: 2011-06-12 13:56:07

Re: Проблемы с forward в exim

Непрочитанное сообщение soloweb » 2011-09-29 19:20:22

Проблема решена мной-же самим )))

Пиздануццо можно, как можно в доках писать такую хрень!
Все оказалось совсем просто, неправильный синтаксис .forward файла приводил к ошибке, которая с тем не связанна по смыслу ошибки )))

А дело было в том что вместо

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

pipe: "/home/mail-reject/mail.php"
надо было:

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

|"/home/mail-reject/mail.php"
Пиздец, целый день на эту хрень убил.

P.S. Сорри за великий и могучий