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

Roundcube Password change plugin

To enable the email account password change option from roundcube, you can add the following in file: /usr/local/apache/htdocs/roundcube/config/main.inc.php Don’t forget to replace your postfix user “PASSWORD” $rcmail_config[‘plugins’] = array(‘password’); $rcmail_config[‘password_driver’] = ‘sql'; $rcmail_config[‘password_db_dsn’] = ‘mysql://postfix:PASSWORD@localhost/postfix'; $rcmail_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 […]

Read More

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 […]

Read More

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 […]

Read More

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 […]

Read More

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 […]

Read More

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 […]

Read More

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 […]

Read More

Postfix Mail Server commands

Some useful postfix commands //postqueue -p is the same as mailq List mail queue and MAIL_ID’s, list mail queue postqueue -p mailq Reload config service postfix reload Restart postfix server service postfix restart View the postfix version postconf mail_version Show default postfix values postconf -d Show non default postfix values postconf -n Flush mail queue […]

Read More