Pmta+oempro implementation scheme in Linux

Source: Internet
Author: User
Tags auth comments parse error tld dovecot

Upload installation package to/USR/LOCAL/SRC

Chkconfig * * off service (such as chkconfig postfix off)

To see if Pmta is started, execution/etc/init.d/pmta start is not started


Show startup failure, enter Pmtad–debug for debugging, error message

2015-02-10 23:59:26 Startup error:parse Error in line 435 Of/etc/pmta/config:number missing

VI +435/etc/pmta/config found error line modify IP and domain name:
Smtp-source-host Yourip YourDomain

Modify the result for example


If there is a multiple domain name, multiple IP can be directly under the line to add, execute Pmtad–debug will find no error message
Perform the/etc/init.d/pmta start service, NETSTAT-LNPT will discover that port 7100 is already open

TCP 0 0* LISTEN 8747/pmtad

Enter in the browser to view a Web interface such as a send case

The other 2525 is the STMP port, and this and 7100 ports can be modified in the Vi/etc/pmta/config configuration file to implement the following:
Http-mgmt-port 7100
Smtp-port 2525

Run/etc/init.d/pmta to reboot after modification

The following sections of the configuration file are used to configure the user name and password:

<smtp-user tiger>
Password tiger123
SOURCE {Smtpuser-auth}

Oempro file default decompression in/var/www/html/oem/

Enter database username password Installation Complete interface display login address and login information

Access URL
Username Test
Password test1234

Enter the background click Settings > Email Delivery, Delivery method dropdown box can choose SMTP Connection or POWERMTA, where the choice of POWERMTA,POWERMTA features more powerful than SMTP
Enter after Virtual MTA name, pick-up directory, and fill in your domain after/var/www/tmp, bounces > Catch-all domain

Then create a new user under user and click Login with user ' s own privileges when the new is done
Create a mailing list by clicking the Create NEW list

Campaigns > Create NEW campaign,campaign Name Enter task Name, select Send List, remove check publish this CAMPAIGN in RSS feeds, click CREATE CAMPAIGN and EDIT CAMPAIGN EMAIL
Click From Scratch

Generate Dkim Tools
Enter domain prefix and domain name separately, such as and Alanhou will give birth to a public and private key, the private key is configured into PMTA configuration file

VI +436/etc/pmta/config Add code similar to the following
Domain-key Localhost,*,/etc/pmta/dkim/localhost.pem

And then copy the private key into your new/etc/pmta/dkim/ file, and then create a TXT record according to the prompts.

Generate SPF record through, IP address part input, generate content Add SPF record

You can test each record configuration by sending mail to check-auth-****

Configuration file (/etc/pmta/config) related configuration

1.Domain Macro

Domain-macro toplevel com, DE,
Domain-macro AOL AOL, AIM
Used to match, and other domain names
<domain $aol. $topLevel >
... settings ...

2. Max-msg-rate Send Frequency

Oempro Configuration

Email delivery:smtp or Powermta

Load balancing set Oempro How many messages are sent to Pmta per interval of seconds

Pickup path settings, set in/etc/pmta/config, TMP Powermta Extract the path of the message,


You also need to set permissions on both folders (chmod 777)

To enhance the experience, you can unsubscribe to the Oempro default unsubscribe/fail Jump:



<script type= "Text/javascript" >

Window.settimeout ("window.location= ' '", 1000);

Read log

To be able to Pmta+oempro scheme send mail will be/VAR/LOG/PMTA under the date of the log, records sent, the post success is usually returned in the log 2.0.0 (success), and most of the exception will return the 5.*.* status code, Such status codes can refer to the discontinued type of mail marketing, such as 5.0.0 for this account has been disabled or 5.7.1 and delivery (authorized not bounce), and so on. You can export mailboxes that contain these exceptions by using the following code

Cat/var/log/pmta/acct-2015-*.csv | grep '. *5\. [0-9]\. [0-9].* ' >>/root/bounce.txt

Cat/root/bounce.txt | Awk-f "," ' {print $} ' >>/root/bounceemail.txt
The above output two files are mainly convenient to read Bounce.txt for further verification, of course, you can also choose to directly use the following statements directly output the mailbox:

Cat/var/log/pmta/acct-2015-*.csv | grep '. *5\. [0-9]\. [0-9].* ' | Awk-f "," ' {print $} ' >>/root/bounceemail.txt
And if you want to remove a mailbox that no longer exists, you can extract only the parts of 5.0.* and 5.1.*, using only

Cat/var/log/pmta/acct-2015-*.csv | grep '. *5\. [0-1]\. [0-9].* ' | Awk-f "," ' {print $} ' >>/root/hardbounceemail.txt

If you do not follow the bounce type, some of the keywords in the log are summarized as follows:

Grep-e ' mailbox\ unavailable|bad\ destination|no\ mail\ hosts|554\ delivery\ error|mailbox\ not| invalid\ mailbox|no\ answer\ from\ Host '
Set up a collection of messages

Yum Remove sendmail-y
Yum install postfix dovecot-y

Open configuration file/etc/postfix/,

Remove inet_interfaces = All comments

Remove Myhostname = host.domain.tld comments and change the domain name after the equals sign

Remove mydomain = domain.tld comments and change the domain name after the equals sign

Save startup/etc/init.d/postfix Start (NETSTAT-LNPT to see if Port 25 is started)

Open Dovecot configuration file/etc/dovecot/dovecot.conf

Remove protocols = comments for IMAP POP3 LMTP (mainly POP3)

Removal of Listen = *,:: Comments


Remove Disable_plaintext_auth annotation and change the value to No

Remove the annotation before mail_location and add a value of Maildir:~/maildir

Save startup/etc/init.d/dovecot Start (NETSTAT-LNPT to see if Port 110 is started)

Add users through Useradd, passwd set password

Other common commands
Empty queues

Pmta delete–queue=*/*

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.