Στο etc/hosts
# Localhost
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
127.0.0.1 autoreply.todomaintouhost
# Your server public IP and hostname
xx.xxx.xx.xxx todomaintouhost
# Domains hosted on this server
xx.xxx.xx.xxx domain mail.domain.com
xx.xxx.xx.xxx domain2 mail.domain.com
Επίσης στην βάση postfix ( μπες phpmyadmin από CWP είναι πιο εύκολο ) και στα domain που θες να στέλνουν
UPDATE `domain` SET `backupmx` = 1;
Για να χρησιμοποιείς το mail domain του κάθε account
🛠️ 1. DNS Records για todomainmou.gr
Ρύθμισέ τα στο panel του domain registrar σου ή στο DNS manager σου:
dns
Αντιγραφή
Επεξεργασία
; Βασικό A record
@ IN A xx.xxx.xx.xxx
www IN CNAME todomainmou.gr.
; Mail subdomain
mail IN A xx.xxx.xx.xxx
smtp IN CNAME mail.todomainmou.gr.
imap IN CNAME mail.todomainmou.gr.
pop IN CNAME mail.todomainmou.gr.
; MX record (πρέπει να δείχνει στο mail)
@ IN MX 10 mail.todomainmou.gr.
; SPF
@ IN TXT “v=spf1 a mx ip4:xx.xxx.xx.xxx ~all”
; DKIM (θα σου το δώσει το CWP)
default._domainkey IN TXT “v=DKIM1; k=rsa; p=MIGfMA…<το public key>…”
; DMARC (προαιρετικό αλλά προτείνεται)
_dmarc IN TXT “v=DMARC1; p=none; rua=mailto:postmaster@todomainmou.gr”
🔒 2. SSL Certificate για mail.todomainmou.gr
Στο CWP Admin Panel:
Email → MailServer Manager → Mail Server SSL → AutoSSL
Επίλεξε το domain todomainmou.gr
Τσέκαρε το mail.todomainmou.gr
Κάνε Generate Let’s Encrypt
✅ Αυτό θα σου εγκαταστήσει SSL για:
mail.todomainmou.gr (SMTP/IMAP)
webmail.todomainmou.gr (προαιρετικά)
📧 3. Φτιάξε mail χρήστη στο CWP
CWP User Panel → Email Accounts → Add
Email: info@todomainmou.gr
Password: δικό σου
Quota: π.χ. 500MB ή unlimited
🔐 4. DKIM για todomainmou.gr
CWP Admin Panel → Email → DKIM Manager
Αν δεν είναι ήδη ενεργό, κάνε generate DKIM για το domain
Αντιγραφή του public key στο DNS (το βλέπεις από το CWP ή το φτιάχνει αυτόματα αν κάνεις bind zone από τον CWP)
📨 5. Ρυθμίσεις Mail Client (π.χ. Outlook / Thunderbird)
Ρύθμιση Τιμή
Email info@todomainmou.gr
Username info@todomainmou.gr
Password [ό,τι έβαλες]
Incoming Mail Server mail.todomainmou.gr
Outgoing Mail Server mail.todomainmou.gr
IMAP Port 993 (SSL)
POP3 Port 995 (SSL)
SMTP Port 587 (STARTTLS)
Authentication Required for SMTP
Encryption SSL/TLS or STARTTLS
📜 6. (Προαιρετικά) /etc/hosts entry
Αν θες local resolve χωρίς DNS:
ini
Αντιγραφή
Επεξεργασία
xx.xxx.xx.xxx mail.todomainmou.gr