# Trouble with mail/postfix, mail/dovecot2



## chigurh (Sep 6, 2011)

Hi,

This is my first install of FreeBSD and I am trying to configure mail-server with mail/postfix & mail/dovecot2. 

I've enabled postfix and dovecot in rc.conf but when I boot I get following errors -


```
doveconf: Warning: Obsolete setting in /usr/local/etc/dovecot/dovecot.conf:126: add auth_ prefix to all settings inside auth {} and remove the auth {} section completely
doveconf: Warning: Obsolete setting in /usr/local/etc/dovecot/dovecot.conf:130: passdb sql {} has been replaced by passdb { driver=sql }
doveconf: Warning: Obsolete setting in /usr/local/etc/dovecot/dovecot.conf:133: userdb sql {} has been replaced by userdb { driver=sql }
doveconf: Warning: Obsolete setting in /usr/local/etc/dovecot/dovecot.conf:136: userdb prefetch {} has been replaced by userdb { driver=prefetch }
doveconf: Warning: Obsolete setting in /usr/local/etc/dovecot/dovecot.conf:138: auth_user has been replaced by service auth { user }
```
 &


```
postfix: warning: unreasonable macro call nesting: "apogee.site.org"
postfix: warning: unreasonable macro call nesting: ", localhost."
postfix: warning: unreasonable macro call nesting: "mydomain"
postfix: fatal: dictionary mail_dict: macro processing error
Sep  5 18:55:34 apogee postfix[5891]: fatal: dictionary mail_dict: macro processing error
```

Here are my config files -

/usr/local/etc/dovecot/dovecot.conf http://paste.pocoo.org/show/471087/
/etc/postfix/mysql_virtual_alias_maps.cf http://pastie.org/private/l0gx4rrps6yhtrbw39l17a
/etc/postfix/mysql_virtual_domains_maps.cf http://pastie.org/private/fqf5ve3movsrv9ax7vnn6g
/etc/postfix/mysql_relay_domains_maps.cf http://pastie.org/private/w41d2xq1flh3d3p4j4wra
/etc/postfix/mysql_virtual_mailbox_limit_maps.cf http://pastie.org/private/1jy1zbciz61iiwnnkvzfxg
/etc/postfix/mysql_virtual_mailbox_maps.cf http://pastie.org/private/spj3cssen6zgi9qvapffzw
/usr/local/etc/dovecot/dovecot-sql.conf http://paste.pocoo.org/show/xiRjg8ZrlyIcKUz7DDU6/
/etc/postfix/main.cf http://paste.pocoo.org/show/471101/
/etc/postfix/master.cf http://paste.pocoo.org/show/471104/
/usr/local/etc/clamd.conf http://paste.pocoo.org/show/471105/
/usr/local/etc/mail/opendkim.conf http://paste.pocoo.org/show/471106/

I dont know what I am missing here. Please let me know what needs to be done.

Thanks!

Marcus


----------



## DutchDaemon (Sep 6, 2011)

Dovecot's configuration file layout was changed recently, so you will probably need to rewrite your existing configuration file. Which is basically what those errors are telling you.


----------



## chigurh (Sep 6, 2011)

Okay, I will dig some more later tonight and see where it goes. Have tried several things but couldn't get it to work.


----------



## DutchDaemon (Sep 6, 2011)

/usr/local/share/doc/dovecot/example-config/ should contain examples of the new configuration layout. Also note that dovecot.conf now lives under /usr/local/etc/dovecot/, *not* under /usr/local/etc/.


----------



## AndyUKG (Sep 6, 2011)

Check out the Dovecot wiki for info on Dovecot

http://wiki2.dovecot.org

It contains useful tips like:



> Dovecot v2.0 can still use most of the v1.x configuration files, but it logs a lot of warnings at startup. A quick and easy way to convert your old config file to v2.0 format is:
> 
> 
> ```
> ...



Andy.


----------



## chigurh (Sep 7, 2011)

Thanks for the tips, I guess I have placed all files correctly. Installing FreeBSD-8.2-Stable-i386 on my Eee PC right now, will try my hands on this later.


----------



## chigurh (Sep 10, 2011)

Created a new /usr/local/etc/dovecot/dovecot.conf (http://paste.pocoo.org/show/473539/) and dovecot starts normally. However opendkim and postfix still return error at boot. 

[cmd=]opendkim -A[/cmd] returns

```
opendkim: milter socket must be specified
```

Here is /usr/local/etc/mail/opendkim.conf http://paste.pocoo.org/show/473540/


And the postfix errors are -

```
postfix: warning: unreasonable macro call nesting: "apogee.site.org"
postfix: warning: unreasonable macro call nesting: ", localhost."
postfix: warning: unreasonable macro call nesting: "mydomain"
postfix: fatal: dictionary mail_dict: macro processing error
Sep 10 03:00:58 apogee postfix[5907]: fatal: dictionary mail_dict: macro processing error
```


----------



## chigurh (Sep 11, 2011)

Some additional information after running [cmd=] truss postfix[/cmd] http://paste.pocoo.org/show/473907/


----------

