[exim-dev] exim overzealously cleaning local parts of mail a…

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Marc Haber
Fecha:  
A: exim-dev
Asunto: [exim-dev] exim overzealously cleaning local parts of mail addresses
Hi,

I am having a strange issue with exim and a rather exotic user name.
The user in question is running exim against an active directory, and
thus has local user account names like "DOMAIN\First Last". It looks
like exim does some cleanup on the localpart, thus failing to match
the local part of the address to the user account in the
check_local_part option:

$ getent passwd 1002
DOMAIN\First Last:x:1002:100::/home/DOMAIN\First Last:
$ /usr/sbin/exim4 -bt -d '"DOMAIN\First Last"'
Exim version 4.50 uid=1001 gid=1001 pid=29845 D=fbb95cfd
<snip>
Considering "DOMAIN\First Last"@???
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

routing "DOMAIN\First Last"@???
--------> local_user router <--------
local_part=domainfirst last domain=lefler.int.l21.ma.zugschlus.de
checking for local user
local_user router skipped: domainfirst last is not a local user
no more routers

If I double the backslash, and put the account name in /etc/passwd in
lower case, exim manages to route the address:

$ getent passwd 1003
domain\first2 last:x:1003:100::/home/DOMAIN\First Last:
$ /usr/sbin/exim4 -bt -d '"domain\\first2 last"'
<snip>
Considering "domain\\first2 last"@???
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

routing "domain\\first2 last"@???
--------> local_user router <--------
local_part=domain\first2 last domain=lefler.int.l21.ma.zugschlus.de
checking for local user
R: local_user for domain\first2 last@???
calling local_user router
local_user router called for "domain\\first2 last"@???

I am now wondering whether exim is actually supposed to remove
backslashes and mess with the character case of the local part while
routing and would like to hear your comments (or is that more a topic
for exim-users?)

Here is my exim4.conf:
admin_groups=mh

begin acl

begin routers

local_user:
debug_print = "R: local_user for $local_part@$domain"
driver = accept
check_local_user
transport = mail_spool

begin transports

mail_spool:
debug_print = "T: appendfile for $local_part@$domain"
driver = appendfile
file = /var/mail/$local_part
group = mail
mode = 0660
mode_fail_narrower = false

begin retry

begin rewrite

begin authenticators




and here is the script that I used to make sure that no shell quoting
interferes:

#!/usr/bin/perl -w

use strict;

my @cmd=( "/usr/sbin/exim4",
          "-bt",
        );


if( $ARGV[0] eq "d" ) {
    push( @cmd, "-d" );
    shift @ARGV;
}


if( $ARGV[0] eq "1" ) {
    push( @cmd, "mh");
} elsif( $ARGV[0] eq "2" ) {
    push( @cmd, "\"DOMAIN\\First Last\"" );
} elsif( $ARGV[0] eq "3" ) {
    push( @cmd, "\"DOMAIN\\\\First Last\"" );
} elsif( $ARGV[0] eq "4" ) {
    push( @cmd, "\"domain\\\\first2 last\"" );
} elsif( $ARGV[0] eq "5" ) {
    push( @cmd, "Debian-exim" );
} else {
    die "illegal argument";
}



print join("\n", @cmd). "\n";

system(@cmd);


Greetings
Marc


-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 72739835