Lmtp error after rcpt to

After recent updates we've got those msg for some emails accounts: 2016-01-21 20:30:29 xxx@xxxx.com R=virtual_user T=dovecot_lmtp_udp defer (-44): LMTP error after RCPT TO:: 451 4.3.0 Temporary internal error 2016-01-21 17:48:12 Received from e-magazyn@ncplus.pl H=mail.ncplus.pl...

sirwiz

Verified User

Joined
Mar 5, 2008
Messages
41


  • #1

After recent updates we’ve got those msg for some emails accounts:

2016-01-21 20:30:29 [email protected] R=virtual_user T=dovecot_lmtp_udp defer (-44): LMTP error after RCPT TO:<[email protected]>: 451 4.3.0 <[email protected]> Temporary internal error

2016-01-21 17:48:12 Received from [email protected] H=mail.ncplus.pl (mail1.ncplus.pl) [91.232.176.218] P=esmtps X=TLSv1:DHE-RSA-AES256-SHA:256 CV=no S=51648 [email protected] T=»E-magazyn. Wersal. Prawo krwi — superprodukcja tylko w CANAL+»
2016-01-21 17:48:12 [email protected] R=virtual_user T=dovecot_lmtp_udp defer (-44): LMTP error after RCPT TO:<[email protected]>: 451 4.3.0 <[email protected]> Temporary internal error

Any ideas?

smtalk

smtalk

Administrator

Staff member

Joined
Aug 22, 2006
Messages
10,597
Location

LT, EU


  • #2

I think you missed CustomBuild warning about the new version of exim.conf :) It requires Dovecot to have LMTP enabled. Please run the following commands to fix it:

Code:

cd /usr/local/directadmin/custombuild
./build set dovecot_conf yes
./build dovecot_conf

sirwiz

Verified User

Joined
Mar 5, 2008
Messages
41


  • #3

I have dovecot_conf set to yes, but i chceck it again for sure and: Changed dovecot_conf option from yes to yes.

This error is not on all emails, just few. Most of them are from one domain, but i have one account from other domain, that is affected too.

WiNeOS

Verified User

Joined
Apr 3, 2006
Messages
13


  • #4

same problem here. Any updates?

  • #5

Same problem here,
cd /usr/local/directadmin/custombuild
./build set dovecot_conf yes
./build dovecot_conf
doesn’t help.

I’m guessing thats because domain is not delegated to the nameserver of vps. And in dns zone there are dkim and dmarc records.

Found problem, seemed that even inbox size limit in mb wasn’t reached after setting it to unlimited problem was gone.

Last edited: Sep 30, 2016

Contents

  1. Using LMTP over UNIX Socket
  2. Using LMTP over TCP Socket
  3. Striping domain to avoid user unknown / doesn’t exist error
  4. Verifying recipients using LMTP
  5. Delivering mails case insensitively

Exim provides support for LMTP over UNIX sockets using the LMTP transport, your distribution may/not provide this, run exim -bV and check for ‘lmtp’ in ‘Transports:’. Support for LMTP over TCP sockets is provided by the SMTP transport.

Using LMTP over UNIX Socket

Use this configuration if dovecot runs on the same host as exim.

Example router:

local_user:
        debug_print = "R: local_user for $local_part@$domain"
        driver = accept
        domains = +local_domains
        check_local_user
        transport = dovecot_lmtp
        cannot_route_message = Unknown user

Example transport:

dovecot_lmtp:
        driver = lmtp
        socket = /var/run/dovecot/lmtp
        #maximum number of deliveries per batch, default 1
        batch_max = 200
        #allow suffixes/prefixes (default unset)
        rcpt_include_affixes

Using LMTP over TCP Socket

Example router:

local_user:
        transport = dovecot_lmtp
        domains = +local_domains
        driver = manualroute
        route_list = "* 192.168.1.0 byname"
        #if destination server is the local host enable this
        #self = send

Set IP and port as appropriate to your setup.

Example transport:

dovecot_lmtp:
        driver = smtp
        #allow suffixes/prefixes (default unset)
        rcpt_include_affixes
        protocol = lmtp
        port = 2525

Striping domain to avoid user unknown / doesn’t exist error

If you are using a userdb which does not have domain names, you may need to add a setting to 20-lmtp.conf

protocol lmtp {
   ...
   # use %n to strip away the domain part
   auth_username_format = %n
}

Symptoms:

  • Exim says something like «LMTP error after RCPT … 550 … User doesn’t exist someuser@somedomain»
  • Dovecot verbose log says something like «auth-worker(9048): passwd(someuser@somedomain): unknown user»

