On Tue, Aug 27, 2019 at 10:30:01PM +0100, Michal Krzysztofowicz wrote:
> Hi again Gilles,
> 
> > A possible fix to your issue would be to add ' to the allowed charset in
> > util.c, can you try and see if it is enough to solve your issue ?
> 
> If I read the code correctly, the ' is already allowed. valid_localpart() 
> inside util.c defines IS_ATEXT macro as below:
> 
>     #define IS_ATEXT(c) (isalnum((unsigned char)(c)) || 
> strchr(MAILADDR_ALLOWED, (c)))
> 
> then MAILADDR_ALLOWED is defined inside smtpd.h as:
> 
>     #define MAILADDR_ALLOWED        "!#$%&'*/?^`{|}~+-=_???
> 
> therefore it contains the ' character. 
> 
> Am I looking at the correct place? 
> 

can you try the following diff ?

Index: smtpd.h
===================================================================
RCS file: /cvs/src/usr.sbin/smtpd/smtpd.h,v
retrieving revision 1.636
diff -u -p -r1.636 smtpd.h
--- smtpd.h     11 Sep 2019 04:19:19 -0000      1.636
+++ smtpd.h     16 Sep 2019 18:03:05 -0000
@@ -69,8 +69,7 @@
  * potentially dangerous and need to be escaped.
  */
 #define        MAILADDR_ALLOWED        "!#$%&'*/?^`{|}~+-=_"
-#define        MAILADDR_ESCAPE         "!#$%&'*/?^`{|}~"
-
+#define        MAILADDR_ESCAPE         "!#$&*?^`{|}"
 
 #define F_STARTTLS             0x01
 #define F_SMTPS                        0x02


-- 
Gilles Chehade                                                 @poolpOrg

https://www.poolp.org            patreon: https://www.patreon.com/gilles

Reply via email to