Author Topic: Plugin Sauserprefs with forwarded messages  (Read 3093 times)

Offline insight

  • Newbie
  • *
  • Posts: 3
Plugin Sauserprefs with forwarded messages
« on: March 25, 2015, 04:40:38 AM »
Hi,

I'm using sauserprefs in combination with amavis and spamassassin to handle user-based spam rules. One issue I have are forwarded messages:

My main imap account on the server is   user1@example.com  If I receive emails directly to that address the rules work just fine, but lets say I have a second account  user2@anotherdomain.com  and I have set up an email forward from that account to my user1@example.com account. Then the rules lookup does not seem to work. I guess amavis is passing  user2@anotherdomain.com as username to SA and then the mysql lookup gets no result.

In the mail header there are two  Delivered-To:  statements one to user1@... and one to user2@.... but the address being used in SA is the original user2@.. address  for which no rules exist in mysql.

Is there any way to work around this? My first idea would be to have an option in sauserprefs called "valid forward addresses" and if I enter my user2@anotherdomain.com  address there, any mysql tables created for  user1@example.com get mirrored/copied to a second set of identical entries for  user2@anotherdomain.com

Or is there another way to do this with the plugin as it is now?

Thanks