1

Topic: Block sending to certain email

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.2
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: Ubuntu 22.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi,

I have a user who always sends messages to the email "robert _vinicius2013@hotmail.com".

As you can see it is wrong, it has a blank space, and this email is always stuck in the Postfix queue.

How do I block sends to this email or block sends to emails with blank space?

Thanks for listening

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2 (edited by Cthulhu 2022-10-28 08:09:50)

Re: Block sending to certain email

then empty the postfix queue with that email destination.
i don't know why it is in the queue at all, since it should be delivered and end up as a bounce message.

is the mail manually sent, or do you think it is a breached account and the mail is sent trough this?


edit:

this command should clear the mailq for you

mailq | tail +2 | grep -v '^ *(' | awk  'BEGIN { RS = "" } { if ($7 == "comproised@mail.com") print $1 }' | tr -d '*!' | postsuper -d -

3

Re: Block sending to certain email

Hi buddy,

Is the mail manually sent.

Every month the user sends along with other emails and he simply recorded this one wrongly. I could just ask him to fix it, but if in the future he makes a mistake again the problem will persist.

4

Re: Block sending to certain email

The problem shouldn't even exist, since undeliverable mails should just cause a bounce and don't persist in the mailq forever

for now, yeah asking him to fix it would't be the worst for now, but troubleshooting why this odd behaviour occours should be investigated further

do you have any maillogs of the failed delivery?

5

Re: Block sending to certain email

Hi,

How can I generate this maillog?

6

Re: Block sending to certain email

bnobre wrote:

How can I generate this maillog?

Please check file /var/log/maillog.