Category:Email: Difference between revisions

From Traxel Wiki
Jump to navigation Jump to search
No edit summary
(Replaced content with "Category:Hacking = Links = * Reverse DNS on Lightsail: https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-configuring-reverse-dns.html * Email_Webmail")
Tag: Replaced
 
(23 intermediate revisions by the same user not shown)
Line 2: Line 2:
= Links =
= Links =
* Reverse DNS on Lightsail: https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-configuring-reverse-dns.html
* Reverse DNS on Lightsail: https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-configuring-reverse-dns.html
= GPT Recommendation =
* [[Email_Webmail]]
For a low-volume mail server setup on Debian 12 (Bookworm) that’s primarily used for sending outbound messages from a local instance of MediaWiki, you can opt for a simple yet reliable software stack. The primary goal here is to ensure that emails sent by MediaWiki (e.g., account creation confirmations, notifications) are delivered reliably without setting up a full-fledged mail receiving infrastructure.
 
=== Software Stack: ===
 
* '''Postfix''': A widely used, open-source Mail Transfer Agent (MTA) that can handle sending outbound emails. It’s relatively straightforward to configure for sending emails and can be secured to prevent unauthorized use.
* '''Optional: Dovecot''': If you ever decide to handle receiving emails (for bounces or administrative purposes), Dovecot is a secure IMAP and POP3 server that integrates well with Postfix. However, for your described use case, Dovecot may not be necessary.
* '''Certbot (Let’s Encrypt)''': For securing your connections with TLS, using Certbot to obtain a free SSL certificate from Let’s Encrypt is recommended, especially if you’ll be sending sensitive information.
 
=== Basic Setup Instructions: ===
 
==== 1. Install Postfix ====
 
<ol style="list-style-type: decimal;">
<li><p>Update your package list:</p>
<pre>sudo apt update</pre></li>
<li><p>Install Postfix:</p>
<pre>sudo apt install postfix</pre></li>
<li><p>During installation, you’ll be prompted for some basic configuration:</p>
<ul>
<li>'''General type of mail configuration''': Choose “Internet Site”.</li>
<li>'''System mail name''': This should be your domain name (e.g., example.com).</li></ul>
</li></ol>
 
==== 2. Basic Configuration ====
 
<ol style="list-style-type: decimal;">
<li><p>Edit the main Postfix configuration file <code>/etc/postfix/main.cf</code> to ensure it’s set up for sending mail correctly. For a basic setup, you might only need to adjust or verify a few lines:</p>
<pre>inet_interfaces = loopback-only
myhostname = example.com
mydestination =
mynetworks = 127.0.0.0/8</pre>
<ul>
<li><code>inet_interfaces</code> set to <code>loopback-only</code> ensures Postfix only listens on the localhost interface.</li>
<li><code>myhostname</code> should be your server’s FQDN.</li>
<li>Clear <code>mydestination</code> to prevent Postfix from considering itself the final destination for mail.</li>
<li><code>mynetworks</code> restricts which IPs can send mail through this server, set it to localhost only for security.</li></ul>
</li>
<li><p>Reload or restart Postfix to apply the changes:</p>
<pre>sudo systemctl restart postfix</pre></li></ol>
 
==== 3. Configure MediaWiki for Email ====
 
Ensure MediaWiki is configured to send email through your local Postfix installation. This is usually done in MediaWiki’s <code>LocalSettings.php</code>:
 
<source lang="php">$wgSMTP = [
    'host' => 'localhost',
    'IDHost' => 'example.com',
    'port' => 25,
    'auth' => false,
];</source>
Adjust <code>example.com</code> to match your domain.
 
=== Security and Sending Limits ===
 
* '''IP and Domain Reputation''': Ensure your server’s IP and domain have a good reputation. A new IP or one previously used for spam can negatively affect deliverability.
* '''Reverse DNS''': Set up reverse DNS for your server’s IP to match your domain. This is often done through your hosting provider’s control panel.
* '''SPF Record''': Add an SPF record to your domain’s DNS to authorize your server to send email on behalf of your domain.
* '''DKIM and DMARC''': For a low-volume server used as described, DKIM and DMARC are optional but recommended for improving email authenticity.
 
This setup is sufficient for sending outbound emails from a MediaWiki instance. Remember to monitor your server for any abuse and ensure that it’s not configured as an open relay. For more extensive email needs in the future, consider additional configurations and possibly using external SMTP services designed for high deliverability.

Latest revision as of 00:12, 23 October 2025

Pages in category "Email"

The following 2 pages are in this category, out of 2 total.