User Tools

Site Tools


computing:mailserver

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
computing:mailserver [2022/12/20 15:55] oemb1905computing:mailserver [2023/08/06 18:42] (current) oemb1905
Line 2: Line 2:
   * **mailserver**    * **mailserver** 
   * **Jonathan Haack**   * **Jonathan Haack**
-  * **Haack's Networking** +  * **Haack's Networking**  
-  * **webmaster@haacksnetworking.org**  +  * **webmaster@haacksnetworking.org**   
  
 ------------------------------------------- -------------------------------------------
- +  
-//mailserver//      +//mailserver//  
  
 ------------------------------------------- -------------------------------------------
Line 305: Line 305:
   postsuper -d ALL   postsuper -d ALL
      
- --- //[[jonathan@haacksnetworking.org|oemb1905]] 2022/12/20 08:55//+If you have issues, it's good to be familiar with some different uses of the ''dig'' command to test your records. Here's how to check dmarc, dkim, spf, and ptr. The ''+short'' is optional, of course. I also included how you can verify your dkim key as well. 
 +   
 +  dig txt +short _dmarc.jonathanhaack.com 
 +  dig txt +short _dmarc.haacksnetworking.org 
 +  dig default._domainkey.jonathanhaack.com txt 
 +  dig default._domainkey.haacksnetworking.org txt 
 +  dig txt +short jonathanhaack.com 
 +  dig txt +short haacksnetworking.org 
 +  dig -x 8.28.86.130 +short 
 +  dig -x 8.28.86.125 +short 
 +  sudo opendkim-testkey -d jonathanhaack.com -s default -vvv 
 +  sudo opendkim-testkey -d haacksnetworking.org -s default -vvv 
 +   
 +Also, please note that the above applies to clients connecting to the domain. If you intend to also host websites/content on the same host as the mail server, then you will also need to set up dmarc, spf, and mx records for the subdomain, mail.example.com. You will not need to setup dkim nor change the PTR. To test the validity of the command line email set up, ssh into your server and send an email as follows: 
 + 
 +  echo "Hi, I am testing the subdomain email health." | mail -s "CLI Email Test" oemb1905@jonathanhaack.com 
 +   
 +Setting up dovecot-sieve.  
 + 
 +  sudo apt install dovecot-sieve dovecot-managesieved 
 +  sudo nano /etc/dovecot/dovecot.conf 
 + 
 +Set to: 
 + 
 +  protocols = imap lmtp sieve 
 +   
 +Then, open 
 + 
 +  sudo nano /etc/dovecot/conf.d/15-lda.conf 
 + 
 +Set to: 
 + 
 +  protocol lda { 
 +    mail_plugins = $mail_plugins sieve 
 +  } 
 +   
 +Finally, 
 + 
 +  sudo nano /etc/dovecot/conf.d/20-lmtp.conf 
 + 
 +Which should be: 
 + 
 +  protocol lmtp { 
 +    mail_plugins = quota sieve 
 +  } 
 +   
 +Restart your services ''systemctl restart dovecot postfix'' and it should be active. I was having trouble with Nextcloud mail because it could not locate the default / expected IMAP folders. To mitigate that, set them up to be created automatically as follows: 
 + 
 +  sudo nano /etc/dovecot/conf.d/15-mailboxes.conf 
 + 
 +An example block: 
 + 
 +  mailbox Drafts { 
 +    auto = create 
 +    special_use = \Drafts 
 +  } 
 + 
 +Simply add the ''auto = create'' to whichever directories you need.  
 +   
 + --- //[[jonathan@haacksnetworking.org|oemb1905]] 2023/08/06 18:39//
computing/mailserver.1671551752.txt.gz · Last modified: 2022/12/20 15:55 by oemb1905