logs archiveIRC Archive / Freenode / #exim / 2010 / January / 18 / 1
adegtyarev
Hi all
the question is: is it possible to remove some headers with headers_remove not only for normal mail but for bounces as well ?
I want bounced message included in bounce body with all it's headers doesn't contain headers mentioned with headers_remove in router/transport.
Faustov
hello, I wrote a router with local_parts = /some/file, but this compares the local part of the sender - is there a way to rewrite it to compare the recipient?
or if you have other ideas how to define such condition, please let me know
djce
Faustov: have you tried using "exim -bt" to test the routing?
adegtyarev
"senders" option should work for this.
Faustov
djce: i'm testing with -bh most of the time and I see the expansion of the test - it compares sender to /some/file, while I want to compare recipient to /some/file (to be exact, the local part of it)
adegtyarev: ^
djce
ok. so, did you test with -bt ?
Faustov
djce: no, because the user is not local - I first allow certain users defined in /some/file to pass ACLs, then in a router perform an operation if the local part of the recipient is defined in /some/file
with -bt it autofails
djce
Do you mean that your routing depends on $acl_* variables?
Faustov
djce: In an ACL I drop mail with verify recipient, with one exception - local parts in /some/file
in the ACL local_parts = /some/file compares to the recipient local parts
it doesn't do the same in the router
         

djce
(Action) waits for Faustov to answer the question.
Faustov
answer: yes
djce
ok, thanks
Faustov
anyway, is this a bug? (different local_parts handling)
djce
I doubt it, but it's unclear from your explanation so far.
"local_parts" in a router tests the local part of the address being routed
(which may be the sender or a recipient)
in ACLs, it depends on which ACL you're running, IIRC#
Faustov
right
then how would you check in a router if the recipient's local part of the routed message is defined in a file?
djce
local_parts, like you say.
Debugging routing which depends on acl_* variables can be tricky.
Faustov
hmm
djce
I suggest you keep doing what you're doing, making extensive use of the docs, and exim -d+all -bh
Not sure what else I can suggest without seeing the output of that debug.
Faustov
it's the second day, i'm out of ideas
w8, i'll try to pastebin an example
djce
don't forget to clearly point out "it should do X here, it does Y".
henk
Faustov: afaict you need a "senders" statement...
Faustov
henk: I've added senders = * before the check but it doesn't change anything - what is your suggestion?
djce
Faustov: you're not helping us help you. Yes, maybe there is a bug: so to prove it, let's see your config and the output of "exim -d+all ...." showing the problem.
(or of course it might show that there is no bug, and we can find out what else is wrong).
henk
Faustov: well, did you really expect the condition "senders = *" to change anything? o_O
Faustov
henk: no, but couldn't figure out how senders statement could help
djce: http://pastebin.com/d4de24bba
djce
or, read the documentation and fix it yourself. <shrug>. Happy to help, but you're not giving us much to go on.
(Action) looks
Faustov
sry, trying
djce
Is that the output of "-d+all" ?
Faustov
hmm, no, my bad, one second
         

djce
also, on what line is the error?
henk
Faustov: paste the configuration snippet responsible for this: "lsearch;/home/msexchange/output/msexchange.txt"? no (end of list) <---------------------------------- expected: michael.busby in lsearch - the rcpt.
djce
(Action) wonders if Faustov is confused by the fact that "require verify = sender" in a rcpt ACL will route the sender, not the recipient.
Faustov
djce: http://pastebin.com/d5887e275 <--- line 143
hmm could it be...
djce
(Action) refers Faustov to my previous comment.
You have "require verify = sender", therefore at line 143 it's routing the sender, not the recipient.
Faustov
hmm
I do verify the sender, however it should progress through the ACLs until verify = recipient at the end
djce
well you pointed to line 143, and I'm explaining why 143 is doing what it does.
Faustov
let me pastebin my ACLs
http://pastebin.ca/1756053
djce: so my assumption is, if the final ACL check is verify = recipient, then routing should have recipient's local_part, right?
djce
"require verify = recipient" will route the recipient's address, yes.
Faustov
http://pastebin.com/d78336a4f <--- this is the router I came up with
henk: ^
djce
ok. So now we've got some chunks of config and debugging output, what's your question?
Bearing in mind that line 143 is doing exactly what it should.
Faustov
yeah, got that
maybe I need a whole different approach
from the debug it doesn't seem that I need verify = senders and without it, the router works as expected
all right, thank you for all the help djce and henk!
djce
welcome. good luck!
phr3ak
i got "451 Could not complete sender verify callout" but exim4 -bh is works fine. how could i debug this problem?
DaSourcerer
Hi there! I want to serve my aliases out of a mysql db and am wondering if this is the correct way to achieve this: data = ${lookup mysql{select user from aliases where local_part=${quote_mysql:$local_part} and domain=${quote_mysql:$domain}}} (as part of the system_aliases router)
nvm, got it.
henk
phr3ak: look at the output of exim4 -bh carefully...
phr3ak: there is a catch regarding your problem.
DaSourcerer
Okay, this line seems to cause troubles: local_domains = ${lookup mysql{select distinct domain from aliases where 1}} Any ideas?
Oookay... Seems I need to concatenate all domains with ' : '...
This channel is working wonders. I'm stating a question and little later I'm getting the solution myself :-|
phr3ak
-bhc tnak you!
thank you
henk: -bhc so -c is needed for me because without -c the mail accepted
i0x71
hello, i have setup the .forward file to forward local mail, but i would also like to keep a copy in the local users inbox
is there any way to do that ?
problem solved by putting a \local.user
xerophyt1
how can i configure this with exim prevent the user "nobody" from sending out mail ?
quit