Hi,
I've looked at Postfix Address Rewriting doc, but am struggling to see
the best way to do this. We have virtual mail recipients via mysql. Some
of these use + addressing, however not everywhere will accept an email
address with a + in.
So, what I'd like to do if it's possible, is rewrite
On 17-Mar-2009, at 04:24, Robert Brooks wrote:
So, what I'd like to do if it's possible, is rewrite f...@bar.example.com
to bar+...@example.com.
I rewrite foo_...@example.com to foo+...@example.com
virtaul.pcre:
/^(.*)_(.*)@example.com$/${1}+$...@example.com
virtual_alias_maps =
hash
LuKreme wrote:
I rewrite foo_...@example.com to foo+...@example.com
virtaul.pcre:
/^(.*)_(.*)@example.com$/${1}+$...@example.com
virtual_alias_maps =
hash:$config_directory/virtual
pcre:$config_directory/virtual.pcre,
mysql:$config_directory/mysql_virtual_alias_maps.cf
your lin
On 3/17/2009 6:47 AM, LuKreme wrote:
> I rewrite foo_...@example.com to foo+...@example.com
>
> virtaul.pcre:
> /^(.*)_(.*)@example.com$/${1}+$...@example.com
>
> virtual_alias_maps =
> hash:$config_directory/virtual
> pcre:$config_directory/virtual.pcre,
> mysql:$config_directory
On Tue, Mar 17, 2009 at 12:01:13PM CET, Charles Marcus
said:
> On 3/17/2009 6:47 AM, LuKreme wrote:
> > I rewrite foo_...@example.com to foo+...@example.com
> >
> > virtaul.pcre:
> > /^(.*)_(.*)@example.com$/${1}+$...@example.com
> >
> > virtual_alias_maps =
> > hash:$config_directory/v
On 17-Mar-2009, at 05:01, Charles Marcus wrote:
(not sure if using the 'or' vertical bar will work as expected here)
It's a PCRE. As long as the PCRE is valid it should work.
--
RTFM replies are great, but please specify exactly which FM to R
On 17-Mar-2009, at 06:09, Erwan David wrote:
I would fear it breaks recipient validation, accepting mail for eavery
address with a _ as valid.
That is a drawback. The other choice is to change the delimiter in
postfix to _ and rewrite it to accept all '+' addresses to '_'. The
trouble is
On 3/17/2009, LuKreme (krem...@kreme.com) wrote:
> On 17-Mar-2009, at 06:09, Erwan David wrote:
> > I would fear it breaks recipient validation, accepting mail for eavery
> > address with a _ as valid.
> That is a drawback.
Oh... well, if it does indeed do what Erwan said, it isn't just a
drawbac
On 17-Mar-2009, at 07:30, Charles Marcus wrote:
So, is there no way to rewrite the recipient and *then* validate it?
Sure, but not until after you've accepted the message.
It's not like ziggy_test gets delivered to some random user. It's
just that it generates a bounce instead of a reject.
On 3/17/2009, LuKreme (krem...@kreme.com) wrote:
> On 17-Mar-2009, at 07:30, Charles Marcus wrote:
>> So, is there no way to rewrite the recipient and *then* validate it?
> Sure, but not until after you've accepted the message.
Ummm... WRONG. Recipient VALIDATION, by DEFINITION, must occur BEFORE
On 17-Mar-2009, at 07:39, Charles Marcus wrote:
On 3/17/2009, LuKreme (krem...@kreme.com) wrote:
It's not like ziggy_test gets delivered to some random user. It's
just that it generates a bounce instead of a reject.
Like I said, this is unacceptable (makes you a backscatter source).
Then yo
On Tue, Mar 17, 2009 at 02:39:08PM CET, Charles Marcus
said:
> On 3/17/2009, LuKreme (krem...@kreme.com) wrote:
> > On 17-Mar-2009, at 07:30, Charles Marcus wrote:
> >> So, is there no way to rewrite the recipient and *then* validate it?
>
> > Sure, but not until after you've accepted the messag
On 3/17/2009 9:43 AM, Erwan David wrote:
> You may generate the pcre file with a line
> /recipient_([...@_]+)@localdomain/recipient+$...@localdomain
>
> for each valid recipient. This would preserve the validation of
> recipient at RCPT TO stage.
Interesting... and maybe a good candidate for
On 17-Mar-2009, at 08:01, Charles Marcus wrote:
On 3/17/2009 9:43 AM, Erwan David wrote:
You may generate the pcre file with a line
/recipient_([...@_]+)@localdomain/recipient+$...@localdomain
for each valid recipient. This would preserve the validation of
recipient at RCPT TO stage.
Inte
On Tue, Mar 17, 2009 at 10:01:53AM -0400, Charles Marcus wrote:
> On 3/17/2009 9:43 AM, Erwan David wrote:
> > You may generate the pcre file with a line
> > /recipient_([...@_]+)@localdomain/recipient+$...@localdomain
> >
> > for each valid recipient. This would preserve the validation of
>
On Tue, Mar 17, 2009 at 03:52:27PM CET, Victor Duchovni
said:
> On Tue, Mar 17, 2009 at 10:01:53AM -0400, Charles Marcus wrote:
>
> > On 3/17/2009 9:43 AM, Erwan David wrote:
> > > You may generate the pcre file with a line
> > > /recipient_([...@_]+)@localdomain/recipient+$...@localdomain
>
On 17-Mar-2009, at 08:52, Victor Duchovni wrote:
On Tue, Mar 17, 2009 at 10:01:53AM -0400, Charles Marcus wrote:
On 3/17/2009 9:43 AM, Erwan David wrote:
You may generate the pcre file with a line
/recipient_([...@_]+)@localdomain/recipient+$...@localdomain
for each valid recipient. This w
On 19-Mar-2009, at 04:14, Charles Marcus wrote:
On 3/19/2009 5:55 AM, LuKreme wrote:
I came up with this one liner:
$ ls -1 /usr/local/virtual/ | grep "@" | sed
's/^\([...@]*\)@\(.*\)$/\/^\1_\(.*\)@\2$\/ \1+$...@\2/'
testu...@example.com => /^testuser_(.*)@example.com$/
testuser+$...@example.c
LuKreme:
> On 17-Mar-2009, at 08:52, Victor Duchovni wrote:
> > On Tue, Mar 17, 2009 at 10:01:53AM -0400, Charles Marcus wrote:
> >> On 3/17/2009 9:43 AM, Erwan David wrote:
> >>> You may generate the pcre file with a line
> >>> /recipient_([...@_]+)@localdomain/recipient+$...@localdomain
> >>>
On 3/19/2009 5:55 AM, LuKreme wrote:
You may generate the pcre file with a line
/recipient_([...@_]+)@localdomain/recipient+$...@localdomain
for each valid recipient. This would preserve the validation of
recipient at RCPT TO stage.
>>> Interesting... and maybe a good
On 19-Mar-2009, at 04:45, Wietse Venema wrote:
$ ls -1 /usr/local/virtual/ | grep "@" | sed 's/^\([...@]*\)@\(.*\)$/
\/
^\1_\(.*\)@\2$\/ \1+$...@\2/'
testu...@example.com => /^testuser_(.*)@example.com$/ testuser+$...@example.com
This is BROKEN. You are not escaping any of the regexp metacha
LuKreme:
> On 19-Mar-2009, at 04:45, Wietse Venema wrote:
> >> $ ls -1 /usr/local/virtual/ | grep "@" | sed 's/^\([...@]*\)@\(.*\)$/
> >> \/
> >> ^\1_\(.*\)@\2$\/ \1+$...@\2/'
> >>
> >> testu...@example.com => /^testuser_(.*)@example.com$/
> >> testuser+$...@example.com
> >
> > This is BROKEN. Y
Charles Marcus a écrit :
> On 3/17/2009, LuKreme (krem...@kreme.com) wrote:
>> On 17-Mar-2009, at 06:09, Erwan David wrote:
>>> I would fear it breaks recipient validation, accepting mail for eavery
>>> address with a _ as valid.
>
>> That is a drawback.
>
> Oh... well, if it does indeed do what
On Sat, Mar 21, 2009 at 03:19:44PM +0100, mouss wrote:
> Charles Marcus a ?crit :
> > On 3/17/2009, LuKreme (krem...@kreme.com) wrote:
> >> On 17-Mar-2009, at 06:09, Erwan David wrote:
> >>> I would fear it breaks recipient validation, accepting mail for eavery
> >>> address with a _ as valid.
> >
Victor Duchovni a écrit :
> On Sat, Mar 21, 2009 at 03:19:44PM +0100, mouss wrote:
>
>> Charles Marcus a ?crit :
>>> On 3/17/2009, LuKreme (krem...@kreme.com) wrote:
On 17-Mar-2009, at 06:09, Erwan David wrote:
> I would fear it breaks recipient validation, accepting mail for eavery
>
On Sat, Mar 21, 2009 at 07:31:24PM +0100, mouss wrote:
> >> alternatively, you can add an smtpd in the chain using proxy_filter:
> >>
> >> - smtpd on port 25 does the rewrite. it then uses proxy_filter to pass
> >> mail to an smtpd on port 10020.
> >
> > Rewriting is done by cleanup(8). This can'
Victor Duchovni a écrit :
> On Sat, Mar 21, 2009 at 07:31:24PM +0100, mouss wrote:
>
alternatively, you can add an smtpd in the chain using proxy_filter:
- smtpd on port 25 does the rewrite. it then uses proxy_filter to pass
mail to an smtpd on port 10020.
>>> Rewriting is done
27 matches
Mail list logo