0

Using Procmail, I would like to add a rule that dictates:

If any email comes from this specific email address, in addition to delivering it locally, also forward it to this other email address.

My attempt at this rule is as follows:

:0 c: * ^From:[email protected] ! [email protected] 

... but this does not appear to work. In fact, it appears to not do anything.

0

1 Answer 1

3

You really should provide debugging details with an example of the message you are testing with; but we can speculate:

  • Maybe the regex doesn't match. Perhaps you actually mean

    :0c * ^From:(.*\<)?sender@example\.com ! [email protected] 

    Notice also the absence of a second colon after the c flag (you cannot meaningfully use a lock file here, nor should you) and the addition of a backslash before the .com to only match a literal dot, not any character.

  • Maybe you are not calling Procmail at all.

    Can you demonstrate that Procmail actually gets run when you receive mail? Perhaps see also https://www.iki.fi/era/mail/procmail-debug.html

2
  • Thank you very much. I used your exact syntax and formatting and now it is working properly. Yes, mailserver and procmail were already working - I was already doing other procmail rules, etc. - just couldn't get this very simple one worded just right. Thank you again. Commented Oct 6, 2021 at 16:54
  • The link also has some useful tips for how to test things. Thanks for the accept! Commented Oct 6, 2021 at 17:15

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.