[Exim] smartuser new_address problem

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: John Horne
Fecha:  
A: Exim Users List
Asunto: [Exim] smartuser new_address problem
Hello,

I have, recently, modified our configure file to try and improve things a
little for us. However, I now seem to have hit an odd side-effect with
the smartuser director which is going to be a problem. This is with exim
3.03.

The scenario goes:

1) mail arrives for me at the mailhub; header and envelope 'to' addresses are
'jhorne@???'
2) Rewriting rules on the envelope MAIL TO address do a file lookup to see
which, if any, file server my mail is to go to. For me it's 'csuf11.csd'.
So the envelope address becomes: jhorne@???
3) Exim now runs through the directors - the file server being local - and
this includes a 'redirection' lookup. I.e.does this user want their mail
sent elsewhere. I do, I want it to go to my PC
'jhorne.csd.plymouth.ac.uk'. The 'redirections' director (below) is a
smartuser and sets the 'new_address' according to the result of the
lookup. In my case 'new_address' becomes 'john@???'.

Now at this point there is, generally, no problem. The headers are okay and
the mail gets sent to my PC. However, as with recently, I wanted to hold
my mail (using 'hold_domains') on the mailhub. But 'mailq' showed my mail as
being sent to 'csuf11.csd.plymouth.ac.uk' (despite it actually arriving on
my PC). I cannot hold the mail for the whole file server so I was stuck.

It seems that the smartuser director determines the new envelope MAIL
TO address but does not 'use' it within exim until it has to send the
message (hence mailq still shows the old address of 'csuf11'). Is there any
way of getting the address recognised straightaway so that I can hold the
domain?

I have tried using the 'rewrite' option to no effect -
'jhorne.csd.plymouth.ac.uk' is not local and so no rewriting occurs under
our rules. I have tried setting the 'hosts' option on the transport to the
same address via a lookup but, again, no difference. I have run exim -bt
with a '-d9' option - that is how I see the above happening. Finally, we
don't want to do the redirection lookup as part of the rewriting rules
since we used to do that and found it gave us other (non-exim related)
problems - hence why I changed things.

As always, any ideas/help appreciated.


(Transport used):

plym_smtp:
driver = smtp
allow_localhost
no_multi_domain
hosts = $domain
mx_domains = ! LOCAL_DOMAINS : ! cdb;TABLES/test-domains.cdb : *.PLYMOUTH
: *.PLYM_SHORT

(Director used):

redirections:
  no_expn
  domains = NLOCAL : *
  driver = smartuser
  new_address = "${lookup {${lc:$local_part}} cdb {TABLES/redirections.cdb} \
                   {$value} fail}"
  transport = plym_smtp
  errors_to = POSTMASTER
  no_rewrite





John.

--------------------------------------------------------------------------
John Horne, University of Plymouth, UK             Tel: +44 (0)1752 233914
E-mail: jhorne@???
Finger for PGP key: john@???