Problem with sending emails with the hostname
-
Hello @Sandeep!
I don't know if you have, but I have different servers with CWP, from where I think they send SPAM from the server with emails of the type:
*@hostname.com
Do you know how you can prevent them from using emails that do not exist on the CWP server to send emails?
Greetings!
-
@josepp did you checked the origin/source of the mail ?
-
@sandeep said in Problem with sending emails with the hostname:
@josepp did you checked the origin/source of the mail ?
Hello!
The truth is that it happens in all servers CWP, so I was rather asking if you knew any general solution for the servers not to be able to send emails of this type:
root@hostname.com
users@hostname.comOr similar.
I add: I have the php mail function disabled, we use SMTP.
-
I add: I have the php mail function disabled, we use SMTP.
-
@josepp hi you can add server hostname to postfix reject list in order to stop receiving from them.
Like in :
/etc/postfix/sender_access
Add one of below which fits you i.e. you don't want mail from those sans or from particular user matches the name.
domain.com REJECT sub.domain.com REJECT user@ REJECT
now run postmap:
postmap /etc/postfix/sender_access
Ensure you added the reject config or present in /etc/postfix/main.cf
smtpd_recipient_restrictions = check_sender_access hash:/etc/postfix/sender_access
At last restart postfix service.