Michael Gracy
2006-Jun-18 07:45 UTC
[Pkg-exim4-users] Need to rewrite Reply-To: and possibly Sender
I know that most view this as the wrong thing to do, but I feel I have a decent reason why. I have a debian sarge box running exim4 configured with localhost.localdomain and routing through remote smtp smarthost. Email from it sends just fine via the phpmail module that the web site uses. The problem is that some external smtp servers are choking on Reply-To: www-data@localhost.localdomain. This is an obviously unroutable address. The From field is being populated correctly and the phpmail app does specify the Reply-To, but it''s getting rewritten by exim to the www-data address. I threw this into my update-exim4.conf.conf: dc_headers_rewrite=''$h_from: = $h_reply-to:'' Now I get in the header: Return-Path: <www-data@mydomain.com> This gets me half way there. Now I just need to be able replace the www-data with the value to the left of the @ in the From field. Any ideas? I am a complete newbie to Exim and am suprised I got this far. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.alioth.debian.org/pipermail/pkg-exim4-users/attachments/20060618/36e74acb/attachment.html
Andreas Metzler
2006-Jun-18 08:07 UTC
[Pkg-exim4-users] Need to rewrite Reply-To: and possibly Sender
On 2006-06-18 Michael Gracy <mgracy@bellamax.com> wrote:> I know that most view this as the wrong thing to do, but I feel I have a > decent reason why.> I have a debian sarge box running exim4 configured with > localhost.localdomain and routing through remote smtp smarthost. Email > from it sends just fine via the phpmail module that the web site uses.> The problem is that some external smtp servers are choking on Reply-To:> www-data@localhost.localdomain. This is an obviously unroutable > address.> The From field is being populated correctly and the phpmail app does > specify the Reply-To, but it''s getting rewritten by exim to the www-data > address.[...]> Any ideas? I am a complete newbie to Exim and am suprised I got this > far.[...] Would this in /etc/email-addresses www-data: the-valid-address@you.want work for you? cu andreas -- The ''Galactic Cleaning'' policy undertaken by Emperor Zhark is a personal vision of the emperor''s, and its inclusion in this work does not constitute tacit approval by the author or the publisher for any such projects, howsoever undertaken. (c) Jasper Ffforde
Magnus Holmgren
2006-Jun-18 22:00 UTC
[Pkg-exim4-users] Need to rewrite Reply-To: and possibly Sender
On Sunday 18 June 2006 09:32, Michael Gracy took the opportunity to write:> I know that most view this as the wrong thing to do, but I feel I have a > decent reason why. > > I have a debian sarge box running exim4 configured with > localhost.localdomain and routing through remote smtp smarthost. Email > from it sends just fine via the phpmail module that the web site uses. > > The problem is that some external smtp servers are choking on Reply-To: > > www-data@localhost.localdomain. This is an obviously unroutable > address. > > The From field is being populated correctly and the phpmail app does > specify the Reply-To, but it''s getting rewritten by exim to the www-data > address.Do you really mean Reply-To:? There is no reason for Exim to rewrite it; you''d have to configure it explicitly. Are you talking about Sender or Return-Path? Note that Return-Path is normally not added until the mail is delivered to the final recipient, because it contains the envelope sender which is until then transported outside of the message itself.> I threw this into my update-exim4.conf.conf: > > dc_headers_rewrite=''$h_from: = $h_reply-to:'' > > Now I get in the header: Return-Path: <www-data@mydomain.com> This gets > me half way there. Now I just need to be able replace the www-data with > the value to the left of the @ in the From field. > > Any ideas? I am a complete newbie to Exim and am suprised I<m got this > far.You can add www-data to trusted_users. That will stop Exim from messing with any headers or envelope senders and let phpmail specify any values. Which might be a bad thing if users can run their own PHP scripts as www-data. -- Magnus Holmgren holmgren@lysator.liu.se (No Cc of list mail needed, thanks) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://lists.alioth.debian.org/pipermail/pkg-exim4-users/attachments/20060618/1adcb3e7/attachment.pgp