Virtual Users and Domains With Postfix...forwarded messages and spam filtering

Discussion in 'HOWTO-Related Questions' started by mjd_tech, Dec 28, 2006.

  1. mjd_tech

    mjd_tech New Member

    Hi,

    I've set up a Debian Sarge server using the famous how-to. It works correctly.

    I have some users that want their mail forwarded to another address, like comcast or aol or verizon.
    So, I would just put the needed info into the MySQL forward table.

    For example:
    joeshmoe@domain_I_am_hosting gets forwarded to [email protected]

    Question:
    When mail is sent to joeshmoe@domain_I_am_hosting
    will it be processed by spamassassin? Or will it be immediately forwarded?

    My guess is it will be immediately forwarded.
    The spam gets forwarded as well and comcast will blacklist my server because it looks like my server is sending spam.

    If this is the case, it looks like I may need to do the Mailfilter how-to:
    http://www.howtoforge.com/postfix_mailfilter

    But I'm not sure how to force forwarded emails to be processed by spamassassin.
    I'm totally unfamiliar with MailDrop.

    I currently run an Ensim server with about 50 domains and 400 users and I really want to get away from Ensim. I want to have email and web hosting on separate servers. I got blacklisted twice this month by comcast, because many users forward their email to their comcast accounts. I was able to work around this by modifying .procmailrc files, to force spamassassin to process the emails before being forwarded.

    Thanks,
    Mike Donovan
     
  2. falko

    falko Super Moderator Howtoforge Staff

    To be honest, I'm not sure right now... :eek:
    You can run
    Code:
    tail -f /var/log/mail.log
    and then send an email to an account on the server that forwards the mail to another email address. From the action in the mail log you can see if the mail is scanned for spam.
     
  3. mjd_tech

    mjd_tech New Member

    OK I tested it today.

    Summary:
    • Forwarded email IS processed by amavis/spamassassin.
    • Ham is forwarded unchanged.
    • Spam is forwarded with ***SPAM*** added to subject line.
    I'd like:
    • Ham forwarded
    • Spam to /dev/null
    • Option to put spam in user's spam folder.
    It looks like I need to use Maildrop.
    http://www.howtoforge.com/postfix_mailfilter
    There's an example of a Maildrop filter near the end.
    I think I can tweak this filter to suit my needs.
    Anyone disagree?

    Now I just need scripts to easily setup + remove users...

    -Mike
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

  5. mjd_tech

    mjd_tech New Member

    Till,
    Thanks,
    I think amavisd.conf operates globally.
    I need to do this only for a few users.

    For other reasons, I think I need MailDrop.

    1. Spam settings on a per user basis. Some users do better with a spamassassin score of 3.0 versus the default 5.0.

    2. Some users want spam to go to /dev/null and not clutter their inbox.

    3. But others want it the way it works by default:
    * Deliver everything to the inbox
    * Mark spam with ***SPAM***
    * Spamassassin at default 5.0

    4. Users can manage their own spam settings, with SquirrelMail plugins.

    So I think I need to go with maildrop unless there is a way to configure the postfix virtual delivery transport to do this.

    -Mike
     
  6. falko

    falko Super Moderator Howtoforge Staff

Share This Page