[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Exim rewriting addresses



David Purton wrote:

> On Tue, 1 May 2001 mdevin@ozemail.com.au wrote:
>
> > I am having some difficulty understanding how the last section of
> > /etc/exim.conf rewrites addresses. Here is the part of the config
> > file in question: *@localhost
> > ${lookup{$1}lsearch{/etc/email-addresses}\
> >                                                 {$value}fail} Ffrsw
> > Here is what I have in /etc/email-addresses:
> > algemon: mdevin@ozemail.com.au
> >
> > Now when I send mail from mutt as user algemon it seems to rewrite the addresses
> > OK.  If I send mail from Netscape I still have the sender: algemon in the header
> > but at least the From: header is correct.
> > But if I send mail from the command line with mailx like:
> > cat file.txt | mailx -s "Subject" algemon@localhost then I still see
> > headers like:
> >
> > To: algemon@localhost
> > Subject: Subject
> > Message-ID: <E14uZbh-0001Xr-00@debian>
> > From: "algemon,,," <mdevin@ozemail.com.au>
> > Date: Tue, 01 May 2001 22:50:21 +1000
> >
> > How do I set it up so that the From: field is rewritten to
> > "mdevin@ozemail.com.au"
> > when mailing from mailx?
> > And how do I set it up so that the Sender: field when mailing from Netscape is
> > "mdevin@ozemail.com.au
> > and nothing else?
> >
> > Any ideas where the rewriting rule in exim.conf is wrong?
> >
>
> You problem is in the flags (the Ffrsw) at the end of the line.
>
> The Exim manual has this to say on rewriting flags:
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> 34.6 Flags specifying which headers and envelope addresses to rewrite
>
> If none of the following flag letters, nor the `S' flag (see section
> 34.7) are
> present, a main rewriting rule applies to all headers and to both the
> sender
> and recipient fields of the envelope, whereas a transport-time rewriting
> rule
> just applies to all headers. Otherwise, the rewriting rule is skipped
> unless
> the relevant addresses are being processed.
> E       rewrite all envelope fields
> F       rewrite the envelope From field
> T       rewrite the envelope To field
> b       rewrite the Bcc: header
> c       rewrite the Cc: header
> f       rewrite the From: header
> h       rewrite all headers
> r       rewrite the Reply-To: header
> s       rewrite the Sender: header
> t       rewrite the To: header
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> so to rewrite To: fields, include Tt in the flags.
>

No, I don't want to rewrite the To: fields, only the from, sender and reply-to
fields.

I think the flags I have chosen are OK but it still doesn't seem to be working
properly.

Mark.




Reply to: