#42 Two Delivered-To headers for catchall messages

pop/imap (4)
Tom Collins

This is something I wanted to add during the previous vdelivermail rewrite, but didn't get around to.

On catchall messages, insert two Delivered-To headers. One for the envelope recipient, and one for the catchall mailbox.

For example:

Delivered-To: catchall@domain.com
Delivered-To: johndoe@domain.com


  • Matt Brookings

    Matt Brookings - 2009-08-14
    • priority: 7 --> 1
    • assigned_to: tomcollins --> volz0r
  • Matt Brookings

    Matt Brookings - 2009-08-14

    Isn't multiple Delivered-To headers breaking the idea of what Delivered-To means? Delivered-To generally
    means final delivery, doesn't it?

  • Tom Collins

    Tom Collins - 2009-08-15

    I'm not sure about that... I found this from the Postfix manual, and it seems to imply that there could be multiple Delivered-To headers, and that they might be used for loop detection.

    For the sake of reliability, forwarded mail is re-submit-
    ted as a new message, so that each recipient has a sepa-
    rate on-file delivery status record.

    In order to stop mail forwarding loops early, the software
    adds an optional Delivered-To: header with the final enve-
    lope recipient address. If mail arrives for a recipient
    that is already listed in a Delivered-To: header, the mes-
    sage is bounced.

  • Matt Brookings

    Matt Brookings - 2009-08-17

    Yeah, makes sense, but I've seen some server-side mail handlers that have issues handling zero, or multiple Delivered-To headers. I guess that's their problem though.

  • Matt Brookings

    Matt Brookings - 2009-08-17

    Actually, I don't think it should say catchall@. It should use the envelope address probably. If there's indeed a
    catchall, then the original address should be treated as if it exists. Thoughts?

  • Tom Collins

    Tom Collins - 2009-08-18

    Say you have sales@example.com forward to john@example.com. I'd like to see the Delivered-To headers act like Received headers. Maybe john@example.com forwards to jdoe@example.net. In that case:

    Delivered-To: jdoe@example.net
    Received: [standard Received header here]
    Received: [another Received header]
    Delivered-To: john@example.com
    Delivered-To: sales@example.com
    Received: [received headers from sender to example.com]

    One benefit of this setup, is that vdelivermail could look at all headers before inserting the Delivered-To. If there's already a Delivered-To that matches the one it is about to insert, the mail is looping.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks