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@xxxxxxxxxxx > $HOME/Mail/sent/. > > And it used to work fine. However, recently I have also > started forwarding my e-mail from the address: > user@xxxxxxxxxxx and what is happening is that the e-mail > envelope of every forwarded message now contains the > header: Resent-From.*user@xxxxxxxxxxx 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@xxxxxxxxxxx, 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@xxxxxxxxxxx * ^Resent-From:.*user@xxxxxxxxxxx $HOME/Mail/sent/. The procmailrc and procmailex manpages are worth reading over if you haven't done so in a while. :) -- Todd
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx