Re: [exim] Using Full Email Address for Cyrus LMTP Deliver

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Patrice Fournier
Dátum:  
Címzett: Andre Nicholson
CC: exim-users
Tárgy: Re: [exim] Using Full Email Address for Cyrus LMTP Deliver
Quoting Andre Nicholson <andre@???>:

> I'd like to transition Exim to deliver to LMTP as opposed to calling
> Cyrus's deliver command manually like I'm doing now. The problem that
> I'm having is that the '@' character (at sign) must be escaped in order
> for LMTP to accept it.


> Here are the relevant routers and transport I'm trying:
>
> begin routers
>
>      escape_at_sign:
>          driver          = redirect
>          redirect_router = cyrus_router
>          domains         = +local_domains
>          data            = $local_part\\@$domain

>
>      cyrus_router:
>          driver    = accept
>          domains   = +local_domains
>          transport = cyrus_delivery


Here are the routers I use:

pre_cyrususer:
driver = redirect
hide_child_in_errmsg
data = ${quote:${local_part}@${domain}}@${domain}
redirect_router = cyrususer

cyrususer:
driver = accept
# local_part contains the domain here (format is <"user@domain"@domain>)
log_as_local = true
retry_use_local_part
transport = cyrus_lmtp_delivery

> begin transports
>
>      cyrus_lmtp_delivery:
>          driver                = smtp
>          rcpt_include_affixes  = true
>          gethostbyname         = true
>          transport_filter      = /usr/bin/tr -d \\000
>          protocol              = lmtp
>          hosts                 = localhost
>          allow_localhost


And here is the transport:

cyrus_lmtp_delivery:
driver = lmtp
socket = /var/run/cyrus/socket/lmtp
envelope_to_add
user = cyrus
# No batching as envelope_to: would contain all batched addresses
together.

> What happens however is that Exim alters the sender address to append
> $primary_hostname. In my above LMTP session, the sender address at the
> cyrus_transport router ends up being
> <webmaster\@neo-anime.org@???> and fails.


Exim wants a domain name so you must give it one... just need to make sure
the domain name you give will be accepted by your next router...

--
Patrice Fournier