Posts for: #Email

AmazonSES Limit by IP and Hostname

Below is the IAM policy required to limit AmazonSES SMTP sending to IP and hostname { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "ses:SendRawEmail", "Resource": "Amazon_Resource_Name_(ARN)", "Condition": { "IpAddress": { "aws:SourceIp": [ "ENTER.IP.HERE.THANX/32" ] } } } ] }

Modoboa not sending email

By default the policyd is using IPv6. This needs to be forced to use IPv4 since the VPS I’m using doesn’t seem to have IPv6 enabled nano /etc/supervisor/conf.d/policyd.conf Replace command=/srv/modoboa/env/bin/python /srv/modoboa/instance/ policy_daemon with command=/srv/modoboa/env/bin/python /srv/modoboa/instance/ policy_daemon --host

Modoboa using mariadb

git clone cd modoboa-installer ./ --stop-after-configfile-check nano installer.cfg Add the folloing to installer.cfg [database] engine = mysql host = install = true

Send email using postfix

There’s many times when I want to send an email for testing using postfix and I can never remember how to do it. Here is how.This is super useful to make sure your SMTP relay thru AWS/Postmark is working as it should. Then you can tail /var/log/mail.log to see if it worked or if it got rejected for whatever reason. First type the following to start sendmail sendmail [email protected] Now we can type in or paste the following

Limit email/hour for just one domain on an account (addon, park, or sub domain).

Sometimes you have an email account and you want to edit the email/hour for only one of the domain on the account, here is how to do that. SSH to the server ssh Edit the file /var/cpanel/users/userAccount file Add or Edit a line like this Replace with the domain name in question, and 100 with the number of emails per hour you wish to allow. Save the file and run /usr/local/cpanel/scripts/updateuserdomains

Mail Server

I ended up switching to modoboa. I’ve been very happy with it on ServerCheap. I finally set up my own mail server using a couple guides. Just putting this here for my memory. Thank you to the great people who write amazing blogs. How to set up the server When put behind cloudflare you need to add the bellow to /etc/nginx/nginx.conf in the http { location # CF set real ip set_real_ip_from 103.