• 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.

How to block a outgoing emails destiny? [solved]

hardbrasil

Regular Pleskian
Hello fellas, i know this is unusual, but i have a customer hosted on vps that, probably your machine is infected or wherever...

him email account send a lot of emails to a specific gmail account, a lot of spam all day.
and of course gmail block this and become on my mta pool.

i already talked with the customer, suggest him to pass a antivirus into him computer, but he still sending spam

is possible to block a outgoing msg for a specific email account on Plesk?

i am using postfix / plesk 12.5 latest v.

regards!
 
Hi hardbrasil,

the Plesk Knowledge-Base has a lot of usefull solutions and suggestions, as for example:

Based on the informations from this article, you could now switch to Qmail wiki ( http://www.qmailwiki.org/Qmail-control-files ) and search for related control - files for Qmail and will find:



Now these informations are for Qmail - users and to achieve the very same goal for postfix, you could do:

  1. Create a file "/etc/postfix/recipient"
    1. The file can be stuffed with definitions as for example:
  2. Edit your "/etc/postfix/main.cf"
    1. Search for "smtpd_recipient_restrictions =" and add there:
      smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/recipient, permit_mynetworks, ...
  3. Restart postfix and try to send a test - eMail to the defined spam-receiver - eMail - adresses and check your mail - logs for the results.
  4. Consider to use:
    Code:
    postmap /etc/postfix/recipient
    ... if you experince issues with the hash - file creation.


Unfortunately, these settings are not restricted to a specific eMail - adress on your server, but for all senders.
 
Last edited by a moderator:
Hi UFHH01,
unfortunately doesn't work, my customers was unable to send messages.

round cube show this:

Erro SMTP (451): Falha ao adicionar o destinatário "email@domain" (4.3.5 <email@domain>: Recipient address rejected: Server configuration error).
 
Hi hardbrasil,

I'm a bit confused now....
unfortunately doesn't work
on the other hand you stated:
Recipient address rejected: Server configuration error

So that's the expected behaviour, if the customer now wants to send an eMail to a denied recipient in your list at "/etc/postfix/recipient", but you still say "unfortunately doesn't work". Could you please explain in more detail "what doesn't work", if the suggestion should not deny any sender - activities to the list at "/etc/postfix/recipient" ?
 
  • Like
Reactions: abi
hello, i explain...

every message that user try to send he got this msg above.
i dont know why but this blocked all senders.
 
Hi hardbrasil,

could you please post the whole line from "smtpd_recipient_restrictions = ..."

Is any other eMail - adress affected since you changed the configuration?
Did maybe Fail2Ban interfears by blocking the IP from your customer?

I recommend not only to inspect the mail - log, but as well Fail2Ban - logs, to investigate, why the above suggestion reacts in a unwanted behaviour.
 
Hi UFHH01,

this change affect all emails (from all customers) regarding that we are changing a global setting.
fail2ban is disable, its not work well with more than 100 domains...

here is:
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination (default)
 
Hi hardbrasil,

did you consider to add the additional "check_recipient_access hash:/etc/postfix/recipient" at the END, instead of the beginning. to avoid the termination of the process after the first definition?
Please consider as well to use the command:

postmap /etc/postfix/recipient

... to be sure, that the hash - file has been created.​
 
Back
Top