« Mail delivery change | Main | AFS Fiber Channel Network Test Plan »

Mail Delivery Change, revisited

While examining the impact of the mail delivery changes made yesterday, it became clear that we could do less. Meaning, as the determination of an account's status was being made by the MDA at the time of delivery, the a bounce message had to be generated, and sent, by our mail servers to the user. This determination would better be done at the MTA level, where the user's account state could be determined at address resolution time, and returned as an error state to the sending MTA during the SMTP transaction, leaving it with the job to notify the sending user...

This took me further into how sendmail handles it's address resolution. With some research, I came up with a rule that would be triggered on local addresses, and set the appropriate error state:

Kuserstate nis passwd.byname
SLocal_localaddr
R$- $: $( userstate $1 $) look up NIS info
R$-:*INACTIVE*:$+ $#error $@ 5.2.1 $: "550 User Account Inactive"
R$-:*DEACTIVATED*:$+ $#error $@ 5.2.1 $: "550 User Account Deactivated"
R$-:*DELETED*:$+ $#error $@ 5.2.1 $: "550 User Account Deleted"
R$-$+ $1

Unfortunatly, due to the way our mail delivery resultion is configured here (for historical reasons), all email address resolutions first start with a (sucessful) alias lookup. While currently unnecessary, it was, as the @umbc.edu mail exchangeers were not able to handle local delivery, and they just routed to the places that could. Sendmail, during the SMTP transation, does not fully expand aliases -- it sees if an address *may* trigger an alias expansion, and then if it does, it accepts the message and will deal with expanding the alias after the transaction is over. So, even though robtest2@umbc.edu is a local address, it's not triggering this rule because it is actually an alias for robtest2@afs.umbc.edu. When it does get to triggering this rule (after the message is accepted), the MTA gets to generate a bounce message -- we're stuck back where we were before.

As mentioned before, the alias-lookups-for-everybody thing was for historical reasons, and not necessary anymore. After updating some applications on WebAdmin and the account creation system (done today), we can now remove all maildrop attributes from accounts that are actually "local" addresses, causing this rule to be triggered correctly, and dealing with rejecting these addresses at the SMTP transaction level ! Yay. This will probably be done tomorrow...

Ok, it's tomorrow, and it's been done...

Post a comment

About

This page contains a single entry from the blog posted on April 13, 2005 5:12 PM.

The previous post in this blog was Mail delivery change.

The next post in this blog is AFS Fiber Channel Network Test Plan.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.34