Home › Forums › OS X Server and Client Discussion › Mail › Procmail forwarding Mail Problem
- This topic has 2 replies, 1 voice, and was last updated 22 years, 4 months ago by
Overrider.
-
AuthorPosts
-
June 21, 2004 at 2:09 pm #358303
Overrider
ParticipantHello all,
After one week trying to fix my problem which I posted earlier to this list (https://www.afp548.com/eBBS/viewtopic.php?p=4047#4047), i decided to make this a new Post for clarification.I reinstalled my osx server as a last resort. Immediately after getting mail and dns to work I tried to set up procmail like described in the article found on afp548 website. It still did not work, but I realized that the problem is not with procmail itself, procmail works fine, it is the forwarding part that doesn’t work. I already looked trough all the hundreds Posts from People who have forwarding problems, but they are all not quiet the same. Please, please anybody who knows how to fix my procmail nightmare, read trough.
This is my procmailrc file.###
#
# Master Procmail Recipe for Postfix > Procmail > Cyrus
#
###
PATH=/bin:/sbin:/usr/bin:/usr/sbin
VERBOSE=on
LOGABSTRACT=yes
LOGFILE=/procmail.log
COMSAT=off
DELIVERTO=”/usr/bin/cyrus/bin/deliver”
USERINBOX=”$DELIVERTO -e -a $USER -m user/$USER”#
# OPTIONAL: Include users’ own .procmail recipe files
#
#INCLUDERC=/Users/$USER/.procmailrc#DROPPRIVS=YES
:0
* ^Subject:.*test
! david@mydomain.com:0 w
| $USERINBOXThese are my Entries in /etc/postfix/main.cf for procmail
mailbox_command = /usr/bin/procmail -t -a “$EXTENSION”
mailbox_transport = procmailThese are my Entries in /etc/postfix/master.cf
procmail unix – n n – – pipe
flags=R user=cyrus argv=/usr/bin/procmail -t m USER=${user}
EXTENSION=${extension} /etc/procmailrc #this should be on line 2 I knowAnd when I try to send with this configuration; this is my /procmail.log
rocmail: Assigning “COMSAT=off”
procmail: Assigning “DELIVERTO=/usr/bin/cyrus/bin/deliver”
procmail: Assigning “USERINBOX=/usr/bin/cyrus/bin/deliver -e -a admin -m user/admin”
procmail: Match on “^Subject:.*test”
procmail: Assigning “LASTFOLDER=/usr/sbin/sendmail -oi david@mydomain.com”
Subject: Test
Folder: /usr/sbin/sendmail -oi david@mydomain.com 576
procmail: Executing “/usr/sbin/sendmail,-oi,david@mydomain.com”
procmail: Assigning “COMSAT=off”
procmail: Assigning “DELIVERTO=/usr/bin/cyrus/bin/deliver”
procmail: Assigning “USERINBOX=/usr/bin/cyrus/bin/deliver -e -a david -m user/david”
procmail: Match on “^Subject:.*test”
procmail: Assigning “LASTFOLDER=/usr/sbin/sendmail -oi david@mydomain.com”
Subject: Test
Folder: /usr/sbin/sendmail -oi david@mydomain.com 688
procmail: Executing “/usr/sbin/sendmail,-oi,david@mydomain.com”
# Doesn’t the last line of the log look weird? Why are there “,” after the
# sendmail command?This Command run from the Terminal works, so I guess it is not sendmail
usr/sbin/sendmail -oi david@mydomain.com < test.msgThe Mail which should be forwarded to david@mydomain.com because it has the Subject “Test” never reaches my Mailbox. It just sits in the mailq and waits until I remove the recipe from my procmailrc file and then do a sudo postfix reload. Help!
Thank you,
Overrider
June 24, 2004 at 3:03 am #358323Overrider
ParticipantWhen i modify my procmailrc recipe, so it says :0 cw (wait for exitcode, and copy) it sends me a Mail, and puts another one in the queue.
June 24, 2004 at 5:25 am #358324Overrider
ParticipantWhen i modify my Recipe so it forwards to an E-Mail Address not local, meaning for example to me@operamail.com, it works just fine.
Also , when i modify my recipe so it says| /usr/bin/cyrus/bin/deliver -e -a me -m user/me
instead of me@mydomain.com it also works just as expected.
Why is that? Could it be as simple as that my postfix config has something wrong, or could it be because the way Postfix and Procmail interact with each other? Meaning i send a mail, it gets filtered by procmail, forwarded to my address, because the address is on the same Server it is being filtered again, forwarded again, etc, etc.?
Any Suggestions?
Overrider
-
AuthorPosts
- You must be logged in to reply to this topic.