VERP (Vari­able En­ve­lope Re­turn-Path)

OpenSource For You - - HOW TO ADMIN -

In the above ex­am­ple, you will have no­ticed that the de­liv­ery fail­ure mes­sage was sent back to the ad­dress of the Re­turn-Path header in the orig­i­nal email. If there is a key to han­dle the bounced emails, it comes from the Re­turn-Path header.

The idea of VERP is to safely en­code the re­cip­i­ent de­tails, too, some­how in the re­turn-path so that we can parse the re­ceived bounce ef­fec­tively and ex­tract the fail­ing re­cip­i­ent from it. We specif­i­cally use the Re­turn-Path header, as that’s the only header that is not go­ing to get tam­pered with by the in­ter­ven­tion of a num­ber of MTAs.

Typ­i­cally, an email from Alice to Bob in the above ex­am­ple will have head­ers like the fol­low­ing: From: [email protected]­am­ To: [email protected]­ Re­turn-Path: [email protected]­am­

Now, we cre­ate a cus­tom re­turn path header by en­cod­ing the ‘To’ ad­dress as a com­bi­na­tion of pre­fix-de­lim-hash. The hash can be gen­er­ated by the PHP hmac func­tions, so that the new email head­ers be­come some­thing like what fol­lows: From: [email protected]­am­ To: [email protected]­ Re­turn-Path: bounce-bob.some­{en­code ( [email protected]­wher. com ) }@ex­am­

Now, the bounces will get di­rected to our new re­turn-path and can be han­dled to ex­tract the fail­ing re­cip­i­ent.

Newspapers in English

Newspapers from India

© PressReader. All rights reserved.