The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Plussed addressing in Exim

Discussion in 'E-mail Discussions' started by newbery, Sep 23, 2007.

  1. newbery

    newbery Registered

    Joined:
    Nov 7, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I'm trying to get a "plussed addressing" scheme set up on cPanel/Exim.

    Adding...

    local_part_suffix_optional
    local_part_suffix = -* : +*

    to the "virtual_aliases" driver in /etc/exim.conf doesn't seem to do the trick.

    Any suggestions?
     
  2. newbery

    newbery Registered

    Joined:
    Nov 7, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Okay... I think I figured it out.

    Added these lines to the "virtual_aliases_nostar" driver instead and it seems to work.

    Now, does anyone have any suggestions on how to protect or recover this configuration after a cPanel update?
     
  3. norelidd

    norelidd Well-Known Member

    Joined:
    Jan 15, 2007
    Messages:
    173
    Likes Received:
    1
    Trophy Points:
    18
    Vote for this bug if you want subaddressing, or plusaddressing, to be supported. I've requested it before, but haven't gotten far.

    http://bugzilla.cpanel.net/show_bug.cgi?id=5292

    I'd love to see a frontend made so that users could choose to make folders for different subaddresses, or even have cpanel make the folders automatically for each new subaddress it finds. I remember seeing a few lines of exim.conf settings that would do this, but beats me how it would be configured for our/cpanel's needs.
     
  4. newbery

    newbery Registered

    Joined:
    Nov 7, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the link. I'll have to study this a bit before I weigh in with my vote but I think I agree.

    In any case, my usecase is slightly different than that described in the bugzilla report. Not trying to get user sub-addressing but rather the ability to allow plussed addressing in the domain email forwards. This allows for some fairly convenient throwaway addresses as an anti-spam strategy. To achieve this, I've replaced the old "virtual_aliases_nostar" driver with the following two drivers:

    virtual_aliases_suffix:
    driver = redirect
    allow_defer
    allow_fail
    local_part_suffix_optional
    local_part_suffix = -* : +*
    data = ${if exists{/etc/valiases/$domain}{${lookup{$local_part$local_part_suffix@$domain}lsearch{/etc/valiases/$domain}}}}
    file_transport = address_file
    group = mail
    pipe_transport = virtual_address_pipe
    retry_use_local_part
    domains = lsearch;/etc/localdomains

    virtual_aliases_nostar:
    driver = redirect
    allow_defer
    allow_fail
    local_part_suffix_optional
    local_part_suffix = -* : +*
    data = ${if exists{/etc/valiases/$domain}{${lookup{$local_part@$domain}lsearch{/etc/valiases/$domain}}}}
    file_transport = address_file
    group = mail
    pipe_transport = virtual_address_pipe
    retry_use_local_part
    domains = lsearch;/etc/localdomains
    #unseen

    So far this seems to work just fine. Now I just need to figure out how to retain this configuration after a cPanel update. Any suggestions are welcomed.
     
  5. RyanM

    RyanM Member

    Joined:
    Mar 3, 2005
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    I have tried what newbery has suggested, but am getting errors.

    I am running Exim 4.63 on WHM 10.8.0 cPanel 10.9.1-S14304 and RedHat Enterprise 3 i686 - WHM X v3.1.0. I have an alias file, mydomain.com, in /etc/valiases with the following line:
    bounces@mydomain.com: "|/usr/bin/php -q /home/user/bounce.php"

    When emailing from Gmail, for example, I get this error back in my Gmail account:
    Here is the lines from exim_maillog that are relavant...
    The really odd thing... I know that my script, /home/user/bounce.php, is running because I see output from it on the server.

    Thanks in advance for help from anyone,
    Ryan
     
Loading...

Share This Page