Help with cPanel and incoming email

eric_f

New Member
Oct 14, 2011
13
1
1
Hey everyone,

I've successfully setup PMG and want to put it in front of my cPanel servers to filter both incoming and outgoing mail. I currently have outgoing working for everybody without issue. The problem I'm having is with incoming email.

I've setup one of my domains to use as a test. I've changed the MX record to point to my PMG, which in turn is forwarding it off to cPanel, but cPanel it bouncing the message back.

The only information I've found in the logs is as follows:

SMTP connection from [167.***.***.200]:50148 (TCP/IP connection count = 1)
1ezbTk-0004Bh-KH <= my_sending_email@gmail.com H=(mailgateway.mydomain.ca) [167.***.***.200]:50148 P=esmtp S=4043 id=CAJShL5Cp+0Yxu91yPGTi5VnDZySuBAY-3fqwoMaV7N_rJpW31w@mail.gmail.com T="test subject" for my_receiving_email@mydomain.ca
SMTP connection from (mailgateway.mydomain.ca) [167.***.***.200]:50148 closed by QUIT
cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1ezbTk-0004Bh-KH
1ezbTk-0004Bh-KH 167.***.***.200 in /etc/alwaysrelay trusting from_h_domain of: gmail.com and from_h_localpart: my_sending_email
1ezbTk-0004Bh-KH SMTP connection outbound 1521868353 1ezbTk-0004Bh-KH gmail.com my_receiving_email@mydomain.ca
1ezbTk-0004Bh-KH => my_receiving_email@mydomain.ca R=lookuphost T=remote_smtp H=10.3.37.200 [10.3.37.200] C="250 2.0.0 Ok: queued as 179E48157D"
1ezbTk-0004Bh-KH Completed

That message is repeated 10 times with different ID's.

In PMG, I've setup both a relay domain and a transport to point at the correct cPanel server.

On cPanel I've added my PMG servers public and private IPs in /etc/alwaysrelay and /etc/trustedmailhosts

Does anybody have any other suggestions to get this working correctly?

Cheers,
Eric
 
There are some things that are configured in PMP

http://prntscr.com/iwvib1

have you configured that in PMP already?

and the other try without the firewall disabled in cpanel, or add the ip of PMP in cpanel
 
Hi there,

Yes, I have setup both the Relay Domains and the Transports.

I'll try disabling the firewall and see what happens.

Cheers,
Eric
 
  • Like
Reactions: InGenetic
I got help from cPanel and my problem was I needed to set the Email Routing to Local Mail Exchange instead of Automatically Detect on the MX record editor.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!