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 - […]
Category: E-Mail
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 […]
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 […]
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 […]
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
How to filter (spam) emails with the roundcube
Easily manage email Filters from the RoundCube. Log in to your email account via RoundCube and go to Settings->Filters Video instructions
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 […]
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, […]
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 […]
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 […]
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 […]
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 […]
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, […]
Roundcube Password change plugin
To enable the email account password change option from roundcube, you can edit file: /usr/local/cwpsrv/var/services/roundcube/plugins/password/config.inc.php Don't forget to replace your postfix user "PASSWORD" $config['password_driver'] = 'sql'; $config['password_db_dsn'] = 'mysqli://postfix:PASSWORD@localhost/postfix'; $config['password_query'] = "UPDATE mailbox SET password=CONCAT('{PLAIN-MD5}', MD5(%p)),modified=NOW() WHERE username=%u LIMIT 1"; You can find your postfix password here: grep pass /etc/postfix/mysql-virtual_mailbox_maps.cf
How to resolve spamming issue with postfix
How to resolve the spamming issue with your postfix mailserver having CWP. Before starting we should stop the postfix mailserver. service postix stop For start lets count the number of emails stuck in the mail server queue: postqueue -p | grep -c "^[A-Z0-9]" Select few similar emails and use IDs to check them postqueue -p […]
How to test SMTP with telnet
How to test the remote SMTP connection from your server by using telent. Before starting you will need to encoded your username and password with base 64 encoder. BASE64 Encoder websites https://www.base64encode.org http://www.freeformatter.com/base64-encoder.html http://encodertool.com/base64 SMTP Ports: 25, 465, 587 TEST CONNECTION telnet IP PORT EHLO >HOSTNAME< AUTH LOGIN >Your BASE64 encoded username< >Your BASE64 encoded […]
How to manually import emails
Instructions for manual import of the emails to your CWP server. 1. Create all required mailboxes via CWP 2. Login in each created mailbox (this will create required file and folder structure) 3. Copy the emails (like any other files) in /var/vmail/DOMAIN.COM/USERNAME 4. Fix Permissions (chown uploaded files vmail:mail) Example path for email account: mark.s@cwp.com […]
Tracking PHP Script SPAM
By simply adding the following two lines into your /usr/local/php/php.ini you can track down pretty much any outgoing spam which is using PHP mail() function. Minimum required PHP version is: PHP 5.3 mail.add_x_header = On mail.log = /var/log/phpmail.log The first one adds a header to all outgoing emails sent by PHP scripts. With these in […]
Resolve, Emails marked as SPAM
Are you emails ending up in the SPAM folder or are they marked as a SPAM ? You need to check for the tree most common issues: 1. Check rDNS if its properly set 2. Check that you have enabled DKIM 3. Check that you are not blacklisted 1. Check rDNS if its properly set […]
How to Rebuild Postfix Mail Server ?
Starting from the CWP version 0.9.6+ you have a new awesome Postfix Mail Server Manager (Re-Builder) With a single click you can 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 […]