[Exim] EXIM4 - remote_smtp delivery to user@local.domain - S…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Clive Menzies
Dátum:  
Címzett: exim-users
CC: debian-user
Tárgy: [Exim] EXIM4 - remote_smtp delivery to user@local.domain - SOLVED!
Hi

This may be obvious to many but I found a dearth of information on how
to deal with my situtation and I thought that my fix may be of some help
to some other desperate soul like myself. It took me a while to crack
this:

Scenario: I have a local domain, clivemenzies.co.uk, for which I have two
POP3 accounts: clive@clivemenzies anything@???. I also
have two other POP3 accounts for two other domains which are treated as
local; for the purpose of this discussion I will ignore these but the fix
applies to these as well.

My partner is partner@??? and retrieves her mail via a
POP3 account.

Problem: How do I send messages to my partner? The default "smarthost"
setup only delivers remote_smtp mail where the domain is not a local
domain.

Solution: I added a router to the file:
/etc/exim4/conf.d/router/900_exim4-config_local_user

### router/900_exim4-config_local_user
#################################

local_user:
debug_print = "R: local_user for $local_part@$domain"
driver = accept
check_local_user
local_parts = ! root
transport = LOCAL_DELIVERY


### This is to deal with non_local_users@local_domains
#######################################################

internet:
    driver = manualroute
    domains = +local_domains
    transport = remote_smtp
    route_list = * smtp.my.isp


If there is no local user, this router passes it to the remote_smtp
transport. It works here ;)

YMMV

Regards

Clive
--
http://www.clivemenzies.co.uk
strategies for business