• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

limit outgoing mail to own domain

hugosnel

Basic Pleskian
Hello,
I need to limit outgoing mail to own domain for certain users.
I have found some articles conc this subject but would like to have more input!!
Anyone?

ps where can I find the file limit outgoing sendmail.cf? is it a general or user dependent file??
 
Merci!
I know most of this fonctionallity of Plesk but I mean like for my domain.com:
Xxx@mydomain has right to send to everywhere
Yyy&mydomain.com may ONLY send to mydomain.com
It seems to be a standard function in ms exchange!
Hugo
 
Looks promising, it will take some study and time ...
I will report back .
Merci encore!
Anybody else ?
 
/etc/postfix/main.cf:
smtpd_recipient_restrictions =
...
check_sender_access hash:/etc/postfix/restricted_senders
...other stuff...

smtpd_restriction_classes = local_only
local_only =
check_recipient_access hash:/etc/postfix/local_domains, reject

/etc/postfix/restricted_senders:
foo@domain local_only
bar@domain local_only

/etc/postfix/local_domains:
this.domain OK matches this.domain and subdomains
that.domain OK matches that.domain and subdomains


Specify dbm instead of hash if your system uses dbm files instead of db files. To find out what map types Postfix supports, use the command postconf -m.

So as I uderstand it:
1 I edit main.cf and add the 2 code lines at their correct place
2 I create two files /etc/postfix/restricted_senders & /etc/postfix/local_domains
These two files are just plain text file, what are their rights?

TIA,
Hugo
 
Seems OK, if you can test it before on a dev env. it would be the best. Don't forget to postmap your files.

Let us know how it goes!
 
Please assist me a bit more:
what will be the syntaxis of
makemap file_type file_name < file_name with
for the file /etc/postfix/restricted_senders ?
 
Just to be clear, try this in a dev env before. I'm not responsable for anything that happens if there's an issue.

What I use is: postmap /path/to/your/file (ex: postmap /etc/postfix/restricted_senders)

Please let us know how it goes.
 
Back
Top