Verifying recipients using LMTP

You can use callout verification to avoid accepting mail for addresses which do not exist in Dovecot. Below is a config snippet which could be used in acl_smtp_rcpt to achieve this:

deny
        message = invalid recipient
        domains = +local_domains
        !verify = recipient/callout=no_cache

For more information on address verification see the related section of the Exim specification.

Delivering mails case insensitively

Warning: Just use this setup if all your login names contain only lower case characters! (On Linux see /etc/adduser.conf under NAME_REGEX variable).

Exim retains the case of the local part. Dovecot’s LMTP may fail looking up an incorrect cased local part in your userdb. You can solve this problem by extending the protocol lmtp section:

protocol lmtp {
   ...
   # use %Ln to strip away the domain part
   auth_username_format = %Lu
}

(If you don’t mind allowing case insensitive logins for dovecoth authentication, you may set auth_username_format in the global configuration accordingly and renounce the above change).

In case you prefer to configure exim to lower case the local part instead, add a router just before your local delivery router:

lowercase_local:
        debug_print = "R: lower case local_part for local delivery"
        driver = redirect
        redirect_router = local_user
        data = ${lc:${local_part}}

Make sure to reference the name you have chosen for your local delivery router within redirect_router.


0

0

Настраиваю связку exim + cyrus_imap + mysql

Логины пользователей имеют вид user_xxx, ящики — user@domain

Почту предполагается хранить в imap.

При отправке по smtp получаю следующее сообщение в логах:

May 31 20:29:40 inside02 exim[7368]: Delay 0s for melchior.shinkei.ru [89.163.122.149] with HELO=shinkei.ru. Mail from shinkei@ya.ru to admin@kadva.ru.

May 31 20:29:49 inside02 exim[7368]: 1K2Txj-0001uq-2E <= shinkei@ya.ru H=melchior.shinkei.ru (shinkei.ru) [89.163.122.149] I=[77.222.32.6]:25 P=smtp S=227 from <shinkei@ya.ru> for admin@kadva.ru

May 31 20:29:49 inside02 exim[7395]: 1K2Txj-0001uq-2E ** admin@kadva.ru R=mysqluser T=cyrus_delivery: LMTP error after RCPT TO:<admin@kadva.ru>: 550-Mailbox unknown. Either there is no mailbox associated with thisn550-name or you do not have authorization to see it.n550 5.1.1 User unknown

Судя по всему мой EXIM пытается скормить cyrus письмо для admin@kadva.ru. При этом я желаю чтобы письма он кормил не для алиаса admin@kadva.ru к ящику kadva_1, а именно для kadva_1.

В конфиге EXIM по этому поводу есть:

# чё делаем с почтой

begin routers

# Поиск маршрута к хосту в DNS. Если маршрут не найден в DNS —

# то это `унроутабле аддресс`. Не проверяются локальные

# домены, 0.0.0.0 и 127.0.0.0/8

dnslookup:

driver = dnslookup

domains = ! +local_domains

transport = remote_smtp

ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8

no_more

system_aliases:

driver = redirect

allow_fail

allow_defer

data = ${lookup mysql{select alias.address from box, alias

where alias.address=’${quote_mysql:$local_part@$domain}’

and box.box_id=alias.box }}

mysqluser:

driver = accept

condition = ${if eq{}{${lookup mysql{select box.login from box, alias

where alias.address=’${quote_mysql:$local_part@$domain}’

and box.box_id=alias.box }}}{no}{yes}}

transport = cyrus_delivery

# начинаются транспорты — как доставляем почту

begin transports

# Доставка на удалённые хосты — по SMTP

remote_smtp:

driver = smtp

# Транспорт для доставки почты локальным пользователям.

cyrus_delivery:

driver = lmtp

socket = /var/imap/socket/lmtp

batch_max = 100

user = cyrus

address_file:

driver = appendfile

delivery_date_add

envelope_to_add

return_path_add

# Имя программы

address_pipe:

driver = pipe

return_output

# Транспорт для автоответов

address_reply:

driver = autoreply

Вообще всё нагло содрано с http://www.lissyara.su/?id=1626

только у меня база своя, и логин напрямую совпадает с именем папки юзера в imap.

Куда копать?

База алиасов:

alias_id

box (id бокса)

address (admin@kadva.ru например)

domain (id домена)

База боксов:

box_id

login (логин, он же имя папки в imap)

pass

База доменов:

domain_id

domain

active_flag

Последняя таблица юзается только для удобства

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Llvm error out of memory
  • Llvm error cannot select
  • Llt communication error
  • Llfs error at the mechanical e53
  • Llf parameter read error

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии