1

Topic: Single Quote (') in email address

Version: 0.9.9 MARIADB edition
Outlook connected via exchange activesync
I have searched the forums but cannot find a definitive answer. I know a single quote isnt recommend, but the recipient is part of a large organisation and not about to change their policy

I have users set up ok. They are trying to send an email to someone with a single quote in their email address. The single quote is removed from the email address before sending and then fails as a recipient
eg  Tina.O'Dare@domain.com
changes too tina.odare@domain.com
Previous to migration to this server, email address would not be an issue

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Single Quote (') in email address

Does this solution help:

- Update Postfix main.cf:

smtpd_command_filter = pcre:/etc/postfix/command_filter.pcre

- Add file /etc/postfix/command_filter.pcre with content below:

/^(RCPT\s+TO:\s*<)'([^[:space:]]+)'(>.*)/   $1$2$3

- Restart or reload Postfix service.
You may need to slightly tune the rule in command_filter.pcre to catch quote in different part of the email address. sad

Another solution: is it possible / acceptable to update the mail address in SQL database directly?

3

Re: Single Quote (') in email address

Thanks but that is already there and doesnt fix the issue



ZhangHuangbin wrote:

Does this solution help:

- Update Postfix main.cf:

smtpd_command_filter = pcre:/etc/postfix/command_filter.pcre

- Add file /etc/postfix/command_filter.pcre with content below:

/^(RCPT\s+TO:\s*<)'([^[:space:]]+)'(>.*)/   $1$2$3

- Restart or reload Postfix service.
You may need to slightly tune the rule in command_filter.pcre to catch quote in different part of the email address. sad

Another solution: is it possible / acceptable to update the mail address in SQL database directly?

4

Re: Single Quote (') in email address

logicomm wrote:

Thanks but that is already there and doesnt fix the issue

Yes, that's why i mentioned "You may need to slightly tune the rule in command_filter.pcre to catch quote in different part of the email address.".

I think APPENDING this rule to command_filter.pcre file should work, but i didn't test it yet, please do some testing before actually enable this rule.

/^(RCPT\s+TO:.*)'(.*)/ $1$2