[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fw: Exim4 Sender Address Rewriting



>> 1 - Mail sent by smarthost; received via SMTP or fetchmail
>> 2 - System mail name: starpoint.local
>> 3 - IP Addresses to listen on: 127.0.0.1:"my LAN IP" (this is the IP
>> address, not the text of course)
>> 4 - Other destinations for which mail is accepted: blank
>> 5 - Domains to relay mail for: blank
>> 6 - Machines to relay mail for: 127.0.0.1:"my LAN network/subnet"
>> 7 - Machine handling outgoing mail for this host (smarthost):
>> mail.bigpond.com
>> 8 - Keep number of DNS queries minimual: No


>> I can't use the built in /etc/email-addresses because when I do this,
>> it rewrites all mail and gets sent via my ISP rather than just going
>> from mailbox to mailbox locally.

I did the following:

1. Created normal /etc/email-addresses

2. Commented out the relevant part of rewrite/31_exim4-config_rewriting :

#    # This rewriting rule is particularily useful for dialup users who
#    # don't have their own domain, but could be useful for anyone.
#    # It looks up the real address of all local users in a file
#    *@+local_domains ${lookup{${local_part}}lsearch{/etc/email-addresses}\
#                      {$value}fail} Ffrs

3. Put the following to transport/30_exim4-config_remote_smtp :
------------------
# This transport is used for delivering messages over SMTP connections.
remote_smtp:
  debug_print = "T: remote_smtp for $local_part@$domain"
  driver = smtp
headers_rewrite = *@+local_domains \
    ${lookup{${local_part}}lsearch{/etc/email-addresses}{$value}fail}
return_path = ${if match{$return_path}{\N^([^@]+)@renard$\N}\
        {${lookup{$1}lsearch{/etc/email-addresses}{$value}fail}}fail}
------------------

Rationale:
http://www.exim.org/exim-html-4.30/doc/html/FAQ_8.html#TOC260
(Answer 0803)

Hope this helps

Cheers,
Alex



Reply to: