UPDATE THE SYSTEM
Before going any further, make sure you’re in a screen session and your system is fully up-to-date by running:
## screen -U -S opendkim-screen
## yum update
ENABLE EPEL REPOSITORY
OpenDKIM is available in the EPEL repository, so we need to enable it on the system before we can install OpenDKIM
## wget -P /tmp http://mirror.pnl.gov/epel/6/i386/epel-release-6-8.noarch.rpm
## rpm -Uvh /tmp/epel-release-6-8.noarch.rpm
## rm -f /tmp/epel-release-6-8.noarch.rpm
Install the package using yum:
## yum install opendkim
Next thing to do is to configure OpenDKIM. Its main configuration file is located in /etc/opendkim.conf, so before making any changes create a backup and add/edit the following: Continue reading “Install and integrate DKIM with OpenDKIM and Postfix on a CentOS 6” »
Postfix by default restrict attachment size to approx 10MB i.e. 10240000 bytes.
You can check it using following command:
postconf | grep message_size_limit
To change attachment-size to say 50 MB, run a command like:
postconf -e message_size_limit=52428800
If you are running a mail-server with SMTP/IMAP access, you need to change postfix attachment size only. I spent half-hour debugging dovecot to increase attachment size, just to realize that above change in postfix config was all I needed!
When I tried to start postfix today, I got the following message:
fatal: parameter inet_interfaces: no local interface found for 184.108.40.206
Solution is straightforward:
comment out “inet_interfaces = all”
add “inet_protocol = ipv4”
Just a small hack, but worked good on my ISPConfig 3 setup. Add the following:
mailbox_size_limit = 104857600
Save and restart postfix service.
According to official postfix documentation:
message_size_limit (default: 10240000) The maximal size in bytes of a message, including envelope information. Note: be careful when making changes. Excessively small values will result in the loss of non-delivery notifications, when a bounce message size exceeds the local or remote MTA’s message size limit. Continue reading “Allow large attachment (greater than 10MB) in ISPConfig postfix MTA” »
This is quite simple, and with a very simple setup, and does not require that much, since we do not need to send out e-mails from clients from this server, or use ASMTP. I find that MySQL is not needed here, but could be used. I will use normal flat files, since the number of domains to run a backup for is most likely a rather small number.
This setup can be editet to run all times of different checks, antivirus etc. Normally you would make sure that the setup is exactly the same on both the primary MTA, and the backup. It hardenens the systems, and should reduce spam, and unwanted traffic. Create public DNS entries. Remember to create an MX record with an lower priority than the primary mail server, or else this will not work!
Example:example.com. 43200 IN MX 10 mail.example.com.
example.com. 43200 IN MX 20 backup.example.com.
After this these two records are created with A records pointing to different IPs (different servers). Continue reading “Perfect Backup MX using Postfix” »
If you’re receiving the following message on webmin- “Failed to open /var/mail/root : No such file or directory”.
Possible resolution is-
rumi@mordor:~$ sudo touch /var/mail/rumi
rumi@mordor:~$ sudo chown thufir:mail /var/mail/rumi
rumi@mordor:~$ sudo chmod o-r /var/mail/rumi
rumi@mordor:~$ sudo chmod g+rw /var/mail/rumi
No mail for thufir
Before starting this tutorial, you should have:
- Debian 7 installed
- Your fully qualified domain name (FQDN)
- All updates installed :
A valid username and password for the SMTP mail provider, such as Mandrill, or SendGrid
Make sure the libsasl2-modules package is installed and up to date:
apt-get install libsasl2-modules
Continue reading “Postfix using Gmail as a Mail Relay with Debian 7” »
Before starting the installation, a system update is recommended:
sudo apt-get update
sudo apt-get dist-upgrade
Install OpenDKIM and it’s dependencies:
sudo apt-get install opendkim opendkim-tools
Additional packages will be listed as dependencies, type yes and press Enter to continue.
A couple of files must be created and edited in order to configure OpenDKIM.
Nano will be used as an editor because it’s installed by default on DigitalOcean droplets and it’s simple to operate:
navigate with the arrow keys
exit without saving changes: press CTRL + X and then N
exit and save changes: press CTRL + X and then Y, and finally press Enter
Important: replace every instance of example.com with your own domain in all commands and configuration files. Don’t forget to save your files after editing.
Let’s start with the main configuration file: Continue reading “OpenDKIM Postfix SMTP Relay Server on Debian -7” »
This is a quick and fairly painless way of setting up DKIM, on a postfix server. DomainKeys Identified Mail (DKIM) is a method for associating a domain name to an email message, thereby allowing a person, role, or organization to claim some responsibility for the message and helps verify that your mail is legitimate. This will help your email not get flagged a spam or fraud, especially if you are doing bulk emailing or important emails.
This tutorial is written for debian, so if using centos the paths to some files may be /etc/mail prefix or similar.
First, install dkim-filters
apt-get install dkim-filter
yum install dkim-milter Continue reading “DKIM installation on Debian” »
I used the auto installation as guided by the group-office wiki. However, for conveniences, quoting the contents once again:
Easy installation on a dedicated Debian or Ubuntu server
This is the easiest way of installing Group-Office. With the debian packages everything is configured automatically and Group-Office updates will be installed automatically when you update your Debian or Ubuntu system.
Install Debian >= 5 or Ubuntu >=8.10
Note: All the commands here use "sudo". This is necessary on Ubuntu. If you are on Debian you can use the "su" command first and execute all the commands without "sudo".
Add the following line to /etc/apt/sources.list
deb http://repos.groupoffice.eu/ threeseven main
You can do that easily by executing the following command in the terminal:
echo -e "\n## Group-Office repository\ndeb http://repos.groupoffice.eu/ threeseven main" | sudo tee -a /etc/apt/sources.list
To authenticate the packages you need to import the public key by running the folowing commands: In ubuntu don't do this as root because you will have trouble with the gpg keyring permissions. On debian you can do this as root and omit the sudo command before the apt-key add command.
gpg –keyserver hkp://keyserver.ubuntu.com:11371 –recv-keys 01F1AE44
gpg –export –armor 01F1AE44 | sudo apt-key add –
Note: The keyservers are often very slow. If the keyserver doesn't respond you may try this one instead: hkp://pgp.mit.edu Continue reading “Group-Office installation on Debian 6.x” »