![]() Some spammers use blank email address in the From: or To: header, you can add the following checks. You may also want to do the same with the Cc: (carbon copy) header, if you are sure an email address won’t be accepting emails with multiple recipients in the Cc: header /Cc.*(||outlook|).* / DISCARD * are a wild card in regular expressions that can be matched to any characters. The above lines will check if an Gmail/Yahoo/Outlook/Hotmail address and your domain email address are in the To: header at the same time. If you are sure an email address won’t be accepting emails with multiple recipients in the To: header, you can add the following lines to discard such email. Some stupid spammers use multiple email addresses in the To: header, instead of using Blind Carbon Copy (BCC). If an innocent user’s email address is used as the sender address, you can claim successful delivery, so that the innocent user does not receive bounce messages. DISCARD can also be useful to minimize the backscatter problem. I often use DISCARD when I don’t want the spammer to know I have blocked a certain phrase for incoming email. DISCARD makes it look as if the message was delivered even though it was simply thrown away. This will cause Postfix to claim successful delivery and silently discard the message. You can also use DISCARD, instead of REJECT. By default regular expression checking is not case-sensitive. If any of the strings on the left-hand appear in any of the headers of an email message (these would most likely show up in the Subject: header), the message is rejected during the SMTP dialog. The lefthand key is a regular expression enclosed by two forward slashes. You can add regular expression checking like below. Then you need to create the /etc/postfix/header_checks lookup file with a command line text editor such as Nano. header_checks = pcre:/etc/postfix/header_checks sudo nano /etc/postfix/main.cfĪdd the following line at the end of the file. To enable header_checks in Postfix, open the main configuration file. Run the following command and you will see pcre is now supported. To use PCRE in Postfix, you need to install the postfix-pcre package. Postfix comes with POSIX regular expression support, but PCRE is way faster. PCRE: Perl compatible regular expression.There are mainly two types of regular expressions that can be used by Postfix. ![]() Header and body checks are done by the Postfix cleanup daemon. If Postfix finds a match, the specified action is executed. The patterns are compared to strings within email messages (header and body). Each parameter points to a lookup table containing regular expression patterns and actions. Postfix will check all inbound emails when any of the above parameters is being used. Postfix provides 4 simple content checking parameters. Email Header and Body Checks with Postfix SMTP Server SpamAssassin is a free, open-source, flexible and powerful spam-fighting tool. Specifically, we will see how to check email header and body with Postfix and SpamAssassin (SA) to detect spam. I’m going to share more tips and tricks to block email spam in this article. It can take up to 15 minutes for your application to be installed, and then it should be available within your Plesk Control Panel interface > Server > ‘Tools and Settings’ tab > Mail > ‘Spam Filter Settings’ menu.In previous articles, we discussed how you can quickly set up your own mail server using iRedMail and 7 effective methods for blocking email spam with Postfix SMTP server. Click ‘next’ and follow the wizard for the application to be installed automatically. Select SpamAssassin (the naming varies depending on the version of Plesk you are running, but will always contain ‘spamassassin’ in the name):ĥ. Under the ‘Store’ section, click ‘Add Application’:Ĥ. If you have just one subscription, simply go to the ‘Home’ tab.ģ. If you have multiple subscriptions, you can switch between them from the drop down menu located in the right upper corner of the screen. Log in to Layershift Customer Control Panel.Ģ. You can install SpamAssassin at any time by following the steps below:ġ. We do not install this automatically as it uses system resources (memory in particular) even when not in use. In order to use SpamAssassin, which is included free as part of your Plesk Panel license, it is necessary to install it via the Layershift Customer Control Panel.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |