# How to set up sendmail?



## Ricky (Aug 1, 2012)

For the last 4 hours I've been trying to configure sendmail properly but without any sucess.

Could someone please explain to me where do I configure MX Entry and that stuff?

Sorry I am really newbie in sendmail.

EDIT: I have follow this 2 tutorials
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/outgoing-only.html
http://www.marcusnyberg.com/2010/03/09/sending-email-in-freebsd-with-gmail/

But when I try to 
[CMD=ssmtp -v [email]youremail@gmail.com[/email] < testmessage.txt][/CMD]

It says

```
Cannot open smtp.testdomain.com:25
```


----------



## SirDice (Aug 2, 2012)

The mailhub needs to point to your ISP's mailserver.


----------



## Ricky (Aug 2, 2012)

I already did it. It works fine for gmail but my custom domain doesn't.

Any ideas?


----------



## SirDice (Aug 2, 2012)

Run something like `# tcpdump -Xn port 25` and see what happens. You can usually tell what's wrong by looking at the exchange as it's happening.


----------



## Ricky (Aug 2, 2012)

Output


```
tcpdump: WARNING: usbus0: no IPv4 address assigned
tcpdump: USB link-layer type filtering not implemented
```


----------



## SirDice (Aug 3, 2012)

Add a *-i <interface>* to the command to open the correct interface.


----------

