Postfix : BUG FIX : warning: Illegal address syntax ( Fix malformed emails )

Basically the sending email client is outlook and the existing contact email address in the address book contains an apostrophe this can cause the emails address to become invalid.

Assumptions

postfix 2.7 or later

Description:

Fix malformed emails that are surrounded in single quotes.

BUG:

FIX:

Run the following to create the /etc/postfix/command_filter.regex file

Add the following to your /etc/postfix/main.cf

Reload your postfix

 

2 replies
  1. Gonzalo
    Gonzalo says:

    Hi, good post, thanks a lot

    If you want to remove just single quotes, on an error like this one:

    warning: Illegal address syntax from xxx in RCPT command: <‘xxx@xxx.com’>

    what is the right regex?

    Thanks again

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *