# dma config file



## Simon Wagner (Sep 16, 2020)

Hi,

Hopefully I picked the right forum.

Trying to go from ssmtp to dma (for the MASQUERADE feature). For a few days I constantly got strange errors (e.g. 'remote delivery deferred: DNS lookup failure') for some destinations and delivery for others, but nothing was masqueraded, and even seemed sent directly instead via SMARTHOST. I went up and down google without finding any mentions that masquerading might fail. So the problem must be me.

Then it dawned on me that it could indeed be a config issue. I've had my config files in /usr/local/etc/dma. Copying dma.conf and auth.conf to /etc/dma solved everything. Same content, same permissions. So it's the location of the config.

So far I was under the impression, if there is nothing in /etc, most FreeBSD software tries /usr/local/etc. Looking at the source of the dma port, I see references to PREFIX and CONFPATH pointing to /usr/local and /etc/dma. But why this then does not work is beyond me, I have only limited read-power in C and Makefiles  Also seeing people putting the config in /usr/local/etc/dma confirms for me that it should work. But how?

Is this the expected behaviour? What am I doing wrong? Which knob do I have to twist?

Thanks for pointing me in the right direction
simon


----------



## rigoletto@ (Sep 16, 2020)

Are you using the version in Base or from ports? The right location for the Base one is  /etc/dma.


----------



## T-Daemon (Sep 16, 2020)

Simon Wagner said:


> I've had my config files in /usr/local/etc/dma. Copying dma.conf and auth.conf to /etc/dma solved everything. Same content, same permissions. So it's the location of the config.
> ...
> Looking at the source of the dma port, ...
> ...
> Also seeing people putting the config in /usr/local/etc/dma confirms for me that it should work.



Those are indications of using port mail/dma, have you set the correct MTA in /etc/mail/mailer.conf, pointing to /usr/local/libexec/dma?


----------



## Simon Wagner (Sep 22, 2020)

Hi,

mailer.conf points in the right direction, it works when the config file is in /etc.

I'm using the binary (pkg install dma).

The config file location is not a compile time option. Where would be the difference if I'm compiling the port myself?

Why am I ready about /usr/local/etc/dma as a possible config file location when /etc is hardcoded?

feeling quite stupid at the moment....


----------



## T-Daemon (Sep 22, 2020)

Simon Wagner said:


> Where would be the difference if I'm compiling the port myself?


There would be no difference, since there are no options to configure.



Simon Wagner said:


> Why am I ready about /usr/local/etc/dma as a possible config file location when /etc is hardcoded?



Apropos hardcoded:

```
# strings /usr/libexec/dma | grep etc/dma
/etc/dma/dma.conf

# strings /usr/local/libexec/dma | grep etc/dma
/usr/local/etc/dma/dma.conf
```
Are you sure you are using the right dma executable?


----------



## Simon Wagner (Sep 23, 2020)

HA!

yes, I did have my head up my a$$. What I thought was the 'correct' mailer.conf settings was pointing to /usr/libexec. That there are two binaries didn't occur to me, so I glanced over your comment. Of course it works like a charm now.

Thank you for your patience and help. I'll see myself to the corner to stand there in shame ;-)

best regards
simon


----------

