Author Topic: How to Rebuild Postfix Mail Server  (Read 62191 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
How to Rebuild Postfix Mail Server
« on: November 02, 2014, 03:41:53 AM »
Starting from the CWP version 0.9.6+ you have a new awesome Postfix Mail Server Manager (reBuilder)
With single click select additional Mail Server options and rebuild your mail server according to your needs.

Location in the CWP.admin area
Left Menu --> Email --> Postfix Manager

Options
- AntiSpam and AntiVirus Protection (Spamassassin and ClamAV are scanning all your incoming emails, this requires server with min. 1Gb RAM).
- rDNS check (Drop all emails if no rDNS/PTR)
- Reject Unknown Hostname (Reject unless the hostname has valid DNS record.)


AntiSpam and AntiVirus

It's possible that ClamAV Antivirus will work with 512MB RAM server but its recommended to have 1GB+ RAM.
« Last Edit: November 02, 2014, 05:30:18 PM by Administrator »
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: How to Rebuild Postfix Mail Server
« Reply #1 on: April 08, 2016, 04:20:10 PM »
ClamAV almost always brings problems, such as installing Spamassassin only because it is enough to stop some spam.
or I can use the dnsbl only to block spam?

Offline
***
Re: How to Rebuild Postfix Mail Server
« Reply #2 on: April 08, 2016, 11:22:31 PM »
Using rbl only blocking, still allowing email with virus passing through your server, and these days, crypto virus is scaring most.

Offline
*
Re: How to Rebuild Postfix Mail Server
« Reply #3 on: May 09, 2016, 03:26:04 AM »
I already create email accounts on the CWP server but have not enabled clamav, amavis and others associated with the configuration of email, by enabling all features in the "Rebuild Postfix Configuration" whether to delete e-mail accounts that have been made?

Thanks and regards,
Budi Setiaji

Offline
*****
Re: How to Rebuild Postfix Mail Server
« Reply #4 on: May 09, 2016, 09:23:20 AM »
no email accounts will NOT be deleted
« Last Edit: November 06, 2016, 09:29:11 PM by Administrator »

Offline
*
Re: How to Rebuild Postfix Mail Server
« Reply #5 on: November 05, 2016, 01:34:51 AM »
Hi,

whenever I select the following during Rebuild Postfix Mail Server, I can not send and receive email?

AntiSpam/AntiVirus (recommended): ClamAV, Amavis & Spamassassin, Requires 1Gb+ RAM

any ideas ?

thanks

Offline
*
Re: How to Rebuild Postfix Mail Server
« Reply #6 on: November 11, 2016, 01:54:45 PM »
I just started a new thread before I found this. I have the same problem :(

Hi,

whenever I select the following during Rebuild Postfix Mail Server, I can not send and receive email?

AntiSpam/AntiVirus (recommended): ClamAV, Amavis & Spamassassin, Requires 1Gb+ RAM

any ideas ?

thanks

Offline
***
Re: How to Rebuild Postfix Mail Server
« Reply #7 on: November 12, 2016, 02:37:41 AM »
mas @arifin @lexz

Try to keep amavis, clam and spamassasin running but let postfix bypass them all..
in mail.cf comment this line "content_filter = smtp-amavis:[127.0.0.1]:10024"
in master.cf comment this line "-o content_filter=smtp-amavis:127.0.0.1:10024"
restart postfix, will make it ignore both amavis, clam and spamassasin

then one by one enable them

Offline
*
Re: How to Rebuild Postfix Mail Server
« Reply #8 on: November 12, 2016, 05:14:34 PM »
@Jae First thank you for your answer.

I tried rebuilding postfix including ClamAV, Amavis & Spamassassin and editing the configfiles.

I couldn't find the mail.cf file. (I found a main.cf but did not had the rule you said)
In the master.cf I commented the line and restarted the server. Still the same result. :(

Offline
***
Re: How to Rebuild Postfix Mail Server
« Reply #9 on: November 13, 2016, 01:23:06 AM »
include log from /var/log/maillog to post, will help more

Offline
*
Re: How to Rebuild Postfix Mail Server
« Reply #10 on: November 14, 2016, 05:22:15 PM »
@Jae
I rebuilded the server and get the following output in my log.

Hope it can help!
Thank you!

Code: [Select]
Nov 14 18:12:06 myhostname postfix/postfix-script[25977]: starting the Postfix mail system
Nov 14 18:12:06 myhostname postfix/master[25978]: daemon started -- version 2.6.6, configuration /etc/postfix
Nov 14 18:12:23 myhostname postfix/smtpd[26105]: fatal: open database /etc/postfix/sender_whitelist.db: Bad file descriptor
Nov 14 18:12:24 myhostname postfix/master[25978]: warning: process /usr/libexec/postfix/smtpd pid 26105 exit status 1
Nov 14 18:12:24 myhostname postfix/master[25978]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
Nov 14 18:12:24 myhostname spamd[26097]: spamd: server started on port 783/tcp (running version 3.3.1)
Nov 14 18:12:24 myhostname spamd[26097]: spamd: server pid: 26097
Nov 14 18:12:24 myhostname spamd[26097]: spamd: server successfully spawned child process, pid 26107
Nov 14 18:12:24 myhostname spamd[26097]: spamd: server successfully spawned child process, pid 26108
Nov 14 18:12:24 myhostname spamd[26097]: prefork: child states: IS
Nov 14 18:12:24 myhostname spamd[26097]: prefork: child states: II
Nov 14 18:12:25 myhostname amavis[26137]: starting. /usr/sbin/amavisd at [I Removed the hostname] amavisd-new-2.9.1 (20140627), Unicode aware, LANG="en_US.UTF-8"
Nov 14 18:12:26 myhostname amavis[26139]: Net::Server: Group Not Defined.  Defaulting to EGID '489 489'
Nov 14 18:12:26 myhostname amavis[26139]: Net::Server: User Not Defined.  Defaulting to EUID '489'
Nov 14 18:12:26 myhostname amavis[26139]: Module Amavis::Conf        2.321
Nov 14 18:12:26 myhostname amavis[26139]: Module Archive::Zip        1.30
Nov 14 18:12:26 myhostname amavis[26139]: Module BerkeleyDB          0.43
Nov 14 18:12:26 myhostname amavis[26139]: Module Compress::Raw::Zlib 2.021
Nov 14 18:12:26 myhostname amavis[26139]: Module Compress::Zlib      2.021
Nov 14 18:12:26 myhostname amavis[26139]: Module Crypt::OpenSSL::RSA 0.25
Nov 14 18:12:26 myhostname amavis[26139]: Module DB_File             1.82
Nov 14 18:12:26 myhostname amavis[26139]: Module Digest::MD5         2.39
Nov 14 18:12:26 myhostname amavis[26139]: Module Digest::SHA         5.47
Nov 14 18:12:26 myhostname amavis[26139]: Module Encode              2.35
Nov 14 18:12:26 myhostname amavis[26139]: Module File::Temp          0.22
Nov 14 18:12:26 myhostname amavis[26139]: Module IO::Socket::INET6   2.56
Nov 14 18:12:26 myhostname amavis[26139]: Module MIME::Entity        5.427
Nov 14 18:12:26 myhostname amavis[26139]: Module MIME::Parser        5.427
Nov 14 18:12:26 myhostname amavis[26139]: Module MIME::Tools         5.427
Nov 14 18:12:26 myhostname amavis[26139]: Module Mail::DKIM::Signer  0.37
Nov 14 18:12:26 myhostname amavis[26139]: Module Mail::DKIM::Verifier 0.37
Nov 14 18:12:26 myhostname amavis[26139]: Module Mail::Header        2.04
Nov 14 18:12:26 myhostname amavis[26139]: Module Mail::Internet      2.04
Nov 14 18:12:26 myhostname amavis[26139]: Module Mail::SPF           v2.008
Nov 14 18:12:26 myhostname amavis[26139]: Module Mail::SpamAssassin  3.003001
Nov 14 18:12:26 myhostname amavis[26139]: Module Net::DNS            0.65
Nov 14 18:12:26 myhostname amavis[26139]: Module Net::Server         0.99
Nov 14 18:12:26 myhostname amavis[26139]: Module NetAddr::IP         4.027
Nov 14 18:12:26 myhostname amavis[26139]: Module Razor2::Client::Version 2.84
Nov 14 18:12:26 myhostname amavis[26139]: Module Scalar::Util        1.21
Nov 14 18:12:26 myhostname amavis[26139]: Module Socket              1.82
Nov 14 18:12:26 myhostname amavis[26139]: Module Socket6             0.23
Nov 14 18:12:26 myhostname amavis[26139]: Module Time::HiRes         1.9721
Nov 14 18:12:26 myhostname amavis[26139]: Module URI                 1.40
Nov 14 18:12:26 myhostname amavis[26139]: Module Unix::Syslog        1.1
Nov 14 18:12:26 myhostname amavis[26139]: Amavis::ZMQ code     NOT loaded
Nov 14 18:12:26 myhostname amavis[26139]: Amavis::DB code      loaded
Nov 14 18:12:26 myhostname amavis[26139]: SQL base code        NOT loaded
Nov 14 18:12:26 myhostname amavis[26139]: SQL::Log code        NOT loaded
Nov 14 18:12:26 myhostname amavis[26139]: SQL::Quarantine      NOT loaded
Nov 14 18:12:26 myhostname amavis[26139]: Lookup::SQL code     NOT loaded
Nov 14 18:12:26 myhostname amavis[26139]: Lookup::LDAP code    NOT loaded
Nov 14 18:12:26 myhostname amavis[26139]: AM.PDP-in proto code loaded
Nov 14 18:12:26 myhostname amavis[26139]: SMTP-in proto code   loaded
Nov 14 18:12:26 myhostname amavis[26139]: Courier proto code   NOT loaded
Nov 14 18:12:26 myhostname amavis[26139]: SMTP-out proto code  loaded
Nov 14 18:12:26 myhostname amavis[26139]: Pipe-out proto code  NOT loaded
Nov 14 18:12:26 myhostname amavis[26139]: BSMTP-out proto code NOT loaded
Nov 14 18:12:26 myhostname amavis[26139]: Local-out proto code loaded
Nov 14 18:12:26 myhostname amavis[26139]: OS_Fingerprint code  NOT loaded
Nov 14 18:12:26 myhostname amavis[26139]: ANTI-VIRUS code      loaded
Nov 14 18:12:26 myhostname amavis[26139]: ANTI-SPAM code       loaded
Nov 14 18:12:26 myhostname amavis[26139]: ANTI-SPAM-EXT code   NOT loaded
Nov 14 18:12:26 myhostname amavis[26139]: ANTI-SPAM-C code     NOT loaded
Nov 14 18:12:26 myhostname amavis[26139]: ANTI-SPAM-SA code    loaded
Nov 14 18:12:26 myhostname amavis[26139]: Unpackers code       loaded
Nov 14 18:12:26 myhostname amavis[26139]: DKIM code            loaded
Nov 14 18:12:26 myhostname amavis[26139]: Tools code           NOT loaded
Nov 14 18:12:26 myhostname amavis[26139]: Found $file            at /usr/bin/file
Nov 14 18:12:26 myhostname amavis[26139]: Found $altermime       at /usr/bin/altermime
Nov 14 18:12:26 myhostname amavis[26139]: Internal decoder for .mail
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .F    at /usr/bin/unfreeze
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .Z    at /usr/bin/uncompress
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .gz   at /usr/bin/gzip -d
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .bz2  at /usr/bin/bzip2 -d
Nov 14 18:12:26 myhostname amavis[26139]: No ext program for   .xz, tried: xzdec, xz -dc, unxz -c, xzcat
Nov 14 18:12:26 myhostname amavis[26139]: No ext program for   .lzma, tried: lzmadec, xz -dc --format=lzma, lzma -dc, unlzma -c, lzcat, lzmadec
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .lrz  at /usr/bin/lrzip -q -k -d -o -
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .lzo  at /usr/bin/lzop -d
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .rpm  at /usr/bin/rpm2cpio
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .cpio at /bin/cpio
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .tar  at /bin/cpio
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .deb  at /usr/bin/ar
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .rar  at /usr/bin/unrar
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .arj  at /usr/bin/unarj
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .arc  at /usr/bin/nomarch
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .zoo  at /usr/bin/zoo
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .cab  at /usr/bin/cabextract
Nov 14 18:12:26 myhostname amavis[26139]: Internal decoder for .tnef
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .zip  at /usr/bin/7za
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .kmz  at /usr/bin/7za
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .7z   at /usr/bin/7za
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .xz   at /usr/bin/7z
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .lzma at /usr/bin/7z
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .jar  at /usr/bin/7z
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .swf  at /usr/bin/7z
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .lha  at /usr/bin/7z
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .iso  at /usr/bin/7z
Nov 14 18:12:26 myhostname amavis[26139]: Found decoder for    .exe  at /usr/bin/unrar; /usr/bin/lha; /usr/bin/unarj
Nov 14 18:12:26 myhostname amavis[26139]: Using primary internal av scanner code for ClamAV-clamd
Nov 14 18:12:26 myhostname amavis[26139]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
Nov 14 18:12:26 myhostname amavis[26139]: Deleting db files  in /var/spool/amavisd/db
Nov 14 18:12:26 myhostname amavis[26139]: Creating db in /var/spool/amavisd/db/; BerkeleyDB 0.43, libdb 4.7
Nov 14 18:12:26 myhostname clamd[26163]: Received 0 file descriptor(s) from systemd.
Nov 14 18:12:26 myhostname clamd[26163]: clamd daemon 0.99.2 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
Nov 14 18:12:26 myhostname clamd[26163]: Running as user amavis (UID 489, GID 489)
Nov 14 18:12:26 myhostname clamd[26163]: Log file size limited to 1048576 bytes.
Nov 14 18:12:26 myhostname clamd[26163]: Reading databases from /var/lib/clamav
Nov 14 18:12:26 myhostname clamd[26163]: Not loading PUA signatures.
Nov 14 18:12:26 myhostname clamd[26163]: Bytecode: Security mode set to "TrustSigned".
Nov 14 18:18:07 myhostname postfix/smtpd[26578]: fatal: open database /etc/postfix/sender_whitelist.db: Bad file descriptor
Nov 14 18:18:08 myhostname postfix/master[26300]: warning: process /usr/libexec/postfix/smtpd pid 26578 exit status 1
Nov 14 18:18:08 myhostname postfix/master[26300]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling

Offline
***
Re: How to Rebuild Postfix Mail Server
« Reply #11 on: November 15, 2016, 08:53:00 AM »
Code: [Select]
myhostname postfix/smtpd[26105]: fatal: open database /etc/postfix/sender_whitelist.db: Bad file descriptor
Nov 14 18:12:24 myhostname postfix/master[25978]: warning: process /usr/libexec/postfix/smtpd pid 26105 exit status 1
Nov 14 18:12:24 myhostname postfix/master[25978]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling

comment out this line in main.cf

Code: [Select]
check_sender_access hash:/etc/postfix/sender_whitelist,

restart postfix and check maillog if any other error

Offline
*
Re: How to Rebuild Postfix Mail Server
« Reply #12 on: November 18, 2016, 09:58:47 PM »
I removed "check_sender_access hash:/etc/postfix/sender_whitelist," from main.cf and the server is working!

Is it neccesary to do something after I changed it?
Or is it safe to run the server this way?

Thank you for your help!

Offline
*****
Re: How to Rebuild Postfix Mail Server
« Reply #13 on: November 19, 2016, 10:49:03 AM »
I removed "check_sender_access hash:/etc/postfix/sender_whitelist," from main.cf and the server is working!

Is it neccesary to do something after I changed it?
Or is it safe to run the server this way?

Thank you for your help!

it is safe

Offline
*
Re: How to Rebuild Postfix Mail Server
« Reply #14 on: January 12, 2017, 04:52:46 PM »
What are the commands I need to run to completely remove and re-install email server and its services?

Thanks.