Install Mail-in-a-Box

Mail-In-A-Box is a complete mail server, that included webmail, smtp, imap, pop3. https://mailinabox.email Installation You need Ubuntu 14.04 to install Mail-In-A-Box. Before you start installation, make sure you have server hostname set properly. To start installation, run curl -s https://mailinabox.email/setup.sh | sudo bash During installation, it ask you to set password for admin email account … Read more

Dovecot

Dovecot is a IMAP/POP3 server. To install on Debian/Ubuntu, run apt install dovecot-core -y To see dovecot config, run root@ok:~# doveconf -n # 2.2.22 (fe789d2): /etc/dovecot/dovecot.conf # Pigeonhole version 0.4.13 (7b14904) # OS: Linux 4.4.0-62-generic x86_64 Ubuntu 16.04.3 LTS mail_location = mbox:~/mail:INBOX=/var/mail/%u namespace inbox { inbox = yes location = mailbox Drafts { special_use = … Read more

Configure ElasticEmail with Postfix

To configure ElasticEmail with postfix, first install sasl support On Debian/Ubuntu apt-get install libsasl2-modules On RHEL/CentOS yum install cyrus-sasl-plain Edit postfix config vi /etc/postfix/main.cf On Ubuntu/Debian, you need to comment the line starting with “relayhost”. Add following smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous smtp_sasl_tls_security_options = noanonymous smtp_tls_security_level = encrypt header_size_limit = 4096000 … Read more

Setting up Mail Forwarding in Postfix

To setup mail forward in postfix, Edit postfix config file vi /etc/postfix/main.cf Add virtual_alias_domains = /etc/postfix/virtual_alias_domains virtual_alias_maps = hash:/etc/postfix/virtual_alias_maps Create file /etc/postfix/virtual_alias_domains vi /etc/postfix/virtual_alias_domains Add your domains on this file. 1 Per line. Example [root@s125359 ~]# cat /etc/postfix/virtual_alias_domains webhostingneeds.com netfreehost.com [root@s125359 ~]# Here i have 2 domains added, postfix will service as incoming email server … Read more

Configure Postfix to sent emails using MailGun

First install requirements apt-get update && apt-get install postfix libsasl2-modules -y Run sed -i “s/default_transport = error/# default_transport = error/g” /etc/postfix/main.cf sed -i “s/relay_transport = error/# relay_transport = error/g” /etc/postfix/main.cf sed -i “s/relayhost =/# relayhost =/g” /etc/postfix/main.cf Edit /etc/postfix/main.cf vi /etc/postfix/main.cf Add relayhost = [smtp.mailgun.org]:2525 smtp_tls_security_level = encrypt smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options … Read more

spf

http://www.openspf.org/SPF_Record_Syntax Here is some SPF examples DMARC record If you need to reject email, add p=quarantine If DMARC failed, remore mail server will accept the mail, but mark it as spam. If you just need the report, add YOU@YOUR-DOMAIN.COM – This can be any email address to which you need DMARC reports sent. Mail providers … Read more

eximrm

Here is a bash script to delete mails in exim mail queue. Helpful when you have lot of spam mails in mail queue. Create file vi /usr/local/bin/eximrm Add #!/bin/bash exim -bpu | awk ‘{print $3}’ | xargs exim -Mrm Make it executable chmod 755 /usr/local/bin/eximrm Monitor Server Mail Queue Run following script every 1 hour … Read more

SASL authentication no mechanism available

When sending email from postfix mail sever that use mailgun for relaying mails, i get error Jan 4 03:16:06 serverok-vm postfix/qmgr[22652]: 795731A8D: from=, size=820, nrcpt=1 (queue active) Jan 4 03:16:06 serverok-vm postfix/smtp[24050]: warning: SASL authentication failure: No worthy mechs found Jan 4 03:16:06 serverok-vm postfix/smtp[24050]: 795731A8D: SASL authentication failed; cannot authenticate to server smtp.mailgun.org[34.237.7.101]: no … Read more

Best Transactional Email Providers

Many cloud hosting providers, including Google Cloud, AWS, Microsoft Azure, and DigitalOcean, do not support sending emails directly from their servers. They often recommend using a third-party SMTP service for sending emails. Third-party SMTP servers enhance email deliverability and eliminate the need to manage your own email server. When hosting on a shared server, email … Read more