How to forward a particular sender to only my own admin email account

Hi guys,
I have particular sender who is causing significant problems for one of my clients. the sender is actually on the police radar and looking at massive fines (thousands of dollars) for his ongoing refusal to agree to the government authority written demands to “cease and desist”. The government body that are investigating him are being completely ignored and his behaviour continues irrespective of the official letter anyway.

I have tried blocking this sender in spam assassin but emails are still coming through. I wonder if this is because i also have a single alias email account that sends to all users and he is also sending emails to that alias?

In light of this, I still want to receive emails from the sender (to use as evidence against him should it come to that), however, i dont want the users to be upset by him anymore. (i note that he is also sending to an alias email account on the virtual server…i would need to catch any sent to that alias as well)

How can i redirect any and all emails from that sender to only my own personal admin account in virtualmin?

Does the following suffice…

  1. Webmin>Servers>Spamassassin Mail Filter>>Allowed and Denied Addresses>Denied Addresses= add this mongrel sender to the denied list

  2. Webmin>Servers>Spamassassin Mail Filter>Procmail Spam delivery>forward to email address = my own email address on the mail server

Is there a better way i can do this so all spam doesnt forward to me and only this sender emails are forwarded?

Hi Adam

Wow man - that’s quite an interesting (probably not in a good way) situation to be in.

I think this might be of some help - How to forward some incoming mails from Postfix

Let us know how you get on.



Just to clarify, this guys illegal activities dont relate to sending emails as such…one of my clients represents a body that are entrusted with governing a particular sport and his breaches relate to that sport which is in an area of Aviation.

Anyway, I need to do it from a higher level than an individual user mail account though. I need to do this from a webmin administrator level for the entire VPS.

Its not really an option to go through all of my clients user accounts and manually configure those accounts in order to ensure his emails only come to me.

I have already done this in procmail, but i am not convinced it is working as intended and need some further guidance to ensure i have complete control of this. It is important that the rogue ratbag is not alerted to the fact that his emails are blocked(or caught), however, i dont want them going to users…only me.

Procmail runs at two levels (sometimes even three) in a Virtualmin system. You can modify the systemwide /etc/procmailrc, or you can edit the procmail configs that run per domain. And, it’s also possible to enable per-user procmail.

If you look at your system procmailrc it’ll contain these lines:

* ?/bin/test "$VIRTUALMIN" != ""

This checks to see if this user is in a Virtualmin mail domain, and if it is, it pulls in the domain procmail configuration. You can make your own rules above that, and as long as they don’t kill all the other mail before it gets to the later rules, it’ll be fine. But, do be careful, as this is a big/dangerous hammer.

@joe - cheers for the info. I knew procmail could run at the either the system level (which I assume is the VPS) or the user level, I didn’t realise it could run at the domain level too. Good to know.

@adamjedgar - maybe setup a new Virtual Server\Domain (if you have a spare one) and try a take the basis of a user level procmail recipe and use it as the basis of one at a domain level (or VPS) level? The safer option might be to do it on a test\dev VPS - that way you can test it without inadvertently killing mail to users.



I dont want to go outside standard configurations for the mail server…causes problems later i think…So in terms of domain level (which is also a satisfactory option), does the setting i have already mentioned in my previous post work as i think it does?
With my current settings am i now the only one getting emails from this sender to that domain?
What happens if he replies to an email sent by one of the users to him previously, will it still catch that (ie only forward it to me )?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.