Re: [exim] Archiving Problems

Top Page
Delete this message
Reply to this message
Author: Chris Wilson
Date:  
To: Dean Bishop
CC: exim users, Todd Lyons
Subject: Re: [exim] Archiving Problems
Hi Dean,

I'm getting very confused about what you're complaining about.

Please could you help us all by clearly stating the problem that you're
replying to/venting about?

Is it this one?

>> Grrrr....still can't seem to get this working.  I'm at my wit's end.
>>  If I understand this correctly the incoming_archiver router is passing
>> messages to the router even though they are directed to non-existent
>> accounts/aliases.


If so, why is it such a big problem that you're archiving messages to
nonexistent local addresses? Is it worth the trouble of trying to fix it?

Is all your "incoming" mail addressed to either a local user account
(listed in /etc/passwd), or an alias that expands to a list of local
users?

If so, then there's a conflict apparent:

* if you archive *before* alias expansion, you will archive some
messages addressed to invalid addresses, which therefore can't be
expanded

* if you archive *after* alias expansion, you will archive copies to each
of the expanded addresses (the "duplicates" you were complaining about
before?)

It's not going to be easy to have it both ways, but it is possible if
you're willing to manage exim.conf by hand. It may not be possible if you
insist on using cpanel to manage it, I don't know enough about cpanel to
advise you about this and I'm not willing to learn.

One way is, as I think Todd was suggesting, to add a condition to your
incoming archive router:

> Right. So whatever test you do to determine if it's an existing user or
> alias in the respective router, you also need to do on this archive
> router.


You may not yet have such a condition, as most people don't need it. In
which case you'll have to construct it. I can give you an example but
please DO NOT copy and paste it blindly without understanding what it does
and why.

Presumably you want to check that the destination address is either a
local user, or a valid alias that will expand to a list of local users.
And you only want to archive the mail if one of those conditions is true.

So you can add a condition to your incoming_archiver, SOMETHING LIKE this:

incoming_archiver:
     condition = ${if or \
         {${lookup {$local_part} lsearch {/my/aliases/file} {true}
             {false}}} \
         {${lookup passwd {$local_part} {true} {false}}} \
         }
     ...


I think that syntax is correct, but I haven't tested it.

Does that help?

Cheers, Chris.
-- 
_____ __     _
\  __/ / ,__(_)_  | Chris Wilson <chris+sig@???> Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
\__/_/_/_//_/___/ | We are GNU : free your mind & your software |