Re: [Exim] relaying for another domain

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Nico Erfurth
Fecha:  
A: exim-users
Asunto: Re: [Exim] relaying for another domain
Nico Erfurth wrote:
> edouard.boucher@??? wrote:
>
>> Hi,
>>
>> I am using a domainlist router to relay mail for another domain when
>> it's smtp
>> server is down. I store the mail for that domain in a single file in
>> BSMTP format.
>>
>> Here is an extract from the exim FAQ :
>>
>> Large ISPs who provide this kind of functionality do not usually
>> leave waiting
>> mail on the MTA's queue. Instead, they get it delivered into per-host
>> directories, one message per file, in one of the special formats (BSMTP,
>> maildir, or mailstore)
>>
>> Why does the FAQ say the mail have to be stored in seperate file ?
>> when I transfer the mails to the other host i think it cost less to
>> transfer a
>> single file than to open different file.
>
> I could think of some reasons.
>
> if you want to feed the messages back into you exim, you first read a
> list of available bsmtp-files for this domain, and then pump them into
> exim via exim -bS, if the messages fail again, they will be written to a
> new file, instead of appended to your current one (if you use a
> singlefile solution) this could end in a endless loop, or you have to
> care about locking issues etc. etc.
>
>> lets say the domain i relay is domain1.com
>> when i receive a mail from the outside world for x@???, i
>> store it in a
>> BSMTP file, whithout even trying to transfer to it's MX, because if
>> the message
>> when to my smtp server, that means that the primary MX for domain1.com
>> is down
>> (my smtp server is the second MX)
>>
>> the problem is that when i send a mail to that domain from my smtp
>> server, it is
>> stored in that file without trying to contact it's primary MX.
>>
>> I would like for mail to domain1.com from my host to first try a normal
>> lookuphost and then if it fails use the BSMTP transport.
>>
>> how can i set that ?
>
>
> remove the no_more option from the lookuphost-router


silly me, this is an bad idea!!

IMHO it should look like this

lookuphost:
driver = dnslookup
domains = !+local_domains: !+relay_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more

lookuphost_backup:
driver = dnslookup
domains = ! +relay_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8

catch_backup:
driver = accept
domains = !+relay_domains
tranport = bsmtp_transport
no_more


ciao