# OpenSMTPD



## gpatrick (Sep 7, 2012)

Currently I am using OpenSMTPD for my mail server for one domain but plan to add more domains.  I know that OpenSMTPD has "relay as" but is that the same as address rewriting in Sendmail?  I emailed the developer and never got a response.  If address rewrite isn't available then I will switch to Sendmail, but I really like the syntax of OpenSMTPD so I'd like to keep it.

Would this work?

```
accept from 192.168.1.100 for all relay via "mydomain.com" \
     as "@mydomain.com"
accept from 192.168.1.100 for all relay via "domainmy.net" \
     as "@domainmy.net"
```

Then if I send mail from a client as user1@local.lan it will be user1@mydomain.com in the envelope?
And if I use another profile in Thunderbird for domainmy.net on local.lan if I send as Xuser@domainmy.net it will be Xuser@domainmy.net in the envelope?

Does anyone know?


----------

