Commit 2263514
Judah MW
functions: Added support for leading dots to _idn_encode_decode()
Amavisd supports wildcards by performing decreasingly specific SQL
lookups:
9 - lookup for user+foo@sub.example.com
8 - lookup for user@sub.example.com
7 - lookup for user+foo
6 - lookup for user
5 - lookup for @sub.example.com
3 - lookup for @.sub.example.com
2 - lookup for @.example.com
1 - lookup for @.com
0 - lookup for @. (catchall)
(https://www.ijs.si/software/amavisd/README.lookups.txt)
However idn_to_* returns an empty string if the domain has a leading dot
which means lookups 0-3 cannot be used. This is fixed by removing the
leading dot before encoding or decoding and adding it back just before
returning the domain.1 parent 5bbec2b commit 2263514
1 file changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
337 | 345 | | |
338 | 346 | | |
339 | 347 | | |
| |||
378 | 386 | | |
379 | 387 | | |
380 | 388 | | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
381 | 393 | | |
382 | 394 | | |
383 | 395 | | |
| |||
0 commit comments