# Sendmail masquerading stopped working



## gamesquat (Dec 1, 2016)

Hi All,
I’m having a problem with sendmail masquerading. All worked fine until recently, but a couple of days ago I noticed local emails are not being masqueraded anymore, (if I recall a recent FreeBSD 10.3 update patched sendmail).

My machines hostname is not fully qualified so I masquerade to send the servers local email via my primary domain, my working config was:


```
${HOST}.mc
MASQUERADE_AS(`mydomain.com')dnl
FEATURE(`masquerade_envelope')dnl
```


```
/generic.m4
dnl # EXPOSED_USER(`root’)
```

After I stopped getting emails from my server, (emails from root etc forwarded in /etc/aliases), I ran a test using:


```
echo test | mail -v -s "Did this get through?" root
```

And got the err:


```
WARNING: local host name (mydomain) is not qualified; see cf/README: WHO AM I?
```

So I added the below to /etc/hosts


```
127.0.0.1    mydomain mydomain.com
```

That allows the email to be sent to the local mbox, (/var/mail), but of course is not now forwarded as mydomain.com is taken to be the localhost - mail does not reach the outside world and use the MX of mydomain.com.

I have tried using SMART_HOST too but had no luck:


```
define(`SMART_HOST', `mail.luxurytraveldiary.com')
```

- and -


```
define(`SMART_HOST', `mail.luxurytraveldiary.com')
```

Any help getting this working again much appreciated.

Running FreeBSD 10.3-RELEASE-p11


----------

