Re: Support of plus character in email address

2019-01-02 Thread mabi
‐‐‐ Original Message ‐‐‐
On Wednesday, January 2, 2019 5:03 PM, Edgar Pettijohn  
wrote:

> https://www.postgresql.org/docs/9.3/functions-matching.html
>
> You will likely need to use some of the regex functions to pull out the user 
> and domain from $1.

How did I not think about this workaround ;-) Thanks Edgard that works like a 
charm!

For others who might be trying to achieve the same here is the PgSQL query:

SELECT destination FROM vuser WHERE email = 
REGEXP_REPLACE($1,'(.*)\+[\w-]+@(.*)','\1@\2');

--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Support of plus character in email address

2019-01-02 Thread Edgar Pettijohn

On Jan 2, 2019 9:43 AM, mabi  wrote:
>
> ‐‐‐ Original Message ‐‐‐
> On Wednesday, January 2, 2019 3:16 PM, Edgar Pettijohn 
>  wrote:
>
> > I recently switched to dspam. It ties into smtpd very similarly to amavis 
> > Plus it doesn't appear to need the additional  table, and 
> > delimeters still work out of the box. Everything you need to know is 
> > included in the README plus the specific readme for postgres backend.
>
> I heard good things too about dspam, call me crazy maybe but for me Amavis in 
> combination with ClamAV and SpamAssassin has been doing a great job.
>
> > I'm pretty sure that's why I stopped using amavis originally. It is very 
> > easy cause problems.
>
> I just would like to precise here that it is not Amavis the source of the 
> "problem" in my specific case here but the fact that using an rcpt-to with a 
> recipients table in a match rule does not take in account e-mail addresses 
> containing a plus character. In my opinion it should allow e-mail adresses 
> with a plus or at least it should be a boolean parameter which one can turn 
> on/off in smtpd.conf.
>
> @Gilles maybe you have any comments about that?

https://www.postgresql.org/docs/9.3/functions-matching.html

You will likely need to use some of the regex functions to pull out the user 
and domain from 
$1.b��yǢ��m�+&j)[yƮ�쨹�޲��r��y�h�+kiv��N�r��zǧu���[h�+��칻�&ޢ���kiv��

Re: Support of plus character in email address

2019-01-02 Thread mabi
‐‐‐ Original Message ‐‐‐
On Wednesday, January 2, 2019 3:16 PM, Edgar Pettijohn  
wrote:

> I recently switched to dspam. It ties into smtpd very similarly to amavis 
> Plus it doesn't appear to need the additional  table, and 
> delimeters still work out of the box. Everything you need to know is included 
> in the README plus the specific readme for postgres backend.

I heard good things too about dspam, call me crazy maybe but for me Amavis in 
combination with ClamAV and SpamAssassin has been doing a great job.

> I'm pretty sure that's why I stopped using amavis originally. It is very easy 
> cause problems.

I just would like to precise here that it is not Amavis the source of the 
"problem" in my specific case here but the fact that using an rcpt-to with a 
recipients table in a match rule does not take in account e-mail addresses 
containing a plus character. In my opinion it should allow e-mail adresses with 
a plus or at least it should be a boolean parameter which one can turn on/off 
in smtpd.conf.

@Gilles maybe you have any comments about that?


--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Support of plus character in email address

2019-01-02 Thread Edgar Pettijohn

On Jan 2, 2019 7:41 AM, mabi  wrote:
>
> ‐‐‐ Original Message ‐‐‐
> On Wednesday, January 2, 2019 1:53 PM, Oscar Carlsson  
> wrote:
>
> > As far as I know sub-addressing is enabled by default. I haven't found
> > anything in my configuration that explicitly enables it, but it works
> > out of the box here.
>
> That's also what I thought by checking the smtpd.conf man page but I presume 
> my issue here is that I use a recipients table in order to check if an e-mail 
> address is valid or not before sending to Amavis and then Dovecot. The 
> relevant part of my smtpd.conf file looks like this:
>
> table recipients postgres:/etc/mail/postgresql.conf
> match from any for domain  rcpt-to  action "relay_amavis"
>
> So here I presume that the rcpt-to option of match does not support having a 
> "+" in the e-mail address.
>
> A workaround would be having to manually define the valid "+" recipients in 
> my recipients table but that really sound stupid and is not very useful...
>

I recently switched to dspam. It ties into smtpd very similarly to amavis. Plus 
it doesn't appear to need the additional  table, and delimeters 
still work out of the box. Everything you need to know is included in the 
README plus the specific readme for postgres backend. 

Might be worth a look. Plus it doesn't seem to be such a memory hog as the perl 
alternatives.

I'm pretty sure that's why I stopped using amavis originally. It is very easy 
cause problems.

Edgar

b��yǢ��m�+&j)[yƮ�쨹�޲��r��y�h�+kiv��N�r��zǧu���[h�+��칻�&ޢ���kiv��

Re: Support of plus character in email address

2019-01-02 Thread mabi
‐‐‐ Original Message ‐‐‐
On Wednesday, January 2, 2019 1:53 PM, Oscar Carlsson  wrote:

> As far as I know sub-addressing is enabled by default. I haven't found
> anything in my configuration that explicitly enables it, but it works
> out of the box here.

That's also what I thought by checking the smtpd.conf man page but I presume my 
issue here is that I use a recipients table in order to check if an e-mail 
address is valid or not before sending to Amavis and then Dovecot. The relevant 
part of my smtpd.conf file looks like this:

table recipients postgres:/etc/mail/postgresql.conf
match from any for domain  rcpt-to  action "relay_amavis"

So here I presume that the rcpt-to option of match does not support having a 
"+" in the e-mail address.

A workaround would be having to manually define the valid "+" recipients in my 
recipients table but that really sound stupid and is not very useful...

--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Support of plus character in email address

2019-01-02 Thread mabi
Hello,

Does OpenSMTPD support the usage of a plus "+" in the e-mail address?

For example I would like to use me+fol...@domain.org in order to instruct my 
dovecot backend IMAP server to deliver the mail into a specific folder.

I had a quick try at it but my OpenSMTPD MX server spits out "550 Invalid 
recipient".

Cheers,
Mabi



--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org