Home Forums OS X Server and Client Discussion Mail Procmail skipping Recipe

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #358271
    Anonymous
    Participant

    Hello all,
    i am trying to get Procmail to work on my Panther Server. I am using afp548 procmail article for setup. My Users dont have User Folders, so i only want to have a few Global Recipes inside some Folder, maybe even the /etc/procmailrc File. When i put this in my etc/procmailrc file, it wont forward the mail.

    :0:
    * ^Subject:.*test
    ! [email protected]

    But when i create a Homefolder, place above recipe in it, and then invoke it from /etc/procmailrc using : INCLUDERC=/Users/$USER/.procmailrc, it works just fine. If somebody could help would be great!

    Regards,
    Anton

    #358275
    Anonymous
    Participant

    I’m not even close to a procmail expert but I’m guessing you need a second entry in procmailrc to pass the file on to cyrus for delivery. I’m having a problem with procmail running anything but you can see my procmailrc file by looking at:

    https://www.afp548.com/eBBS/viewtopic.php?p=4050#4050

    #358276
    Anonymous
    Participant

    Well, at least i got it as far as that it will store Errors into a file /procmail.log .
    i only want to get my recipe working for testing, it is supposed to watch for an email with the subject test and forward it to my email address located on the same server. every time i send a mail where the rule matches, the mail just sits inside the mailqueue. i check it by typing mailq. then i delete the queue by executing
    cd /var/spool/postfix/maildrop
    sudo rm *

    but whenever i try to send a mail with test in the subject, it just sits in the mailq with following message
    [quote:7961a4843d]
    apex:/var/spool/postfix/maildrop root# mailq
    -Queue ID- –Size– —-Arrival Time—- -Sender/Recipient——-
    2470F651B8 853 ?? cyrus
    [email protected]

    34072651BA 962 ?? cyrus
    [email protected]

    — 1 Kbytes in 2 Requests.[/quote:7961a4843d]

    remember, when i put the recipe into the users home folder and invoke it from /etc/procmailrc everything works fine. only when i put the recipe directly into /etc/procmailrc or into another file (like /.procmailrc) it will not work.

    my procmail.log file says this

    [quote:7961a4843d]

    procmail: Assigning “INCLUDERC=/.procmailrc”
    procmail: Assigning “INCLUDERC=/.procmailrc”
    procmail: Match on “^Subject:.*test”
    procmail: Assigning “LASTFOLDER=/usr/sbin/sendmail -oi [email protected]
    procmail: Notified comsat: “cyrus@:/usr/sbin/sendmail -oi [email protected]
    Subject: Test
    Folder: /usr/sbin/sendmail -oi [email protected] 1628
    procmail: Match on “^Subject:.*test”
    procmail: Assigning “LASTFOLDER=/usr/sbin/sendmail -oi [email protected]
    procmail: Notified comsat: “cyrus@:/usr/sbin/sendmail -oi [email protected]
    Subject: Test
    Folder: /usr/sbin/sendmail -oi [email protected] 3768
    procmail: Executing “/usr/sbin/sendmail,-oi,[email protected]
    procmail: Executing “/usr/sbin/sendmail,-oi,[email protected]
    procmail: Assigning “INCLUDERC=/.procmailrc”
    procmail: Match on “^Subject:.*test”
    procmail: Assigning “LASTFOLDER=/usr/sbin/sendmail -oi [email protected]
    procmail: Notified comsat: “cyrus@:/usr/sbin/sendmail -oi [email protected]
    Subject: Test

    [/quote:7961a4843d]

    and this is my /etc/procmailrc

    [quote:7961a4843d]
    # Master Procmail Recipe for Postfix > Procmail > Cyrus
    #
    ###
    ##DELIVERTO=”/usr/bin/cyrus/bin/deliver”
    USERINBOX=”$DELIVERTO -e -a $USER -m user/$USER”
    SHELL=/bin/sh

    VERBOSE=on
    LOGFILE=”/procmail.log”

    INCLUDERC=/.procmailrc

    :0 w
    | $USERINBOX
    [/quote:7961a4843d]

    I dont know if it is a Permission Error, but i think they should be fine. Anybody any Ideas?

    Regards,
    A

    #358289
    Anonymous
    Participant

    Well, procmail does not seem to be too difficult to setup, documentation is plenty. I think i must have a permission error of some sort, or something going on with sendmail. i wanted procmailbecause i like the fexibility of it. i am not going for spambouncer or so, for the beginning, i am happy when i can quickly add a recipe to filter all mails with the subject i love u, for example.

    #358291
    Overrider
    Participant

    Now i am 95 Percent sure it is a Permission Error. I put the recipe into a Home Folder, it works. I put it into /rc/.procmailrc and it doenst work. My procmail.log gives me following output

    [quote:64ce4e10fc]
    procmail: Assigning “INCLUDERC=/rc/.procmailrc”
    procmail: Couldn’t read “/rc/.procmailrc”
    procmail: Executing “/usr/bin/cyrus/bin/deliver,-e,-a,admin,-m,user/admin”
    procmail: Assigning “LASTFOLDER=/usr/bin/cyrus/bin/deliver -e -a admin -m user/admin”
    procmail: Notified comsat: “cyrus@:/usr/bin/cyrus/bin/deliver -e -a admin -m user/admin”
    Subject: Test
    Folder: /usr/bin/cyrus/bin/deliver -e -a admin -m user/admin 558

    [/quote:64ce4e10fc]

    It says “couldnt read”, so i guess the Permissions are wrong. Right now they are
    -rwx–x–x 1 root admin 42 17 Jun 21:36 .procmailrc

    Any Ideas?

    Thanks

    #358293
    Overrider
    Participant

    This is what my /procmail.log file says after i send a mail with the recipe in the homefolder

    [quote:e36610b046]
    procmail: Assigning “INCLUDERC=/Users/admin/.procmailrc”
    procmail: Match on “^Subject:.*test”
    procmail: Assigning “LASTFOLDER=/usr/sbin/sendmail -oi
    [email protected]
    procmail: Notified comsat: “cyrus@:/usr/sbin/sendmail -oi [email protected]
    Subject: Test
    Folder: /usr/sbin/sendmail -oi [email protected] 558
    procmail: Executing “/usr/sbin/sendmail,-oi,[email protected]
    procmail: Assigning “INCLUDERC=/Users/me/.procmailrc”
    procmail: Couldn’t read “/Users/me/.procmailrc”
    procmail: Executing “/usr/bin/cyrus/bin/deliver,-e,-a,me,-m,user/me”
    procmail: Assigning “LASTFOLDER=/usr/bin/cyrus/bin/deliver -e -a me -m user/me”
    procmail: Notified comsat: “cyrus@:/usr/bin/cyrus/bin/deliver -e -a me -m user/me”
    Subject: Test
    Folder: /usr/bin/cyrus/bin/deliver -e -a me -m user/me 665
    [/quote:e36610b046]

    this is what the logfile says after i send a mail with the recipe in /rc/.procmailrc

    [quote:e36610b046]
    procmail: Assigning “INCLUDERC=/rc/.procmailrc”
    procmail: Match on “^Subject:.*test”
    procmail: Assigning “LASTFOLDER=/usr/sbin/sendmail -oi [email protected]
    procmail: Notified comsat: “cyrus@:/usr/sbin/sendmail -oi [email protected]
    Subject: Test
    Folder: /usr/sbin/sendmail -oi [email protected] 558
    procmail: Executing “/usr/sbin/sendmail,-oi,[email protected]
    procmail: Assigning “INCLUDERC=/rc/.procmailrc”
    procmail: Match on “^Subject:.*test”
    procmail: Assigning “LASTFOLDER=/usr/sbin/sendmail -oi [email protected]
    procmail: Notified comsat: “cyrus@:/usr/sbin/sendmail -oi [email protected]
    Subject: Test
    Folder: /usr/sbin/sendmail -oi [email protected] 665
    procmail: Executing “/usr/sbin/sendmail,-oi,[email protected]
    [/quote:e36610b046]

    see that the last line is different? why?

    this is really taking no end. i am gonna install on a fresh machine and try as well. i am starting to agree with mactroll….grrrr.

    Later,
    Overrider

    #358296
    Anonymous
    Participant

    [quote
    It says “couldnt read”, so i guess the Permissions are wrong. Right now they are
    -rwx–x–x 1 root admin 42 17 Jun 21:36 .procmailrc
    [/quote]
    Whoa! Is that what you really have set? The ‘x’ for group and world are useless. You also have to have ‘r’. Try a ‘chmod 755 .procmailrc’.

    #358297
    Overrider
    Participant

    on the first quote of my logfile where it says procmail: Couldn’t read “/Users/me/.procmailrc” everything works fine. thats because i am invoking a recipe which is located in admins homefolder, and others (like “me”) dont have a .procmailrc file.
    the second quote is my problem, i dont want to have recipes in every persons homefolder, only one folder with recipes for everyone, but whenever i try to invoke a recipe like this f.e INCLUDERC=/rc/.procmailrc, it wont work. i cant see why not.

    so again:

    [quote:5f3d49d853]
    this works

    # Master Procmail Recipe for Postfix > Procmail > Cyrus
    #
    ###
    PATH=/bin:/usr/bin:/usr/bin:/etc
    DELIVERTO=”/usr/bin/cyrus/bin/deliver”
    USERINBOX=”$DELIVERTO -e -a $USER -m user/$USER”
    SHELL=/bin/sh

    VERBOSE=on
    LOGFILE=”/procmail.log”

    INCLUDERC=/Users/$USER/.procmailrc
    #INCLUDERC=/etc/.procmailrc

    :0 w
    | $USERINBOX

    [/quote:5f3d49d853]

    [quote:5f3d49d853]
    this doesnt, but it should

    # Master Procmail Recipe for Postfix > Procmail > Cyrus
    #
    ###
    PATH=/bin:/usr/bin:/usr/bin:/etc
    DELIVERTO=”/usr/bin/cyrus/bin/deliver”
    USERINBOX=”$DELIVERTO -e -a $USER -m user/$USER”
    SHELL=/bin/sh

    VERBOSE=on
    LOGFILE=”/procmail.log”

    #INCLUDERC=/Users/$USER/.procmailrc
    INCLUDERC=/etc/.procmailrc

    :0 w
    | $USERINBOX

    [/quote:5f3d49d853]

    Please help if you can,
    Thanks,
    O

    #358300
    Overrider
    Participant

    Does this seem so hard to figure out? I am now on this Issue since 4 Days or so, and nobody seems to have the solution. Starting to get a little frustrated;I only want to install Procmail site-wide. If anybody can help me to fix this, please Post your answer or suggestion. Why does the Logfile say something with Postfix at the end when it is using a /Users/$USER/.promacilrc file to forward a matching e-mail, but when i use a recipe sitting in some other location than the User Folder it is saying something with sendmail.
    In OSX, are there extra config files for sendmail, or is everything done in /etc/postfix/main.cf and master.cf?

    Regards,
    O

    #358301
    Overrider
    Participant

    well, still did not quiet figure it out, but now it became a mission. I found out something new tough;

    Before i said when i place a recipe inside /Users/$USER everything works fine. That is still true; but as you can see in the first logfile i posted earlier, first it finds a match, continues processing and then tries to find a recipe in the Users Homefolder my recipe is trying to forward to. It cant find a recipe, cause there isnt one, logs a “Couldnt read ~/.procmailrc and then delivers the Mail. Now if i also place a recipe in that Users Folder, it will not work again, and show the same log message like in my second posted log above….strange. Seems like it is getting into some kind of loop which causes the Mail to stay in the mailq. Anybody any Ideas?

    Am i writing too much or something, cause nobody answers…I think the Problem i have is probably easy to fix for someone who know procmail/postfix on osx. The only thing i want to do is have a Global Procmail recipe in f.e /procmail/procmail.common, and no recipes in the users Homefolders.

    Regards,
    O

    #358302
    Overrider
    Participant

    Hello all,

    maybe i tackled my Problem from a wrong direction. Today i took the painful time to reinstall my OSX Server. First thing i did was getting Mail running and trying again to set up procmail like described in the article on afp548. the outcome: it still doesnt follow my example recipe to forward mails with subject test to my account.
    Now i am thinking that procmail probably works, but whenever i try to forward with it, meaning i use the ! character to forward, it doesnt work and the mail sits in the mailq. Can anybody help with this scenario?

    Thanks,

    O

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.

Comments are closed