Re: [Exim] use of gecos field

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Philip Hazel
Data:  
Para: Phil Chambers
CC: exim-users
Assunto: Re: [Exim] use of gecos field
On Mon, 21 Aug 2000, Phil Chambers wrote:

> First, I want Exim to completely ignore the gecos field, but don't see how to. I
> tried setting gecos_pattern to something which would never match:
>
> - gecos_pattern = "^(,,)$"
> - gecos_name = $1
>
> but Exim then used the whole gecos field, presumably because gecos_name is then
> unset. How do I get it to leave my From: and Sender: headers alone?


What you should do is set a gecos pattern that *always* matches, and
then set the name to an empty string.

gecos_pattern = ^
gecos_name = ""

That, of course, doesn't ignore it, strictly. It just uses an empty
string.

If you provide a complete From: header, it won't touch it. It only
uses the gecos field if it finds a From: header of the form

From: local-user

i.e. just a login name without a domain. This is done because that is
what Sendmail does, and I was asked to make Exim compatible. So blame
Sendmail. If the From: line is in any other form, Exim will leave it
along. Just adding the domain (to make it a proper RFC 822 address) is
enough.

Exim removes existing Sender: headers and inserts its own if the caller
is untrusted and the From: header is not the caller. Read up in the
manual about trusted callers. You can stop it adding Sender: headers by
setting no_local_from_check.

> Second, I have a configuration which does not regard any user as local and forwards
> everything to another system. Even this uses the gecos field to modify the From:
> header!


Any message that is sent from a non-trusted local process has its From:
and Sender: headers checked.

> How can this go looking at the gecos field when nothing is local?


The message is submitted locally. Where it is delivered isn't relevant.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.