Re: [exim] R: Exim4 And outgoing Filters

Page principale
Supprimer ce message
Répondre à ce message
Auteur: W B Hacker
Date:  
À: exim users
Sujet: Re: [exim] R: Exim4 And outgoing Filters
Davide Minardi wrote:
>
> This is router section of conf file
>
>
> ### router/200_exim4-config_primary
> #################################
> # This file holds the primary router, responsible for nonlocal mails
>
> .ifdef DCconfig_internet
> # configtype=internet
> #
> # deliver mail to the recipient if recipient domain is a domain we
> # relay for. We do not ignore any target hosts here since delivering to
> # a site local or even a link local address might be wanted here, and if
> # such an address has found its way into the MX record of such a domain,
> # the local admin is probably in a place where that broken MX record
> # could be fixed.
>
> dnslookup_relay_to_domains:
> debug_print = "R: dnslookup_relay_to_domains for $local_part@$domain"
> driver = dnslookup
> domains = ! +local_domains : +relay_to_domains
> transport = remote_smtp
> same_domain_copy_routing = yes
> no_more
>
> # deliver mail directly to the recipient. This router is only reached
> # for domains that we do not relay for. Since we most probably can't
> # have broken MX records pointing to site local or link local IP
> # addresses fixed, we ignore target hosts pointing to these addresses.
>
> dnslookup:
>   debug_print = "R: dnslookup for $local_part@$domain"
>   driver = dnslookup
>   domains = ! +local_domains
>   transport = remote_smtp
>   same_domain_copy_routing = yes
>   # ignore private rfc1918 and APIPA addresses
>   ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/16 :\
>                         172.16.0.0/12 : 10.0.0.0/8 : 169.254.0.0/16
>   no_more

>
> .endif
>
>
> .ifdef DCconfig_local
> # configtype=local
> #
> # Stand-alone system, so generate an error for mail to a non-local domain
> nonlocal:
> debug_print = "R: nonlocal for $local_part@$domain"
> driver = redirect
> domains = ! +local_domains
> allow_fail
> data = :fail: Mailing to remote domains not supported
> no_more
>
> .endif
>
>
> .ifdef DCconfig_smarthost DCconfig_satellite
> # configtype=smarthost or configtype=satellite
> #
> # Send all non-local mail to a single other machine (smarthost).
> #
> # This means _ALL_ non-local mail goes to the smarthost. This will most
> # probably not do what you want for domains that are listed in
> # relay_domains. The most typical use for relay_domains is to control
> # relaying for incoming e-mail on secondary MX hosts. In that case,
> # it doesn't make sense to send the mail to the smarthost since the
> # smarthost will probably send the message right back here, causing a
> # loop.
> #
> # If you want to use a smarthost while being secondary MX for some
> # domains, you'll need to copy the dnslookup_relay_to_domains router
> # here so that mail to relay_domains is handled separately.
>
> smarthost:
> debug_print = "R: smarthost for $local_part@$domain"
> driver = manualroute
> domains = ! +local_domains
> transport = remote_smtp_smarthost
> route_list = * DCsmarthost byname
> host_find_failed = defer
> same_domain_copy_routing = yes
> no_more
>
> .endif
>
>
> dnslookup:
> driver = dnslookup
> domains = ! +local_domains
> transport = remote_smtp
> ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8


    unseen


## Insert 'unseen' here. See note below
>
> sentarchiver:
> driver = dnslookup
> domains = ! +local_domains
> transport = sent_archive_delivery
> ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
>
> sent_archive_delivery:
> driver = appendfile
> user = raziel
> group = raziel
> delivery_date_add
> envelope_to_add
> return_path_add
> maildir_format=true
> mode = 0770
> directory = /home/raziel/Maildir/.Sent
> create_directory = true
> directory_mode = 0770
> no_mode_fail_narrower
>
>
>
>
> # The "no_more" above means that all later routers are for
> # domains in the local_domains list, i.e. just like Exim 3 directors.
> #####################################################
> ### end router/200_exim4-config_primary
> #####################################################
> ----- Original Message -----
> From: "W B Hacker" <wbh@???>
> To: "exim users" <exim-users@???>
> Sent: Wednesday, August 30, 2006 10:17 AM
> Subject: Re: [exim] R: Exim4 And outgoing Filters
>
>
>
>>Davide Minardi wrote:
>>
>>
>>>ok the problem is in the last chunk of code ... sent_archive_delivery...
>>>+
>>>Error message :
>>>router sent_archive_delivery : cannot find rouiter driver " appendfile "
>>>..invalid new config file ----- bla bla bla
>>>
>>>;????
>>
>>Cut and paste that whole section - unaltered. No need to obfuscate - there
>>is
>>noting all that sensitive in the router/transport section.
>>
>>I suspect you have a faulted line-break, missing colon, or extraneous '#'.


That's not it, BUT you need an 'unseen' between the dns_lookup and sentarchiver
routers. Inserted above where it needs to be.

Without an 'unseen' the preceeding 'dnslookup:' router handles the traffic that
has not already been actioned by the preceding routers, and no further routers
are looked at.

N.B. - no traffic handled by any of the OTHER routers will be archived either.

If you want that, you will need a similar 'unseen' followed by code for
archiving. You might, for example, store incoming/outgoing separately, NOT
archive for system users - etc. Up to you.

Also, Exim has at least one other built-in way of making multiple
copies/deliveries. This is just the one I use, as we have several different
archiver types. Some share storage, others do not.

Otherwise: No hard evidence yet furnished as to why Exim cannot find an
appendfile driver, but the most probable is outlined below:

>>
>>Do also, from the CLI:
>>
>>exim -bV
>>
>>(uppercase'V' there)
>>
>>And paste that too.
>>
>>Waitin'
>>


That should list the routers and transports that Exim was compiled with.

snippet example from mine:

Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp

If your 'exim -bV' does not list 'appendfile' then you will need to either alter
the code to use one of the transports you DO have, ELSE recompile to include the
'appendfile' transport type needed for the above code.

AFAIK, 'appendfile' is normally included when Exim is compiled with the default
settings. Debian may do otherwise.


HTH,

Bill