Re: Using To-Header for envelope address
Charles Cazabon <[email protected]>
| Newsgroups | gmane.mail.getmail.user |
|---|---|
| Message-ID | <[email protected]> |
Robert Schönherr <[email protected]> wrote: > > I am new to getmail and struggling with an setup for multiple clients. > I selected the MultidropIMAPRetriever. Incoming mails are collected with > an catchall-address for the whole domain. > > The example suggests Delivered-To:1 as envelope_recipient. But in my > case this always contains the Catchall-Address, so I tried to use the > To: header. That's not going to work. If the first/topmost Delivered-to: header doesn't contain the envelope recipient address in your case, it could be the *second* Delivered-to:, or something else entirely. Examine the full message header for several different messages (from different sources) and it should be clear. You didn't include example headers so I have no specific advice for you on this point. If there is no header field that consistently records the envelope recipient address, then your catchall mailbox is *not* a proper multidrop/domain mailbox setup, and you can't use a Multidrop retriever with it, and therefore can't use MultiSorter as a destination (but see below). > Why is it not allowed to use the To: header? Seems a legit option to me. Sorry, you're incorrect there. As an example, I send a message to Alice and cc: or bcc: it to Bob. It will be delivered to Bob with an envelope recipient that is his address, but the To: header of the message will only contain Alice's address. To: headers can also contain groups or multiple addresses. If you want to sort messages to different destinations based on the informational headers like To:, cc:, then you can possibly use MultiGuesser instead of MultiSorter, but you will run into issues with cases like the above, where those header fields simply don't contain the information you want. > - is StartSSL supported? getmail doesn't care what SSL library is installed. If Python is compiled to use it, getmail will use it. If you built your Python yourself, you probably know which SSL library you used; if it was built by your distro, it probably has a working SSL config. > - can I use regex groups in locals? Something like ("(.*)@domain.com", [\1]) No. You can match against a regex, but where the mail that matches that regex goes is the name of a destination config elsewhere in the file, so it's a plain string. Charles -- ----------------------------------------------------------------------- Charles Cazabon GPL'ed software available at: http://pyropus.ca/software/ -----------------------------------------------------------------------