Re: [Exim] Changing/adding return_path

Top Page
Delete this message
Reply to this message
Author: Jim Knoble
Date:  
To: exim-users
Subject: Re: [Exim] Changing/adding return_path
Marc, what you want to do is called "rewriting the envelope sender".
In exim, you can do this using the "rewrite" portion of the
configuration file.

For example, my /etc/exim/exim.conf file contains:

# Macros defined at the top of the file:
REWRITE_DOMAINS_FILE = /etc/exim/rewrite-domains
REWRITE_FILE = /etc/exim/rewrite-table

# [Imagine the main settings, transports, directors, routers, and
# retry configuration here....]

  # Here's the rewrite configuration.
  *@partial1-lsearch*;REWRITE_DOMAINS_FILE \
    ${lookup{${local_part}@${domain}}lsearch{REWRITE_FILE}\
      {${value}}{${local_part}@${domain}}} \
    F


end

# [Imagine authentication configuration here....]

In /etc/exim/rewrite-domains is:

*.local

And in /etc/exim/rewrite-table:

  jmknoble@???:  jmknoble@???
  root@???:      jmknoble@???


The 'partial1-lsearch' in the REWRITE_DOMAINS_FILE allows the use of a
non-public top-level domain (such as '.local' in the example above).
If your local machine's domain is something like '.local.example.net',
you can probably simply use 'partial-lsearch'.

Note that the configuration above will rewrite your envelope sender
regardless of whether the message is for local or remote delivery.

If you wish your "real" address (i.e., the one at which you can receive
mail at your ISP) to appear in the 'From:' field, you should configure
your mailer appropriately (you seem to have already done that). You
may also wish to use a 'Reply-To:' field.

--
jim knoble | jmknoble@??? | http://www.jmknoble.cx/

Circa 2000-Jul-05 11:35:17 -0400 schrieb Marc Johnson:

: I need to know how to configure exim to reflect my true pop3 address
: form my ISP and not my machines domain and user. (I have been getting
: mail returned with the error: "senders address must exist.") I have
: read that you can add the variables return_path and sender_address, but
: can't figure out the syntax or where to apply them. I added the line:
: my_hdr From: \"$realname\" \<me@???\ > along with the set
: realname variable to my .muttrc file, but this didn't do the trick. My
: return path still says user@mymachine. I'm running debian 2.1 with
: exim, fetchmail, and mutt with a dialup ISP. I have successfully sent
: and received mail, but obviously from domains who don't care who the
: sender is.
:
: Maybe I'm not even headed in the right direction, I'm still figuring
: this out. If anyone could point me in the right direction, I'd
: appreciate it.