PowerMTA allow an IP to sent email

To allow a web server to send email through PowerMTA with out autentication, you need to edit PowerMTA configuration file

vi /etc/pmta/config

Add a source entry for the IP address that you need to allow relaying mails


    always-allow-relaying yes
    smtp-service yes

Replace IP_ADDRESS with IP address of web server that you need to allow sending email with out autentication.

Restart PowerMTA

systemctl restart pmta

With out source entry, if you try to sent email, you will be rejected with error “550 5.7.1 relaying denied for recipient”.

Example using swaks

root@lab:~# swaks --to [email protected] --server smtp1.serverok.in --port 2525
=== Trying smtp1.serverok.in:2525...
=== Connected to smtp1.serverok.in.
<-  220 smtp1.serverok.in ESMTP service ready
 -> EHLO lab.serverok.in
<-  250-smtp1.serverok.in says hello
<-  250-ENHANCEDSTATUSCODES
<-  250-PIPELINING
<-  250-CHUNKING
<-  250-8BITMIME
<-  250-AUTH CRAM-MD5
<-  250-AUTH=CRAM-MD5
<-  250-XACK
<-  250-SIZE 0
<-  250-VERP
<-  250-SMTPUTF8
<-  250 DSN
 -> MAIL FROM:
<-  250 2.1.0 MAIL ok
 -> RCPT TO:
<** 550 5.7.1 relaying denied for recipient in "RCPT TO:"
 -> QUIT
<-  221 2.0.0 smtp1.serverok.in says goodbye
=== Connection closed with remote host.
root@lab:~# 

See PowerMTA

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *