On Thursday 18 November 2010 10:15:19 Ralf Hildebrandt wrote:
> * J. Roeleveld <jo...@antarean.org>:
> > Hi All,
> > 
> > I've been having issues where emails are being rejected by Cyrus because
> > the "From" address contains an underscore in the domain name.
> 
> Envelope or header?

My guess is header:
**
Unexpected response from data.antarean.org[/var/imap/socket/lmtp].

Transcript of session follows.

 In:  220 data Cyrus LMTP v2.3.14 server ready
 Out: LHLO data.antarean.org
 In:  250-data
 In:  250-8BITMIME
 In:  250-ENHANCEDSTATUSCODES
 In:  250-PIPELINING
 In:  250-SIZE
 In:  250-STARTTLS
 In:  250-AUTH EXTERNAL
 In:  250 IGNOREQUOTA
 Out: MAIL FROM:<u...@lists_example.org> SIZE=7510 BODY=7BIT
 Out: RCPT TO:<jo...@antarean.org>
 Out: DATA
 In:  501 5.5.4 Syntax error in parameters
 In:  503 5.5.1 Need MAIL command
 In:  503 5.5.1 No recipients
 Out: RSET
 Out: QUIT
 In:  250 2.0.0 ok
 In:  221 2.0.0 bye
**

> 
> > Example address: u...@lists_example.org
> > 
> > What I am looking for is a way to parse email addresses and replace all
> > underscores to dashes, eg. the following:
> > 
> > u...@lists_example.org -> u...@lists-example.org
> 
> sender_canonical_maps regexp:/etc/postfix/cyrus_sucks
> 
> with /etc/postfix/cyrus_sucks containing something like:
> 
> /^(.*)_(.*)$/  $1-$2

Thanks, I'll give this a try

--
Joost

Reply via email to