Hi,
Ranjan Maitra wrote:
This is an OT question, but one that I am sure someone
here will likely know the answer to, given how much help I
have received here on such questions in the past.
I don't think it's off-topic, as procmail is included in
Fedora and used by plenty of folks here. Granted, there are
probably forums with more procmail users and experts than
this one.
So, I store e-mails sent by me to others using the "From"
field to a folder called "/sent"
So, I use in my .procmailrc:
:0:
*^From.*user(a)outlook.com
$HOME/Mail/sent/.
And it used to work fine. However, recently I have also
started forwarding my e-mail from the address:
user(a)outlook.com and what is happening is that the e-mail
envelope of every forwarded message now contains the
header: Resent-From.*user(a)outlook.com so all forwarded
e-mail is being saved to the sent folder.
Is it possible to have a double condition? That is
something that says that if both Resent-From and From have
*user(a)outlook.com, then it should go to the sent-folder.
In other words, is it possible to use a AND or OR or
Negation condition.
Conditions are AND'ed by default, so if you want to only
match messages which have both From and Resent-From headers,
you can add another condition to your recipe:
:0:
* ^From.*user(a)outlook.com
* ^Resent-From:.*user@outlook.com
$HOME/Mail/sent/.
The procmailrc and procmailex manpages are worth reading
over if you haven't done so in a while. :)
--
Todd