For many years I have my CentOS server running as a mailserver. For this I used this guide:


And I ran in some issues, which were not mentioned there. Here are some tips which can save you some frustration.

  • Mail are not quarantined and/or you get error like: Quarantined message XXXXXXXXX.XXXXX as it caused MailScanner to crash several times.When running mailscanner --debug it shows this;

    In Debugging mode, not forking...
    Trying to setlogsock(unix)
    Building a message batch to scan...
    Have a batch of 30 messages.
    Insecure dependency in open while running with -T switch at /usr/lib64/perl5/IO/ line 185.

    This seems to be a problem with recent Perl versions. There is a “dirty” workaround; edit /usr/sbin/MailScanner and add -U at the first line;
    !/usr/bin/perl -I/usr/lib/MailScanner -UKEEP this in mind when you upgrade MailScanner. Just add the -U again.
  • Be sure you check the permissions of the folders in: /var/spool/MailScanner


Want to set up your own mailserver step by step? Click here.