# EXIM - smtp auth for virtual users



## sorciq (May 26, 2012)

Hi all!

I set up my EXIM to work with virtual domains and users. Everything works fine, even receiving mail from and delivering mail to users, except SMTP AUTH. Every information about users I put into the file domain.com/passwd.

Where is the problem?

My authenticators are:

```
plain:
driver = plaintext
public_name = PLAIN
server_prompts = "Username:: : Password::"
server_condition = "${if crypteq{$auth2}{${extract{1}{:}
 {${lookup{$auth1}lsearch{/etc/virtual/${domain}/passwd}{$value}{*:*}}}}}{1}{0}}"
server_set_id = $auth1
```
I get the error:

```
2012-05-26 19:20:54 plain authenticator failed for host.domain2.com (host.localnet)
 [xxx.xxx.xxx.xxx] 435 Unable to authenticate at present (set_id=user@domain.com): failed to open
 /etc/virtual//passwd for linear search: No such file or directory
```

I have no idea why the variable $domain is empty.

But, I changed the ${domain} to the specific virtual domain and I get another error:

```
2012-05-26 19:19:46 plain authenticator failed for host.domain2.com (host.localnet)
 [xxx.xxx.xxx.xxx]: 535 Incorrect authentication data (set_id=user@domain.com)
```

Also I got this error:

```
2012-05-26 19:25:12 SMTP protocol synchronization error (next input sent too soon: pipelining was
 not advertised): rejected "EHLO we-guess.mozilla.org" H=host.domain.com [xxx.xxx.xxx.xxx] next
 input="QUIT\r\n"
```

when I tried check the settings of this server using Thunderbird.

If anyone knows how to solve this problem, I will be greatful. ;-)

Best regards,
Simon


----------



## OH (May 28, 2012)

sorciq said:
			
		

> ```
> plain:
> driver = plaintext
> public_name = PLAIN
> ...



Who told you you'd have $domain available? It's not like Apache and virtualhosts, Exim will not check what domainname was used to contact the server. You're better off storing all your users and passwords in one file.



> ```
> 2012-05-26 19:19:46 plain authenticator failed for host.domain2.com (host.localnet)
> [xxx.xxx.xxx.xxx]: 535 Incorrect authentication data (set_id=user@domain.com)
> ```



What does your passwd file look like? For the PLAIN authenticator it needs to be:

```
username:CharactersThatLookNothingLikeTheActualPassword
```

This file can be created using Apache's htpasswd.



> Also I got this error:
> 
> ```
> 2012-05-26 19:25:12 SMTP protocol synchronization error (next input sent too soon: pipelining was
> ...


Just Thunderbird trying to figure out how it should talk to your server. Don't worry about it unless it's from a server that you're expecting mail from.

For completeness sake, the documentation for Exim is here.

There is also a very helpful mailinglist for Exim specific questions.


----------

