procmail: Skipped "{" and procmail: Closing brace unexpected
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just know it comes from a rule in procmailrc.
The rule is to forward email to two addresses with different, changed subjects. The rule is working fine, like it should.
:0 c
* (^TO_|for.*)myaddress@mydomain.com
{
:0 c
{
:0 hfw
* ^Subject:\/.+
| formail -I "Subject: FORWARDED:$MATCH"
:0 a
! first.address@firstdomain.com
}
{
:0 hfw
* ^Subject:\/.+
| formail -I "Subject: FORWARDED2:$MATCH"
:0 a
! second.address@seconddomain.com
}
}
If somebody could explain me the error I would be very thankful.
I just know it comes from a rule in procmailrc. The rule is to forward email to two addresses with different, changed subjects. The rule is working fine, like it should.
Code:
:0 c
* (^TO_|for.*)myaddress@mydomain.com
{
:0 c
{
:0 hfw
* ^Subject:\/.+
| formail -I "Subject: FORWARDED:$MATCH"
:0 a
! first.address@firstdomain.com
}
{
:0 hfw
* ^Subject:\/.+
| formail -I "Subject: FORWARDED2:$MATCH"
:0 a
! second.address@seconddomain.com
}
}
If somebody could explain me the error I would be very thankful.
Please post such things in CODE tags...and if you read the message, it's fairly clear. It's telling you that somewhere you've got mismatched braces. You've posted one small part of your procmailrc file; the error is elsewhere. Since we don't have the file, we can't tell you where.
I have read the links of you, but did not get it working.
If you could modify my code I could learn much better by this example. Like I said: My code is working, I just get these two error messages.
Sorry, no...not going to write your code/configs for you, for free; read the "Question Guidelines" and LQ Rules.
Since you learn by example, there are plenty of them in the material you were given, along with explanations of both of those errors...that gives you everything you need.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.