I have decided the same thing since Mail From maybe different from From:
in mail data section. Also when it comes to struggling with mailing list
that's another story..
At least I have gained a deeper understanding of SMTP protocol ;)
Sam Varshavchik wrote:
Omer Faruk Sen writes:
Hi,
I wonder how can I get exact email addresses from From: and To: header
I have used /^To:\s+(.*)@domain.com/ and /^From:\s+(.*)@domain.com/)
but I am sure there are better regex for getting From and To.
What I want to do is to use always_bcc feature of Posix. After
sending all email to a spesific user I will filter those emails
according to From and To lines which contains domain.com than create
./Maildir/.from.${USER} or ./Maildir/.to.${USER} and deliver email to
that folder.
Has anyone done that before?
It's been tried before by people who really don't understand how
E-mail works, with predictably miserable results.
If you would like, I can arrange to send you an E-mail whose "To:"
header reads "<pres...@whitehouse.gov>", and nothing else.
The contents of the To: or the From: header has absolutely nothing to
do with the identify of the message's sender, or its intended recipients.
Any attempt to reverse-engineer the identities of the sender or the
recipients, from the From: or the To: header, will not work.
Forget it.
Whatever you're really trying to do, find some other way to do it.