logs archiveIRC Archive / Freenode / #exim / 2015 / September / 17 / 1
tyho
a router and transport like this: https://pastee.org/2zgf6 , the $local_part is in the format $name+$group, I want to have incomming email with a local part of $group to be forwarded to all $name's, how can I acheive this?
I can get a list of all full address from the group with the command `$ ls /var/mail/ | cut -d/ -f4 | egrep '+444$'`
jgh_
look into the local_part_suffic router option
tyho
jgh_: The suffix is not constant though, there are many groups
jgh_
you can use a wildcard
tyho
After accepting the mail, how can I determine what addresses to send it to
is there a way to tell exim to deliver to the addresses outputted by the command above?
`$ ls /var/mail/ | cut -d/ -f-1 | egrep '+GROUP$'` outputs all the addresses I want to delever to when the local part is GROUP
jgh_
use a redirect router, feeding it a list of addresses using whatever string-expansions you need
tyho
jgh_: so I have to set the data vairable, is it possible to set that as the output of a command?
ahh, ${run{}}
jgh_
there's a ${run } expansion item - but this probably isn't the best way to do it
tyho
thanks
oh no?
how come?
         

jgh_
better if you can deal with the file directly
tyho
which file?
jgh_
you were using /var/mail above
tyho
yeah, I just have a bunch of directories in it
it is not a file
jgh_
lookup type dsearch
tyho
that does look better, more idiomatic, but it is yet another DSL to learn
If I can get the run thing working, I am not going to look back
i understand your method is better in every way pretty much though
jgh_
there's usually more than one way to do a job :)
tyho
yeah, It is a shame I don't know exim that well, it seems really powerful, powerful like the unix shell, if you know what you are doing, it is amazing and powerful, if you don't it is furstrating and complex, the rules seem arbitrary
jgh_: is there an easy way to test these string expansions, like a repl or something?
jgh_
iffffff they don't depend on other things like macros or variables
exim -be 'put your expansion source here'
tyho
cool thanks
nice, I might be able to do it your way now, I can see what is going on
jgh_: So I have beem playing around with dsearch, but I think it might not be possible to do what I want, there is no wilddsearch for example, I cannot find a way for dsearch to match a substring
tomputer
is it possible with Exim to encrypt all outgoing messages for a specific domain?
for example, with S/MIME or PGP
jgh_
only with a fair amount of work and hooking into external programs; that's more commonly wanted as end-to-end encryption done by the MUAs. On the other hand, if all you're asking about is link-encryption, yes Exim can ensure that the next-hop goes under TLS - but you're still vulnerable to snooping on the destination MTA (and DNS-based redirection to alternate MTAs for that purpose, unless you involve DANE) - which might not be enough for you
tomputer
jgh_: thanks! i agree, those types of encryption are better suited for MUAs
jgh_: and yes, i also want to force link encryption, as far as i know that can be done with the 'hosts_require_tls' option
jgh_
precisely
bjornar
Is it possible to redirect in a transport or a manualroute router?
Thing is I need to 1) deliver via lmtp to a UUID and 2 set route_data (manualroute)
MASHtm
is somebody using tls_require_dane = * already?
bjornar
problem is that if I do redirect to uuid, and then match on uuid and do manualroute, my localpart is now the uuid, and I would need to do a new db lookup to find the route_data ...
MASHtm, sounds early
MASHtm
or hosts_require_dane to be correct
why? "require" means if DANE is available in DNS
bjornar
ok, then I see
"require" means something else to me ;)
MASHtm
at least that's what I think experimental-spec means;-) correct me if I'm wrong
ok, I'm wrong;-)
jgh_: would be nice to have something in between hosts_try_dane and hosts_require_dane. Something like "require_if_tlsa_available" or something?
         

bjornar
MASHtm, condition
MASHtm
ah, no. read it again... if TLSA lookup succeeds, DANE is required for hosts_try_dane as well. So that's exactly what i want
jgh_
MASHtm: possibly try-dane does that... the DANE RFC says that if the DNS says a host is DANE-capable, you can only use a DANE-mediated TLS connection - no fallback. I think.
MASHtm
jgh_: yea, sorry. did the RTFM too late;-)
jgh_
heh
bjornar
jgh_, do you have any answer to my question? also posted in exim-users@
jgh_
which one?
bjornar
redirect data and route_data?
jgh_
"If I do the redirect (to a UUID" - what redirect?
bjornar
what redirect?
in a redirect router
data = 11a5669c-72ef-4f7f-a9b6-fd4e6bf769e8
jgh_
your lmtp backend wants that as a localpart?
bjornar
jgh_, its is controlled by me... and has its reasons, but reasons are not important here.
jgh_
I'm not asking for justification, merely "yes" or "no"
bjornar
I fugured
rjek
I'm using that.
bjornar
So I just did redirect to uuid@_somekey.final_lmtp_server
then match on that key and a uuid in the first (accept) router, does transport lmtp and hosts and hosts_override here, removing the _somekey with sg
sounds about right?
UUID = \N^[a-f0-9]{8}-([a-f0-9]{4}-){3}[a-f0-9]{12}$\N
jgh_
do you have multiple lmtp servers, and different user go to different ones?
bjornar
yep
but as I told, solved.
Why is "localhost" removed from strings..?
1ZcZr0-0006kB-2o == 20419ff0-4daf-4bc9-b8fd-e64f9f4ff431@lmtp.localhost <foo@bar.org> R=lmtp_rewrite defer (-17): error in redirect data: domain missing or malformed in "@lmtp."
So.. thats mostly ok ... seems exim strangely strips localhost off.. but even if I fix that, exim says: error in redirect data: no local part in "@lmtp.localhost"
but the localpart is for sure there! ... does it not accept this localpart then, and silently strips it off?
ok... seems quote-local-part
hrmm..
exim complains: found host to be local ... why should it care, its lmtp on a different port..
notkoos
bjornar: exim doesn't like sending mail to the localhost (because mail loops) - fair enough that it's a different port ;p you will want to add 'self = send' to the router
bjornar
yeah.. seems transport option allow_localhost is also fine
notkoos
I see :)
bjornar
dont know what send = self is... but seems not needed her.e
notkoos
probably just the same as allow_localhost (but applies to routers rather than transports)
jgh_
there is a manual, y'know
bjornar
jgh_, talking to me?
bjornar_
/topic This is ${sg{${lc:IE_MX}}{\N^(i)(e)_(m)(x)$\N}{\$2\$4\$1\$3}}