Re: [exim] Email alias with plus addressing

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Ryan Marks
Ημερομηνία:  
Προς: Rich Sage
Υ/ο: exim-users
Αντικείμενο: Re: [exim] Email alias with plus addressing


Rich Sage wrote:
>> Ryan Marks wrote:
>>
>>> Hello,
>>>
>>> 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 would like to begin using email addresses that have a local part
>>> suffix, reply+372943@??? for example. Within
>>> /etc/valiases/mydomain.com, the following lines is present
>>>
>> along with
>>
>>> others aliases:
>>>
>>> reply@???: "|/home/user/reply.php"
>>> *: :fail: No Such User Here
>>>
>>> The php script is setup to be executable and executes
>>>
>> correctly when
>>
>>> an email is sent to reply@???. I do not plan on having a
>>> reply mailbox defined on mydomain.com, but can do so if it's
>>> necessary. Can someone please assist me so email can be
>>>
>> received at reply+*@????
>>
>> I am not sure I understand what you really want, but you can have a 
>> setup like this:
>> in your routers:
>> reply_router:
>>         driver          = accept
>>         require_files   = /home/user/reply.php
>>         local_part_suffix_optional
>>         local_part_prefix = reply+
>>         transport       = replypipe

>>
>> in your transports:
>> replypipe:
>>         driver          = pipe
>>         command         = /home/user/reply.php
>>         return_path_add = false
>>         return_fail_output = true
>>         log_output      = true
>>         home_directory  = "/tmp"
>>         current_directory = "/tmp"

>>
>> This will execute reply.php piped with the contents of the mail every
>> time
>> reply+***** is seen.
>>
>
>
> We use a similar setup here, using prefix.1234@???, which is parsed
> using Exim's filtering feature (assuming you have filtering enabled and
> don't have access to the Exim configuration file). In our
> /etc/vfilters/mydomain.com file, I have:
>
> if
> $original_local_part matches "^prefix\\\.[0-9]+\\$"
> then
> pipe "php -q /home/user/script.php"
> endif
>
> with the script running a regular expression match to extract the number
> from the destination address.
>
> We're running WHM/cPanel here on FC3 with this working fine.
>
> -Rich

I do have access to the Exim configuration file, but fear that
WHM/cPanel updates will override any changes I make to routers and
transports. How can I tell if filters are enabled on my server? When I
email to the address, I see this come through the exim_mainlog:

2007-10-24 11:06:27 H=(fk-out-0910.google.com) [209.85.128.184]
F=<me@???> rejected RCPT <reply.1234@???>: No Such User Here

Ryan