[exim] How to set the outgoing SMTP IP address

Top Page
Delete this message
Reply to this message
Author: Grant Peel
Date:  
To: exim-users
Subject: [exim] How to set the outgoing SMTP IP address
Hi all,

For a number of weeks now, I have been trying to figure out how to set the outgoing IP address when an authenticated user sends an email. I have not been successful as of yet. I want to do this to track bandwidth usage.(I have ipfw and ipa setup to do the actual tracking). Right now, all email is being sent via the local host IP address.

If anyone is interested in helping me with the configure code, I would be forever greatful!

Here are some details on my setup:

- About 250 domains on each server, with thier own IP address,
- Every user must authenticate before they are allowed to send a message, using the AUTHENTICATION CONFIGUREATION (see Below),
- My nameservers are authoritive for reverse DNS, each domain has an enty (and again, its own IP),
- OS =FreeBSD
- Exim = 4.6 running in daemon mode. I would not like to run a daemon for each IP or domain, but make the changes globaly, if possible.
- I am running spamd, but only on incomming messages.

-Grant

######################################################################
#                   AUTHENTICATION CONFIGURATION                     #
######################################################################


# There are no authenticator specifications in this default configuration file.

begin authenticators

# For Netscape/Mozilla
plain:
  driver = plaintext
  public_name = PLAIN
  server_condition = "${if and{ {!eq{$2}{}}{!eq{$3}{}} \
   {crypteq {$3} {${lookup {${local_part:$2}} lsearch \
                            {/etc/virtual/${domain:$2}/passwd}\
                            {$value} {*:*}}}} } {1}{0}}"
  server_set_id = $2


# For Outlook/Outlook Express
login:
  driver = plaintext
  public_name = LOGIN
  server_prompts = "Username:: : Password::"
  server_condition = "${if and{ {!eq{$1}{}}{!eq{$2}{}} \
   {crypteq {$2} {${lookup {${local_part:$1}} lsearch \
                            {/etc/virtual/${domain:$1}/passwd}\
                            {$value} {*:*}}}} } {1}{0}}"
  server_set_id = $1