Postfix Blacklist Domain or IP

This option works only if you have rebuilt the mail server in cwp.admin with antispam. You can blacklist or whitelist incoming emails in the following files: /etc/postfix/sender_blacklist /etc/postfix/sender_whitelist After making changes you need to run the following command for the files you edited postmap /etc/postfix/sender_blacklist postmap /etc/postfix/sender_whitelist Options: # Example for blacklisting domains/IP's or emails, […]

Read More

How to install DKIM 2048 bits long key

You might need to install a custom DKIM key on your CWP DNS/bind server in case if you use your CWP server for nameservers and you use some external mail server with a custom DKIM key. In the user panel, you can do that by using DNS Zone Editor. Add New TXT Record and make […]

Read More

SpamAssassins Learning

Learn SpamAssassins about new spam messages Before starting, by using your mail client move all spam messages to a custom folder named Junk and then you can scan that folder as Junk/Spam. sa-learn -p /home/USER/.spamassassin/user_prefs --spam /var/vmail/DOMAIN.TLD/ACCOUNT/.Junk/{cur,new} By default, SpamAssassins will deny messages or save them in the folder /var/vmail/DOMAIN.TLD/ACCOUNT/.Spam/ Learn SpamAssassins about NOT spam […]

Read More

Test SpamAssassin and ClamAV

By default when you rebuild the mail server in CWP with antispam then it comes with enabled ClamAV & SpamAssassin protection. You can enable it from CWP.admin by going to MailServer Manager. Test ClamAV Send an email with content X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H* If ClamAV works you will see the following in the log: /var/log/maillog Dec 27 07:22:42 […]

Read More

RoundCube (Internal Server Error)

If you're getting Server error (Internal Server Error) in Roundcube that is because you've some incompatible version of Roundcube mail client is installed on your server which we didn't currently support. To fix the issue you need to run these commands one by one : First run the CWP Update script that will ensure you've […]

Read More

Dkim double signature

This issue can happen when using amavis. In case you have a double email signature you can edit your postfix config. File: /etc/postfix/master.cf smtp inet n - n - - smtpd -o content_filter=smtp-amavis:127.0.0.1:10024 -o receive_override_options=no_address_mappings After no_address_mappings add no_milters , example: smtp inet n - n - - smtpd -o content_filter=smtp-amavis:127.0.0.1:10024 -o receive_override_options=no_address_mappings,no_milters After changes […]

Read More

To reduce the amount of spam sent to Gmail

Since many today have an issue with the gmail blocking them in case of the spam, here is a short info about it. If you see in your postfix log file /var/log/maillog messages like: Mar 29 08:13:02 cwp-mailserver postfix/smtp[12934]: A35C2137013: to=, relay=gmail-smtp-in.l.google.com[173.194.69.26]:25, delay=1.1, delays=0.1/0.02/0.61/0.34, dsn=5.7.1, status=bounced (host gmail-smtp-in.l.google.com[173.194.69.26] said: 550-5.7.1 [85.111.34.35 12] Our system has […]

Read More

Postfix send email from dedicated ip address

Create file called sdd_transport_maps.regexp: /@customer1-dom\.tld$/ customer1: /@customer2-dom\.tld$/ customer2: /@customer3-dom\.tld$/ customer3: ..... next ..... In master.cf create special transport called customer1, customer2, customer3….and so on customer1 unix - - n - - smtp -o smtp_bind_address=1.1.1.1 -o smtp_helo_name=customer1-dom.tld -o syslog_name=postfix-customer1 customer2 unix - - n - - smtp -o smtp_bind_address=1.1.1.2 -o smtp_helo_name=customer2-dom.tld -o syslog_name=postfix-customer2 customer3 unix - […]

Read More

Roundcube Update

You can easily update your RoundCube to the latest version by using this command: sh /scripts/mail_roundcube_update The latest version will also bring you the new RoundCube skin elastic. If you skin is not set to elastic you can do it by yourself - check that you have this folder: /usr/local/cwpsrv/var/services/roundcube/skins/elastic - then run the command […]

Read More

catch-all emails

In cwp you can easily set up a catch-all email for domain and send all to a single email account. From the mail forwarders in the user panel create a new forwarder with email address * In the "Redirects to:" option, you can enter any email address and all email coming for *@domain1.com will be […]

Read More

Policyd - Limit emails per hour

Policyd is used to limit incoming and outgoing emails per hour. Video instructions Installation instructions Install it from cwp.admin by rebuilding the mail server with option policyd Left Menu->Email->MailServer Manager and select policyd other options is to do the manual installation over ssh command: sh /scripts/install_cbpolicyd * Run this command from the ssh If needed […]

Read More

Recalculate mailbox quota

If you had cleaned manually your mailbox via SSH or SFTP then you might need to update the mailbox quota Recalculate quota for single mailbox: doveadm quota recalc -u user@domain.com Recalculate quota for ALL mail accounts: doveadm quota recalc -A

Read More

Move /var/vmail to another partition

Due to the lack of the disk space on partitions like / or /var, it's sometimes necessary to move the /var/vmail folder to a larger partition which has more free space and mostly to the /home partition. You can check the list of your partitions with this command: df -h Before moving the emails you […]

Read More

Set up MX records for G Suite Gmail

To start using G Suite, you need to verify your domain and configure your domain's MX records to direct mail flow to Google mail servers. Video Instructions 1. Verify domain Verifying the domain will help you start using your Google services, such as G Suite, Drive Enterprise, or Cloud Identity. If you have G Suite, […]

Read More

How to Setup remote SMTP server as relay

Sending an outgoing email through a 3rd party SMTP relay service is a quick and easy alternative to setting up a full-fledged local email server. Open /etc/postfix/main.cf and add the remote mail server hostname to end of the file: relayhost = [remote.server.com] If the remote system uses a different port number, please specify the port […]

Read More

How to configure Spamassassin

Hi, there is how to configure Spamassassin + CWP's mail server. First, we have to edit Postifx and SpamAssassin configs. The /etc/postfix/master.cf has few variants at the time (january 2019) a) mail server built without ClamAV+SA+Amavis (you must install SpamAssassin manually) smtp inet n - n - - smtpd # -o content_filter=smtp-amavis:127.0.0.1:10024 # -o receive_override_options=no_address_mappings […]

Read More

Postfix pipe email to whmcs ticket

Easy instructions for email pipe to whmcs ticket We recommend to skip these instructions and do it from the user panel Mail Forwarders -> Alias-Pipe - you need to have an email account created in cwp for these instructions to work. In the configuration examples we will use username: testuser and email account space@test.com, don't […]

Read More

How to Debug Mail Server issues

How to Debug Mail Server issues - Incoming Emails - Outgoing Emails - WebMail (Roundcube incoming/outgoing) Incoming emails =============== Log Files Postifx (smtp server): /var/log/maillog Log Files Dovecot (pop3/imap server): /var/log/dovecot.log /var/log/dovecot-info.log /var/log/dovecot-debug.log From shell start tail on the log file by using this command tail -f /var/log/maillog After you have set tail on the […]

Read More

Mail delivery failed to ...

How to check your mail server reputation when mail is not delivered to the inbox Firstly check your mail server configuration on the following site: https://www.mail-tester.com/ You should test it by sending email from roundcube and email client software like outlook. Next, lets check your mail server reputation and rDNS/DNS match http://www.senderbase.org And as last, […]

Read More