Geert Hendrickx: > On Thu, Oct 22, 2009 at 09:36:06AM -0400, Wietse Venema wrote: > > I'll implement the "regexp to edit command" code anyway. It's > > cheaper than sending someone to a customer next time. > > > Would this eg. also allow to substitute domains (s/@olddomain$/@newdomain$/) > in RCPT TO, which is a FAQ?
It's a lookup table: the SMTP command is the key, and whatever the map returns is the command that Postfix will attempt to execute. I see this mainly as a syntax compatibility feature. Do keep in mind that mail address syntax is recursive, so only simple substitutions can be handled reliably with regular expressions. Also, the RCPT TO command shows the address in raw form, so the same address may appear in different but equivalent forms: RCPT TO:<u...@example.com> RCPT TO:<"user"@"example"."com"> RCPT TO:<\u\s\...@\e\x\a\m\p\l\e\.\c\o\m> The RCPT TO command converts these into the same u...@example.com form. This simplies the maintenance of access maps and address rewriting maps, but you don't have that luxury when looking at the raw command input. Many more equivalent command inputs exist if you don't have "strict_rfc821_envelopes = yes" in main.cf. Wietse > Geert > > > > > > 2) Changes to Postfix source code so that it accepts bad command > > > > syntax. I would be willing to consider a change that runs every > > > > inbound SMTP command through a regexp table so that you can specify > > > > a PCRE expression like this: > > > > > > > > /^HELO\s*$/ HELO helo.invalid > > > > > > > > The replacement HELO command still contains useful information. > > > > > > > > This mapping would also solve problems that some people have with > > > > clients that send incorrect MAIL FROM or RCPT TO addresses syntax. > > > > > > > > Similar mappings may solve problems with REMOTE SMTP server responses, > > > > or with SMTP client or server outputs by Postfix itself. > > > > > > > > Wietse > > > > > > > > > -- > Geert Hendrickx -=- g...@telenet.be -=- PGP: 0xC4BB9E9F > This e-mail was composed using 100% recycled spam messages! > >