[Pkg-exim4-users] A problem with addresses rewriting
Ross Boylan
ross at biostat.ucsf.edu
Tue Nov 22 18:32:48 UTC 2005
On Fri, 2005-11-18 at 19:00 +0000, Tony Finch wrote:
> ZePhilou <philippe.musial at worldonline.fr> wrote:
> >
> >I hopelessly try to configure exim to get it to rewrite *only* addresses
> >of mail which is intended for the *outside* of my Debian box (outgoing
> >mails).
>
> It's easiest to use headers_rewrite on the relevant transport.
> You will probably also want to use the return_path setting to
> alter the envelope sender address.
>
> Tony.
The approach Tony outlined worked for me:
I added /etc/exim4/conf.d/transport/30_exim4_config_remote_smtp_rb:
# RB adds rewriting for all outbound mail 7/4/03
# RB 10/7/05
# convention is regular rewrites turn local
# addresses in @$primary_hostname for most of processing
# Outbound transports rewrite that as below, since
# current primary_hostname (iron.psg.net) is inaccessible
# to the world.
# The rewriting probably should be more selective about
# which users it takes.
headers_rewrite = *@$primary_hostname $1 at biostat.ucsf.edu
return_path = ${if eq{${domain:$return_path}}{$primary_hostname} \
{${local_part:$return_path}@biostat.ucsf.edu}{$return_path}}
Because of the file name these options are added to the standard
remote_smtp transport.
--
Ross Boylan wk: (415) 514-8146
185 Berry St #5700 ross at biostat.ucsf.edu
Dept of Epidemiology and Biostatistics fax: (415) 514-8150
University of California, San Francisco
San Francisco, CA 94107-1739 hm: (415) 550-1062
More information about the Pkg-exim4-users
mailing list