Extended email addressing

Discussion in 'Tips/Tricks/Mods' started by kephra, Oct 18, 2011.

  1. kephra

    kephra Member

    I like to use extended email addresses, or aliases I can make up on the fly. I mean addresses like [email protected]

    When someone wants my email address, I make up one which represents the company that asked for it. That way if I get spammed, I can filter that out, and I know who did it. For example, if I subscribe to the ABC newsletter, I can give them my email address as [email protected] and the newsletters will be delivered to [email protected]

    I tried to modify the postfix and courier config files, but this did not work. But I found its incredibly easy to add an Email --> Global Filters --> Content Filter to do the job through ISPC3.

    Example:

    Set Pattern to: /^.*USER[+-].*@YOURDOMAIN.COM.*$/
    and Action to REDIRECT
    and Data to [email protected]

    This will accept either + or - as the delimiter.

    I hope this is useful for someone.
     
    Last edited: Oct 18, 2011
  2. Mark_NL

    Mark_NL Member

    I used to create a new alias for it, but this is much easier! thanks for sharing!

    edit: i'm having trouble setting this up ..

    I did the following:
    E-Mail -> Global Filters -> Content Filter -> Add New..

    Filter: Header filter
    Regexp Pattern: /^.*signup\-.*@my\-domain\.tld.*$/
    Data: [email protected]
    Action: REDIRECT


    Code:
    <[email protected]>: host mail.my-domain.tld[1.2.3.4] said: 550 5.1.1
        <[email protected]>: Recipient address rejected: User unknown in
        virtual mailbox table (in reply to RCPT TO command)
     
    Last edited: Oct 18, 2011
  3. kephra

    kephra Member

    Mark,

    I think the pattern should be /^.*signup-.*@my-domain\.tld.*$/ or /^.*signup-.*@my-domain.tld.*$/

     
    Last edited: Oct 18, 2011
  4. Mark_NL

    Mark_NL Member

    I've been debugging the postfix (smtpd) process and I noticed I never see it do the header checks

    There was no point in the complete debug trace where I could find it does a header_check with the header check file being used.

    Only saw mysql:/*.cf files being accessed, rbl checks etc etc.

    I even added "-v" to all processes in master.cf to see what happens, still no results.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    - Do you use ISPConfig 3.0.3.3?
    - Does postfix main.cf has this line:

    header_checks = regexp:/etc/postfix/header_checks

    - Does the file /etc/postfix/header_checks contains the header filter that you created in ispconfig?
     
  6. Mark_NL

    Mark_NL Member

    Ofcourse I run the latest version of ispconfig ;-)
    yes that line is in main.cf

    The header_checks file contains the filter that i added in the ispconfig web GUI.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

  8. Mark_NL

    Mark_NL Member

    I've tried adding "-v" to all processes in master.cf without results.
    I'll give the extensive debugging a try.

    edit:
    cleanup(8) also does the virtual_maps through virtual(5) .. i do see the virtual map lookups in the debug info, but no header checks :(
     
    Last edited: Oct 19, 2011
  9. kephra

    kephra Member

    Mark,

    On my Centos 6, ISPC3 system, postfix writes header check errors to the /var/log/maillog file.

    Example from my maillog:
    Oct 18 23:55:30 fire postfix/cleanup[9982]: warning: regexp map /etc/postfix/header_checks, line 8: ignoring unrecognized request

    This error caused by

    Pattern: OverstockAuction
    Action: DISCARD
     

Share This Page