You can simply add the daemon_smtp_ports directive in the WHM Advanced Exim Editor to the first text box and open the firewall for the non-standard port.
Thank you for the tip. Is the first text box the one just below,
#!!# cPanel Exim 4 Config where it has the following:
queue_only_override = false
no_message_logs
log_selector = +arguments +subject
timeout_frozen_after = 4d
ignore_bounce_errors_after = 2d
Or, is it the empty text box below
begin acl?
Obviously doesn't solve your initial requirement and the difficult of it that sparek-3 has outlined.
Yes, this does seem a challenge and look like it can only be accomplished on the lines of what sparek-3 suggested. But, couldn't this be done using firewall settings? For example, CSF has the following settings:
10. Advanced Allow/Deny Filters
##############################
In /etc/csf.allow and /etc/csf.deny you can add more complex port and ip
filters using the following format (you must specify a port AND an IP address):
tcp/udp:in/out:s/d=port:s/d=ip:u=uid
Broken down:
tcp/udp : EITHER tcp OR udp protocol
in/out : EITHER incoming OR outgoing connections
s/d=port : EITHER source OR destination port number
(use a _ for a port range, e.g. 2000_3000)
s/d=ip : EITHER source OR destination IP address
u/g=UID : EITHER UID or GID of source packet, implies outgoing connections,
s/d=IP value is ignored
Examples:
# TCP connections inbound to port 3306 from IP 11.22.33.44
tcp:in:d=3306:s=11.22.33.44
So, if I get the smtp daemon listening on a non-standard port in Exim and then configure this port as the one to which incoming mail traffic from a specific IP address/range should be delivered, wouldn't that solve the problem?
Or, am I missing something else that needs to be done on the mailserver?
Actually, the background to the whole story is that some of my hosting clients use both Postini and MXLogic. To prevent spammers from bypassing the filtering service, I am asked to specify their IP ranges as the only ones from which the server will accept incoming mail traffic. The problem is that this will shut off email for all the other domains on the VPS that do not use the filtering service. When I looked for a workaround, I was told this:
On trick you can do is to restrict your firewall for inbound email but for a port like 4025 that is different than the usual SMTP port (leave 25 unrestricted). Then, configure your email server to accept email for the mxlogic domains on 4025 and for them to reject it on 25. Then configure mxlogic to deliver to your servers on port 4025 instead of 25.