Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-13-2011, 05:50 AM   #1
LQ Newbie
Registered: Mar 2011
Posts: 2

Rep: Reputation: 0
Procmail: Forwarding just does not work

I've spent pretty much the whole night trying to figure out how I can achieve the following:
If a certain Keyword, say [key], is in the subject line, then the email is forwarded to a list of people.

My recipe (now) looks like this:
* ^Subject: .*\[key\].*
The (verbose) procmail logfile gives me this:
procmail: [16756] Sun Mar 13 03:20:30 2011
procmail: Assigning "MAILDIR=/fs/home1/student/j/USER/Mailfolder"
procmail: Assigning "DEFAULT=/fs/home1/student/j/USER/Mailfolder/IN-unmatched"
procmail: Assigning "INCLUDERC=/fs/home1/student/j/USER/Procmail/rc.forwarding"
procmail: Match on "^Subject: .*\[key\].*"
procmail: Assigning "LASTFOLDER=/usr/sbin/sendmail -oi"
procmail: Executing "/usr/sbin/sendmail,-oi,"
procmail: Notified comsat: "USER@:/usr/sbin/sendmail -oi"
From Sun Mar 13 03:20:30 2011
 Subject: Fwd: [key] bla
  Folder: /usr/sbin/sendmail -oi                   3474
Now, that does look like it actually worked, right? Well, the forwarded message never arrived at
However, if I myself issue
echo "test"|sendmail -oi
the message "test" arrives at instantly.

Is my recipe wrong in any way? I pretty much copied it from available ones.
It's a university server, so I'm no admin, just a user. How can I figure out whether some setting that the admin made prevents procmail from calling sendmail or whatever?
What commands should I run to give you the info about the system you need to help me with that problem?

Thanks guys!
Old 03-13-2011, 05:54 AM   #2
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Perhaps you can ask them?
They can look in the logfiles to see why the mail isn't sent.

Kind regards
Old 03-13-2011, 06:25 AM   #3
Registered: May 2005
Location: St. Louis, MO
Distribution: CentOS6
Posts: 267

Rep: Reputation: 58
 :0 c
* ^Subject: .*\[key\].*
Old 03-13-2011, 07:55 PM   #4
LQ Newbie
Registered: Mar 2011
Posts: 2

Original Poster
Rep: Reputation: 0
So the extra c did not help, and all the admins would answer to me is that they're not debugging procmail for me, even less so since what I'm trying to do has nothing to do with academic work. Also, I wouldn't know what to ask them for, if I had to say "please include command xyz in smrsh" or something like that, I would, but as it stands I don't even know what's wrong.

That said, I still figured it out. I had a .forward file with these 2 lines:
The first one just forwards everything to my mailbox, the 2nd one pipes it to procmail. I reversed the order, and surprise, it works now with this .forward file:
Why, I don't know, the incoming messages obviously got piped to procmail with the 1st version, too. Maybe someone can explain that?



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Procmail: forwarding mail to remote mail account Cadmium Linux - Software 2 01-14-2010 01:05 PM
procmail removing headers after forwarding alitrix Linux - Server 4 05-26-2008 05:20 AM
Procmail forwarding loop jusme Linux - Software 10 02-28-2006 12:51 PM
procmail and forwarding samek Linux - Software 3 09-12-2005 08:18 AM
Forwarding messages to another server via procmail handsomeRob Linux - Software 5 01-18-2005 07:08 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:52 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration