Re: [exim] Oh boy, am I in trouble ...

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Tor Slettnes
Fecha:  
A: exim
Cc: exim-users@exim.org
Asunto: Re: [exim] Oh boy, am I in trouble ...

On Sep 22, 2004, at 13:27, exim@??? wrote:
> Ok, I removed Exim 3 from my debian system and replaced it with Exim
> 4. So far so good. Unlike Exim 3, which had a single configuration
> file called exim.conf, Exim 4 appears to distribute configuration
> information over several directories / files (I chose the "Do NOT
> distribute configuratin over multiple files option"!)?


You can re-make that choice by running:

     # dpkg-reconfigure --priority=low exim4-config


In any case, it may be that those files are created even if you choose
the single file option (I don't actually know this for sure).

Look for /etc/exim4/exim4.conf - if it exists, that's the one you
should edit.


> If so, then I'm lost, seeing as the official documentation states:
> Exim uses a single run time configuration file that is read whenever
> an Exim binary is executed


If you choose split configuration files, these are assembled together
to a single configuration file (/var/lib/exim4/config.autogenerated) by
the Exim startup script (/etc/init.d/exim4) as needed upon (re)start.


> So, I need some help with rewriting rules and routing.
>
> I need to add rewrite information. The relevant files appear to be
> located in /etc/exim4/conf.d/rewrite/
> There are two files there. One is called "31_exim4-config_rewriting".
> The other is called "00_exim4-config_header"


Do not modify the 00_ one. You _may_ modify the 31_ file. However, it
may be cleaner to create a new file, e.g. "50_local-config_rewriting".
That way, the stock file can be upgraded effortlessly by future
versions of the "exim4-config" package.


> Can someone please tell me which file I need to modify, and what I
> need to write into that file for either of the following two scenarios:
> Scnario 1. I want all outgoing email to appear as having been sent
> from domain_official.com, even though the host is
> domain_some_other_name.com.


Usually, the sender address (both the "MAIL FROM:" envelope sender and
the address in the "From:" header line) are generated by the MUA,
irrespective of your MTA's host name.

That said, you should be able to do something like the following
(untested):

*@original-domain    $local_part@official-domain  Ffrs




> Scenario 2. I want specific users to be mapped to some other domain,
> i.e. local user "info"'s email should not appear as being sent from
> deomain_official.com, but rather from domain_alternate.com. All three
> domains - domain_official.com, domain_some_other_name.com,
> domain_alternate.com - are local domains, with
> qualify_domain=domain_some_other_name.com


The 31_exim4-config_rewriting does contain a hook suitable for this.
Simply add something like the following to your /etc/email-addresses:

     info: info@alternate-domain



> Does anyone understand what this means? I.e. is the use of an
> email-addresses file outdated, or is the use of the exim4 directory as
> the location for the email-addresses file outdated? Since the code
> appears to be accessing CONFDIR/email-addresses, wouldn't CONFDIR
> evaluate to exim4, instead of exim? Thus, wouldn't
> exim4/email-addresses be the correct location for the addresses file?


The old (outdated) location was /etc/exim4/email-addresses.
The new location is /etc/email-addresses. (This file is, conceivably,
not Exim specific).

-tor