Are forwarded emails processed by spam assassin?

electric

Well-Known Member
Nov 5, 2001
785
9
318
I'm getting conflicting answers to this question, so I thought I'd ask it again to see what people say. (Yes, I did a search.. which is where I found the conflicting answers.)

Does spam assassin "work" when an email is being forwarded?

For example, we have a client who has no email accounts created, but they have the "catchall" address set to forward email to [email protected].

They have enabled spam assassin for their cpanel account, and configured a filter so that any "tagged" spam will get discarded.

Now, is spam assassin going to work for this setup?

Thanks!
 

sparek-3

Well-Known Member
Aug 10, 2002
2,007
222
368
cPanel Access Level
Root Administrator
In my experience SpamAssassin will scan forwarded e-mails, if that address is also set up as a mail account on the domain.

For example, if you had [email protected] set up as a POP/IMAP account AND you had [email protected] set up to forward to [email protected], then then messages to [email protected] would be scanned by SpamAssassin and marked accordingly. I am not sure how this would work if you have your account set up to discard SpamAssassin marked messages, but if you just have SpamAssassin set up to rewrite the subject of spam messages, then it has been my experience that both the POP/IMAP account on your server AND the [email protected] address would receive messages with the subject rewritten.

If just the forwarder is setup, then I do not believe SpamAssassin will scan the messages.

As a side note, you should consider searching the forum for "aol forwarders". There are some issues involved with forwarding e-mail off of your server, this holds especially true for aol addresses and doubly true if you are forwarding your default box to an aol address.
 

electric

Well-Known Member
Nov 5, 2001
785
9
318
sparek-3 said:
In my experience SpamAssassin will scan forwarded e-mails, if that address is also set up as a mail account on the domain.

...

If just the forwarder is setup, then I do not believe SpamAssassin will scan the messages..
After my own testing, I can confirm this is exactly how it works. :(

I wish spam assassin also worked for forwarded emails. Or at least have that as an option in the WHM "tweak settings" area.

sparek-3 said:
As a side note, you should consider searching the forum for "aol forwarders".
You bet. I'm intimately aware of this problem. Do a search for "AOL fowarder addon" and you can find my whm addon that will give you a list of all aol forwarders on your server. :)
 

eger

Well-Known Member
Feb 28, 2003
128
0
166
This sucks for forwarders that are piped to Ticket Systems that you want the messages scanned... I also wish just forwarders could be scanned by SpamAssassin.
 

asterisk

Well-Known Member
Nov 11, 2005
61
0
156
Just a thought, create an intermediate inbox so that SpamAssassin can work on those mails and forward/pipe mails from there, then setup a script to delete e-mails in the intermediate inbox once it has been forwarded.
 

electric

Well-Known Member
Nov 5, 2001
785
9
318
eger said:
This sucks for forwarders that are piped to Ticket Systems that you want the messages scanned... I also wish just forwarders could be scanned by SpamAssassin.
Submit this as a feature request. :)
 

freedman

Well-Known Member
Feb 13, 2005
314
5
168
electric said:
I wish spam assassin also worked for forwarded emails. Or at least have that as an option in the WHM "tweak settings" area.
well... I've modified my /etc/exim.conf quite a bit so I can't really say exactly what needs to be done, but... I believe you can reorder things a bit, so that at least most of this scanning happens before it bothers checking for where the mail is actually being delivered.

That being the case, you can filter out for blacklists, run a message through clamav, and then add a spamassassin tag before it gets redirected or piped.

there have been several postings on here about adding antivirus/spamassassin to the exim config, but I'm pretty sure with a little bit of work you can get it done.

just remember to keep backups handy for when ya mess up :P