Re: [Exim] Dealing with retarded mail software

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Philip Hazel
Ημερομηνία:  
Προς: Clint Sim
Υ/ο: exim-users
Αντικείμενο: Re: [Exim] Dealing with retarded mail software
On Fri, 8 Aug 2003, Clint Sim wrote:

> When Prism does it's billing run and tries to send to that
> malformed address, Exim (quite correctly) returns a "501 domain
> missing or malformed", at which point Prism's billing run just stops
> and sits there looking dumb (not quite so clever!). Using SMTP rewrite
> rules and strip_trailing_dot I have gotten around some of the bad
> addresses but it's not possible to consider every possible way that
> the staff may enter email addresses incorrectly. What I would like to
> be able to do is to accept a malformed address and it's mail and then
> bounce it after that as an undeliverable/unrouteable address, instead
> of at RCPT time.


Exim won't accept syntactically malformed addresses at RCPT time. Why
not? Well, if they are syntactically malformed, it cannot parse them
into local part and domain, and so it can't make any kind of attempt at
delivery or any other kind of handling.

You have already found the existing features that enable certain forms
of malformed addresses to be be recognised and transformed into valid
addresses. I'm afraid that's all that is possible. If you could write a
regex to recognize valid formats, that could be used. However, this
could be a difficult task, even with the fancy features available in the
current regex engine.

Is there any way you can get the addresses validated, at least for
syntax, in advance? For example, when they are entered, pass them
through some script that runs "exim -bt" on them, and analyses the
response?



--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book