Re: [exim] Archiving Problems

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Dean Bishop
日付:  
To: exim users
題目: Re: [exim] Archiving Problems
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.

All of the accounts are listed in folders that my local_parts directive expands and the aliases are all in files named /etc/valiases/$domain. So I need to prevent this router from routing if the $local_part of the message does not exist in either of these files.

Todd, I understand on a basic level what you are saying but I cannot figure out how to accomplish it. Would it be possible to get you to have a look at the current router config below and show me what I should be doing?

Many thanks,
dean


incoming_archiver:
#condition = ${if and {{exists{${extract{5}{:}{${lookup passwd{${lookup{$domain}lsearch*{/etc/userdomains}{$value}}}{$value}}}}/etc/$domain/passwd}}{!eq{$local_part}{root}}} }
#condition = ${if and {{eq{lsearch;${extract{5}{:}{${lookup passwd{${lookup{$sender_address_domain}lsearch*{/etc/userdomains}{$value}}}{$value}}}}/etc/$sender_address_domain/passwd}{$sender_address_local_part}}{eq{lsearch;/etc/valiases/$sender_address_domain}{$sender_address_local_part} }}}
#condition = ${if and {{exists{${extract{5}{:}{${lookup passwd{${lookup{$sender_address_domain}lsearch*{/etc/userdomains}{$value}}}{$value}}}}}}}{exists{${extract{5}{:}{${lookup passwd{${lookup{$domain}lsearch*{/etc/userdomains}{$value}}}{$value}}}}}}}} }
###
### Need to ensure that this address exists as an account or alias
### should be able to do this by ensuring that it is in
### /etc/valiases/$domain
###
#condition = ${if {lookup {$local_part}lsearch;{/etc/valiases/$doamin}fail}}
no_expn
no_verify
unseen
domains = +local_domains
local_parts = lsearch;${extract{5}{:}{${lookup passwd{${lookup{$domain}lsearch*{/etc/userdomains}{$value}}}{$value}}}}/etc/$domain/passwd
transport = incoming_local_copy
driver = accept


-----Original Message-----
From: tlyons@??? [mailto:tlyons@sitehelp.org] On Behalf Of Todd Lyons
Sent: Wednesday, November 30, 2011 8:43 AM
To: Dean Bishop
Cc: exim users
Subject: Re: [exim] Archiving Problems

On Wed, Nov 30, 2011 at 3:46 AM, Dean Bishop <dbishop@???> wrote:
> I understand what's going on (you can't search a file that doesn't exist) but I can't seem to find the proper solution.  The line causing me trouble is in the incoming archiver and tests to ensure that the message is addressed to a locally held account/alias:
>
> local_parts =
> lsearch;${extract{5}{:}{${lookuppasswd{${lookup{$domain}lsearch*{/etc/
> userdomains}{$value}}}{$value}}}}/etc/$domain/passwd
>
> Is there a better way to test to ensure that the email account/alias exists that won't generate this sort of error?


The easiest way seems to be to go the manual route and make two copies of the archiver. Have the first router detect if it's an alias and if it is (you'll have to construct a "condition" statement that does this for you), then don't do the passwd check above. Instead do a more limited test to determine if the alias is valid. The second router should basically detect if it's NOT an alias and then do the local_parts test above.

Regards...      Todd
--
If Americans could eliminate sugary beverages, potatoes, white bread, pasta, white rice and sugary snacks, we would wipe out almost all the problems we have with weight and diabetes and other metabolic diseases. -- Dr. Walter Willett, Harvard School of Public Health