Hello everybody, 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). I tried many things with dpkg-reconfigure exim4-config without any success: my local mail (from cron for example) use always my isp domain and I would like it uses my hostname. So I have 2 questions: Is it possible to do this? (I didn''t find any solution on Internet) How to do this? Thanks for your answers. Greetings Philippe
On Fri, Nov 18, 2005 at 07:24:33PM +0100, ZePhilou 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). I tried many things with dpkg-reconfigure exim4-config without > any success: my local mail (from cron for example) use always my isp > domain and I would like it uses my hostname. > So I have 2 questions: > Is it possible to do this? (I didn''t find any solution on Internet)Very probably not with the debconf-driven configuration.> How to do this?Probably with a string expansion expression as rewrite item. Good luck. Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don''t trust Computers. They | Mailadresse im Header Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834 Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835
ZePhilou <philippe.musial@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. -- f.a.n.finch <dot@dotat.at> http://dotat.at/ NORWEGIAN BASIN: IN WEST, SOUTHWEST 4 OR 5, BECOMING VARIABLE 3 OR 4 IN NORTH. SNOW FOR A TIME. MODERATE OR GOOD. IN EAST, WEST OR NORTHWEST 3 OR 4, INCREASING 5 OR 6 IN SOUTH, POSSIBLY 7 LATER IN SOUTHEAST. OCCASIONAL SLEET.
On Fri, Nov 18, 2005 at 07:24:33PM +0100, ZePhilou wrote:> Date: Fri, 18 Nov 2005 19:24:33 +0100 > From: ZePhilou <philippe.musial@worldonline.fr> > To: Liste Exim Debian <pkg-exim4-users@lists.alioth.debian.org> > Subject: [Pkg-exim4-users] A problem with addresses rewriting > > Hello everybody, > > 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). I tried many things with dpkg-reconfigure exim4-config without > any success: my local mail (from cron for example) use always my isp > domain and I would like it uses my hostname. > So I have 2 questions: > Is it possible to do this? (I didn''t find any solution on Internet) > How to do this? > > Thanks for your answers. > Greetings > > PhilippeAre these local users? If so take a look at /etc/email-addresses. Steven. -- The nice thing about standards is that there are so many of them to choose from. -- Andrew S. Tanenbaum
On Fri, 2005-11-18 at 19:00 +0000, Tony Finch wrote:> ZePhilou <philippe.musial@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@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@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
ZePhilou a ?crit :> Hello everybody, > > 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). I tried many things with dpkg-reconfigure exim4-config without > any success: my local mail (from cron for example) use always my isp > domain and I would like it uses my hostname. > So I have 2 questions: > Is it possible to do this? (I didn''t find any solution on Internet) > How to do this? > > Thanks for your answers. > Greetings > > Philippe > > _______________________________________________ > Pkg-exim4-users mailing list > Pkg-exim4-users@lists.alioth.debian.org > http://lists.alioth.debian.org/mailman/listinfo/pkg-exim4-users >Thank you for all your answers, I finally found a solution to my problem by looking in the exim4 faq in file:///usr/share/doc/exim4-doc-html/html/FAQ_8.html#TOC278: it uses the same solution as Tony. Greetings. Philippe