Re: [exim] How to permit unqualified senders once authentica…

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Mike Brudenell
Data:  
Para: Exim Users
Asunto: Re: [exim] How to permit unqualified senders once authenticated
Hi, Adam -

I'm not sure how good an idea it is to accept email addresses not qualified
with a domain name unless, of course, you're going to qualify them by
adding a domain name yourself using *qualify_domain*. For example if you
sent onward an email with the RFC5321.MailFrom set to <myuser> how would a
Non-Delivery Report get returned to the sender: a server further along the
delivery chain doesn't know the domain name.

The *sender_unqualified_hosts* and *recipient_unqualified_hosts* configuration
options are both expandable (marked with a "†" in the *Specification* so
you can use string expansion to do tests when assigning their value. This
value is a *host list*, which is not the same as a hostname; instead it can
be a colon-separated list of textual host names, IP addresses, or netblocks.

So you could perhaps try something devious by using a string expansion that
produces the connecting client's IP address (from *$sender_host_address*)
if the connection is authenticated (*$authenticated_id* is defined),
otherwise the empty string. Not sure how this might affect locally
generated, non-SMTP messages though: they have an empty value for
*$sender_host_address*).

If it matches it'll then have the domain set with your *qualify_domain* setting
applied, whose value isn't expandable so you can't select one based on the
authentication credentials. (However I guess there might be other ways to
do that later in Exim handling process.)

Cheers,
Mike B-)

On 20 March 2017 at 10:04, Adam Nielsen <a.nielsen@???> wrote:

> Hi all,
>
> New issue, now I have SMTP AUTH figured out. When one of my network
> devices sends e-mail, it uses an unqualified name (just the hostname
> with no '@' or domain.) Exim rejects this as it does not allow
> unqualified addresses from remote hosts.
>
> The debug logs say this:
>
>   SMTP<< mail FROM:<mydevice> size=19029
>   SMTP>> 501 <mydevice>: sender address must contain a domain
>   LOG: smtp_syntax_error MAIN REJECT
>     unqualified sender rejected: <mydevice> H=mydevice.mydomain

>
> It looks like there are two options "sender_unqualified_hosts" and
> "recipient_unqualified_hosts" that could permit this, however from what
> I can make out you can only specify hostnames for both options. Since
> my troublesome device is behind a dynamic IP, there's no hostname that
> can be specified.
>
> It is of course authenticating with Exim so it is permitted to send
> mail, so I am trying to figure out how to allow unqualified senders
> over authenticated connections. Either allowing these addresses or
> having Exim qualify them would be fine, but I can't quite see how to
> manage this.
>
> There seems to be a "submission" control option to make Exim behave
> like the connection is coming from an MUA (where unqualified senders
> are apparently permitted), so I tried adding this to my config:
>
>   acl_smtp_mail = acl_check_mail
>   acl_check_mail:
>     accept
>       authenticated = *
>       control = submission/domain=mydomain

>
> I figured the MAIL ACL is where it belongs since the Exim logs above
> indicate failure immediately after the SMTP MAIL FROM command.
> Unfortunately, adding this ACL does not do anything and the message is
> still rejected for the same reasons.
>
> What am I missing?
>
> Many thanks,
> Adam.



--
Systems Administrator & Change Manager
IT Services, University of York, Heslington, York YO10 5DD, UK
Tel: +44-(0)1904-323811 <01904%20323811>

Web: www.york.ac.uk/it-services
Disclaimer: www.york.ac.uk/docs/disclaimer/email.htm