# postfix + dovecot smtp_auth problem



## lifanov (Jan 1, 2010)

Hello.
I am trying to set up a simple mail server inside a FreeBSD jail.
It uses real accounts and mboxes.
I scrapped my jail and started over many times.
So far I have postfix and dovecot installed from ports.
I can send and receive mail, but I can only send mail from localhost. I tried it both with dovecot sasl and cyrus.
I will post relevant info.
Please help me get through this.


----------



## dennylin93 (Jan 1, 2010)

SASL with Dovecot should be quite simple. If Postfix and Dovecot are already installed, do `$ postconf -a` to check if Dovecot SASL authentication is supported.

Then follow the instructions on this page.

Edit: If Postfix doesn't support Dovecot SASL, configure it again and reinstall it.


----------



## vivek (Jan 1, 2010)

/var/log/maillog will give you exact problem information. Send email and tail -f on /var/log/maillog


----------



## lifanov (Jan 1, 2010)

`# postconf -a`

```
dovecot
```

Thanks a bunch people!
/var/log/maillog revealed that I was missing aliases.db.
For some reason I repeatedly failed to create one inside the jail, so I copied it over from my host system and did `# make aliases` one more time and now I can send and receive mail!


----------



## ohauer (Jan 1, 2010)

I guess you mean the command
`# newalias` instead of `# make aliases` which is from sendmail.

check if the alias source file exist where it is expected.
`# postconf alias_maps`

With the command `# postconf alias_database` you can check where the alias database will be created (command does not display the db suffix)


----------



## lifanov (Jan 2, 2010)

I did exactly `# make aliases` after copying aliases.db from the host system and it seems to work as expected.
That might explain why I couldn't create it in the first place.
I will run `# newaliases` next time.


----------

