# Instalare Postfix pe Ubuntu

Vrei să trimiți emailuri din aplicațiile tale? Postfix este un server de email rapid și sigur.

***

### Cerințe

* [VPS](https://ititanhosting.ro/vps) Linux (Ubuntu 20.04+)
* [Domeniu](https://ititanhosting.com/) + DNS
* Porturi deschise: 25, 587

***

### Pasul 1: Update sistem

```bash
sudo apt update
```

***

### Pasul 2: Instalare Postfix

```bash
sudo apt install postfix mailutils -y
```

Alege:

* Internet Site
* Domeniul tău

***

### Pasul 3: Configurare

```bash
sudo nano /etc/postfix/main.cf
```

***

### Pasul 4: Pornire

```bash
sudo systemctl restart postfix
sudo systemctl enable postfix
```

***

### Pasul 5: Test

```bash
echo "Test" | mail -s "Test" emailul-tau@gmail.com
```

***

### Pasul 6: DNS (IMPORTANT)

* MX record
* SPF:

```
v=spf1 mx ip4:IP ~all
```

***

### Probleme comune

* Email în spam → lipsă SPF/DKIM
* Nu trimite → verifică porturi

***

### Gata 🎉

Serverul de email este pregătit.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ititanhosting.ro/docs/romana/vps/linux/instalare-postfix-pe-ubuntu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
