• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Smtp email sending rules and exceptions

Smadonnatore

New Pleskian
Hi,
on Plesk i have two domain registered.
I need to set the email server to act like this:

- all email addresses created in these two domains can send emails only to the other emails registered for the domain;
- only few email addresses can send email to external addresses.

I read about the "Closed Relay": with this option all users can send emails only to the users who have mailboxes on my server. But i cannot define exceptions.

Can you give me a direction?

P.S. All these rules must be valid using webmail, too.

Thanks
 
There is no direct way I can think of to achieve what you want on Plesk.

You can get half way there by disabling smtp auth on port 25, enabling message submission on port 587 and then firewalling 587 so that only your "exception" users can connect and authenticate (and so send anywhere).

However, that would require that none of your exception and non-exception users share the same IPs. And it would have no effect on webmail.

Hmmm....one avenue that you may want to investigate is to look at spamdyke (spamdyke.org). This is primarily an anti-spam add-on for qmail and works perfectly with Plesk. What's useful about this for your purpose is that you can set things up so that spamdyke will handle smtp authentication instead of Plesk (BUT I have not tried this).

Check out http://www.spamdyke.org/documentation/README.html#SMTP_AUTH

If this works in the way I think it does, you could then create your own list of username/password combinations that can auth, and in doing so create an exception list.

However, once again this will have no effect on webmail (which connects to localhost).

It is possible to change the way that horde webmail authenticates when sending email, and it may be possible to arrange things in a way that makes it send the username/password of the logged in user via a port that has been configured to use spamdyke's authentication.

I have no clear ideas about how you'd go about this, but here's somwhere to at least start looking: /etc/psa-webmail/horde/imp/servers.php

But in reality I don't know whether or not you can achieve what you want at all in the Plesk-supplied horde or even in any version of horde. So you may need to be look at a different webmail system that does this out of the box, or you may need to think about making extensive modifications to the existing horde install. Or it could be really easy with a simple configuration change -- like I say, I really don't know. Have a look at the horde documentation from the horde project website to see if there's a clue there (but remember that the version of horde used in Plesk is a bit older than the current horde release version).

I hope this points you in the right direction. It would also be nice if someone else on the forum had any ideas -- maybe there's a really easy way to do what you want and I just don't know about it.
 
Back
Top