On 4/13/2016 10:26 PM, Michael Nguyen wrote:
> So, I'm having an issue with "Bad Sender Address Syntax" errors. The
> errors are from a variety of formatted email address including some
> strange ones like <em...@domain.com/wordpress>.  At first, I would
> shrug my shoulders to them but my customers started whining and they
> sort of had a good point.   You see, all of the emails in question
> have already been processed by their mail provider and their mail
> host accepted these emails.  The emails were only getting rejected
> when they got pulled into our system so it became an issue of "Why
> can't you handle these emails if I've already received them?"
> 
> Anyway, I looked at the old threads regarding this and I wanted to
> run this by you guys before trying it.  Basically, I want to accept
> any "MAIL FROM" envelope address.  The mail servers in question
> don't send bounces and are pure mail stores for our users so it
> actually doesn't matter if the envelope address is valid or not as
> it's never used.  Would the below be correct?
> 
> /etc/postfix/main.cf:
>     smtpd_command_filter = pcre:/etc/postfix/sender_filter
> 
> /etc/postfix/sender_filter:
> 
> /^(MAIL\s+FROM:\s.*)/       OK
> 
> What do you guys think?
> 
> 
> Michael

No, the result of the filter must be a valid SMTP command, not a
postfix action.

Have you tried setting main.cf "strict_rfc821_envelopes = no"?  that
might possibly avoid the problem.

Otherwise, you'll need to use smtpd_command_filter to chop off the
offending /wordpress part of the supplied address.  I'm not going to
embarrass myself by attempting an example regexp off the cuff before
coffee...



  -- Noel Jones

Reply via email to