Hi Michael,
unfortunately my system still doesn't work in a manner I would like it.
Excuse mem
but here are some more questions:
Administrator wrote:
Ok, from looking at your output I would say that sendmail is fine. Your
problem seems to be a permission problem.
************ which procmaildirectory *************************
I am setting up my procmail as System administrator. I have my logfile,
as you can see in /var/log.
I just want to deliver mail to users Inbox on Cyrus/Imap
your procmail directory is it owned by cyrus with a group of mail. On all
files.
OK. daemon is there
Also in your /etc/group file is daemon in the mail group?
Also look in your mail directory. For me that is
For me too.
/var/spool/imap/user/USERNAME
Mine too!
What are the permissions here. Mine are owned by cyrus with group mail.
Also at the bottom of your procmailrc-file it looks like you are manually
setting CYUSER. I would not do this. In my sendmail file I have a line
setting:
I added that line to sendmail. But somehow the variable isn't assigned.
Is there a special place in the sendmail.cf where that line should be
found?
CYUSER=$u
This allows cyrus to become any user that is coming down the pipe.
Let me know how that goes for you.
Also if you could be keeping a log of everything that works and is helpful
and when you do finally get it working send it back to me.
Thanks.
Michael
And I did a little more. I allowed in the imapd.conf anonymous login. I
tried to open the doors wider than security afterwards would allow it
just to enable the mail system to write in the imap-boxes. I would be
glad if you had an idea what could be done further.
Thanks a lot
Bernd
P.S. I put all my login and parts of configuration-files in one file
together and append it to this Mail.
----- Original Message -----
From: "Bernd Weber" <bweber(_at_)medienpartner(_dot_)de>
To: "Administrator" <lists(_at_)digitalplace(_dot_)org>;
<procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de>
Sent: Tuesday, November 06, 2001 5:46 AM
Subject: Re: sendmail->procmail->imap
Hi Michael,
thanks a lot for your answer. I tried it. But unfortunately for some
reason
it doesn't work. It can't write to imap-mailboxes though they exist.
With this mail I include
the last part of the procmail-log together wit the general procmailrc
and a special .procmailrc.
Maybe there should be done some more configuration in the sendmail.cf.
Connection by the mail server in this way are only accepted if the
imap-user also exists as regular user on the system.
The sendmail-configuration didn't cause any problems. But with procmail
it would be possible to distribute e-mails fetched from a provider and
destinated for different users on the systems to different imap-boxes.
I would be grateful if I could find a solution to that problem.
Besides that it is funny that you have the same last name Weber. But
probably 'Weber' in Germany is almost as abundant
as Mueller, Maier, Schulze. ;)
Greetings Bernd
P.S. In my precedent mail I forgot the appendix
Administrator wrote:
I had a big problem with that as well. Here is an example that I have.
I
am using Cyrus IMAP.
#CNN Breaking News Filter
:0:$CYUSER.lock
* ^From: BreakingNews(_at_)cnn(_dot_)com
| $DELIVERMAIL -e -a $CYUSER -m user.$CYUSER
This is in procmail.common
DELIVERMAIL=/usr/cyrus/bin/deliver
You need to have Procmail call Delivermail and then this will put the
message in the users inbox. Subdirectories are called as:
| $DELIVERMAIL -e -a $CYUSER -m user.$CYUSER.Procmail
Procmail _IS_ case sensitive for your folders. Also I have not been
able to
have spaces in my folder names, so I would not recomment it. I either
make
folders one word, or use "_" between words. I hope that this helps.
Let me
know if you need any more help.
Michael Weber
P.S. Nice last name. ;)
----- Original Message -----
From: "Bernd Weber" <bweber(_at_)medienpartner(_dot_)de>
To: <procmail(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE>
Sent: Monday, November 05, 2001 10:52 AM
Subject: sendmail->procmail->imap
Dear procmail-users,
I managed to configure sendmail invoking procmail and set up an
/etc/procmailrc file. I just want to send Mail only to the IMAP-Boxes.
But unfortanetely when I send a mail for a user only existing as
imap-user, the mail-server refuses connections. The other e-Mails
aren't
delivered correctly either.
Has anybody an idea how to setup sendmail->procmail->imap in a way
only
regarding imap users and not users having a full account.
I would be very glad to get an answer.
Bernd
--
Bernd Weber
Medienpartner Tel 0 22 07/911 377
Kommunikationsgesellschaft mbH
Baerbroich 35 Mobil 0177-3627616
51429 Bergisch-Gladbach
e-mail:bweber(_at_)medienpartner(_dot_)de
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
--
Bernd Weber
Medienpartner Tel 0 22 07/911 377
Kommunikationsgesellschaft mbH
Baerbroich 35 Mobil 0177-3627616
51429 Bergisch-Gladbach e-mail:bweber(_at_)medienpartner(_dot_)de
----------------------------------------------------------------------------
----
procmail: [21546] Tue Nov 6 11:12:28 2001
procmail: Assigning "DELIVERMAIL=/usr/cyrus/bin/deliver"
procmail: Assigning "INCLUDERC=/var/imap/.procmailrc"
procmail: Assigning "CYUSER=bweber"
procmail: No match on
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):
(.*[^a-zA-Z])?): root"
procmail: Assigning "DROPPRIVS=1"
procmail: Assuming identity of the recipient, VERBOSE=off
procmail: Skipped "file"
procmail: Skipped "."
couldn't connect to lmtpd: Invalid argument
procmail: Error while writing to "/usr/cyrus/bin/deliver"
From bweber(_at_)medienpartner(_dot_)de Tue Nov 6 11:12:28 2001
Subject: test
Folder: /dev/null
********** start of common procmailrc-file *********************
#################################################
# procmailrc
# This is the main procmail file with common SPAM recipes
# Based on the article at
# http://www.ncworldmag.com/ncw-05-1998/ncw-05-imap.html
#
#
# First we define some basics
PATH=/usr/bin:/bin
SHELL=/bin/sh
#PMDIR=$HOME/Procmail
LOGFILE=/var/log/procmaillog
VERBOSE=on
# We define DELIVERTO just to prevent a lot of extra
# typing later on. We define SPAMIT to prevent even more
# repetitive typing, as it's the same action for every user.
# This assumes we set up a SPAM folder right off the INBOX
# for every user on the system. If we neglect to do that, we'll
# get in a bit of trouble.
DELIVERMAIL=/usr/cyrus/bin/deliver
#DELIVERTO=/usr/cyrus/bin/deliver-wrapper
#SPAMIT="$DELIVERTO user.$LOGNAME.SPAM"
#DELIVERAGE="$DELIVERTO user.bweber"
# This file includes the appropriate procmail.$LOGNAME
# file so that each user has his or her own recipe techniques
# for subscribed lists, e-mail alerts, etc.
# Before we begin any recipes, let's make a backup
# copy of any incoming mail.
#
# Remember to comment out the next recipe once
# you know everything is working fine, otherwise
# you'll fill up the backup directory very quickly.
# Some procmail tutorials demonstrate how you can
# set a quota on the backup directory so that you can
# leave it in force at all times.
#:0 ic
#| $DELIVERTO user.$LOGNAME.Backup
###############################
# If there used to be an existing system-wide procmailrc, you can
# include it here
#INCLUDERC=/etc/procmailrc
INCLUDERC=/var/imap/.procmailrc
# We shouldn't be running as a privileged user, but just in case,
# make sure we drop any privileges we have
DROPPRIVS=1
###############################
# If users want to be able to define their own private recipes
# and put them in their home .procmailrc files, comment out
# the next definition.
#
# These recipes will be processed BEFORE the user-specific
# recipes that are kept in the /home/cyrus directory
#
# setup some variables, before we start
#ALERTSBOX=user.$LOGNAME.Folders.Alerts
#LISTSBOX=user.$LOGNAME.Folders.Lists
#
#INCLUDERC=$HOME/.procmailrc
# If you want to define user-specific recipes that
# you manage centrally (perhaps because you don't want
# to allow your users to "roll their own," then
# uncomment the following line. In this case, you have
# to create a file for each user in the form:
# procmail.username -- for example, procmail.Joe
#
# INCLUDERC=/usr/cyrus/etc/procmail.$LOGNAME
#############################
# Now we begin our recipes
#############################
# Email-specific SPAM recipes
# Here's one example
#### NOTE: surely cyrus 'deliver' does its own locking? There should
#### thus be no need for :0:$LOGNAME.lock
#:0
#* ^To:(_dot_)*anyplace(_at_)juno(_dot_)com
#| $SPAMIT
#############################
# General SPAM Recipes
# Here are a few examples
#
# The "To:" line doesn't exist
#:0
#* !^To:
#| $SPAMIT
#:0
#* ^TO_root
#| $DELIVERAGE
# The "To:" line is empty
#:0
#* ^To: $
#| $SPAMIT
# The "From:" line is empty
#:0
#* ^From: $
#| $SPAMIT
#############################
# All the mail that falls
# through the above recipes
# will be put into the user's
# inbox. This is always the LAST
recipe to appear in the file.
:0W
| $DELIVERMAIL -e -a bweber -m user.bweber
# If that fails - maybe because the user is out of quota, or the mailbox
# hasn't been created - then force a bounce (otherwise the message would
# get silently appended to /var/spool/mail/$LOGNAME).
# This is EX_CANTCREAT (Can't create output)
EXITCODE=73
:0
/dev/null
#
# End of procmailrc file
##############################
**** start of special procmailrc-file
CYUSER=bweber
:0:$CYUSER.lock
* ^TO: root
| $DELIVERMAIL -e -a $CYUSER -m user.$CYUSER
--
Bernd Weber
Medienpartner Tel 0 22 07/911 377
Kommunikationsgesellschaft mbH
Baerbroich 35 Mobil 0177-3627616
51429 Bergisch-Gladbach e-mail:bweber(_at_)medienpartner(_dot_)de
************* last part of maillog *****************
Nov 7 10:00:58 gw22 sendmail[25952]: alias database /etc/aliases rebuilt by
root
Nov 7 10:00:58 gw22 sendmail[25952]: /etc/aliases: 38 aliases, longest 10
bytes, 377 bytes total
Nov 7 10:00:59 gw22 sendmail[25967]: starting daemon (8.11.0):
SMTP+queueing(_at_)01:00:00
Nov 7 10:11:34 gw22 sendmail[26011]: error: safesasl(/etc/sasldb) failed:
Permission denied
Nov 7 10:11:34 gw22 sendmail[26012]: fA79BYW26012:
from=<bweber(_at_)medienpartner(_dot_)de>, size=579, class=0, nrcpts=1,
msgid=<3BE8FABF(_dot_)CA32B19A(_at_)medienpartner(_dot_)de>, proto=ESMTP,
daemon=MTA, relay=jupiter [192.168.2.20]
Nov 7 10:11:34 gw22 sendmail[26013]: fA79BYW26012: to=<bweber(_at_)gw22>,
delay=00:00:00, xdelay=00:00:00, mailer=procmail, pri=30242, dsn=2.0.0,
stat=Sent
Nov 7 10:24:54 gw22 sendmail[26076]: error: safesasl(/etc/sasldb) failed:
Permission denied
Nov 7 10:24:54 gw22 sendmail[26077]: fA79OsW26077:
from=<bweber(_at_)medienpartner(_dot_)de>, size=579, class=0, nrcpts=1,
msgid=<3BE8FDE0(_dot_)E9E09E48(_at_)medienpartner(_dot_)de>, proto=ESMTP,
daemon=MTA, relay=jupiter [192.168.2.20]
Nov 7 10:24:55 gw22 sendmail[26078]: fA79OsW26077: to=<bweber(_at_)gw22>,
delay=00:00:01, xdelay=00:00:00, mailer=procmail, pri=30242, dsn=2.0.0,
stat=Sent
*********************************************************************
**************** part of procmaillog ********************************
I added CYUSER=$u in sendmailconf and tried it that way, but obviously
$CYUSER wasn't found.
Then I inserted a specified user just to try out the configuration.
Folder: /usr/cyrus/bin/deliver -e -a -m user. 808
procmail: Notified comsat: "root@:/usr/cyrus/bin/deliver -e -a -m user."
procmail: [26014] Wed Nov 7 10:11:34 2001
procmail: Assigning "DELIVERMAIL=/usr/cyrus/bin/deliver"
procmail: Executing "/usr/cyrus/bin/deliver,-e,-a,bweber,-m,user.bweber"
procmail: Assigning "LASTFOLDER=/usr/cyrus/bin/deliver -e -a bweber -m
user.bweber"
From bweber(_at_)medienpartner(_dot_)de Wed Nov 7 10:11:34 2001
Subject: test
Folder: /usr/cyrus/bin/deliver -e -a bweber -m user.bweber 902
procmail: Notified comsat: "bweber@:/usr/cyrus/bin/deliver -e -a bweber -m
user.bweber"
procmail: [26079] Wed Nov 7 10:24:55 2001
procmail: Assigning "DELIVERMAIL=/usr/cyrus/bin/deliver"
procmail: Executing "/usr/cyrus/bin/deliver,-e,-a,bweber,-m,user.bweber"
procmail: Assigning "LASTFOLDER=/usr/cyrus/bin/deliver -e -a bweber -m
user.bweber"
From bweber(_at_)medienpartner(_dot_)de Wed Nov 7 10:24:55 2001
Subject: test
Folder: /usr/cyrus/bin/deliver -e -a bweber -m user.bweber 902
procmail: Notified comsat: "bweber@:/usr/cyrus/bin/deliver -e -a bweber -m
user.bweber"
****************** Last part of sendmail.cf *******************
CYUSER=$u
Mlocal, P=/usr/bin/procmail, F=lsDFMAw5:/|@qSPfhn9,
S=EnvFromL/HdrFromL, R=EnvToL/HdrToL,
T=DNS/RFC822/X-Unix,
A=procmail -Y -a $h -d $u
Mprocmail, P=/usr/bin/procmail, F=lsDFMAw5:/|@qSPfhn9,
S=EnvFromL/HdrFromL, R=EnvToL/HdrToL,
T=DNS/RFC822/X-Unix,
A=procmail -Y -a $h -d $u
Mprog, P=/usr/sbin/smrsh, F=lsDFMoqeu9, S=EnvFromL/HdrFromL,
R=EnvToL/HdrToL, D=$z:/,
T=X-Unix/X-Unix/X-Unix,
A=smrsh -c $u
******************************************************************
************* My /etc/procmailrc *******************************
#################################################
# procmailrc
# This is the main procmail file with common SPAM recipes
# Based on the article at
# http://www.ncworldmag.com/ncw-05-1998/ncw-05-imap.html
#
#
# First we define some basics
PATH=/usr/bin:/bin
SHELL=/bin/sh
#PMDIR=$HOME/Procmail
LOGFILE=/var/log/procmaillog
VERBOSE=on
# We define DELIVERTO just to prevent a lot of extra
# typing later on. We define SPAMIT to prevent even more
# repetitive typing, as it's the same action for every user.
# This assumes we set up a SPAM folder right off the INBOX
# for every user on the system. If we neglect to do that, we'll
# get in a bit of trouble.
DELIVERMAIL=/usr/cyrus/bin/deliver
#DELIVERTO=/usr/cyrus/bin/deliver-wrapper
#SPAMIT="$DELIVERTO user.$LOGNAME.SPAM"
# This file includes the appropriate procmail.$LOGNAME
# file so that each user has his or her own recipe techniques
# for subscribed lists, e-mail alerts, etc.
# Before we begin any recipes, let's make a backup
# copy of any incoming mail.
#
# Remember to comment out the next recipe once
# you know everything is working fine, otherwise
# you'll fill up the backup directory very quickly.
# Some procmail tutorials demonstrate how you can
# set a quota on the backup directory so that you can
# leave it in force at all times.
#:0 ic
#| $DELIVERTO user.$LOGNAME.Backup
###############################
# If there used to be an existing system-wide procmailrc, you can
# include it here
#INCLUDERC=/etc/procmailrc
#INCLUDERC=/var/imap/.procmailrc
# We shouldn't be running as a privileged user, but just in case,
# make sure we drop any privileges we have
#DROPPRIVS=1
###############################
# If users want to be able to define their own private recipes
# and put them in their home .procmailrc files, comment out
# the next definition.
#
# These recipes will be processed BEFORE the user-specific
# recipes that are kept in the /home/cyrus directory
#
# setup some variables, before we start
#ALERTSBOX=user.$LOGNAME.Folders.Alerts
#LISTSBOX=user.$LOGNAME.Folders.Lists
#
#INCLUDERC=$HOME/.procmailrc
# If you want to define user-specific recipes that
# you manage centrally (perhaps because you don't want
# to allow your users to "roll their own," then
# uncomment the following line. In this case, you have
# to create a file for each user in the form:
# procmail.username -- for example, procmail.Joe
#
# INCLUDERC=/usr/cyrus/etc/procmail.$LOGNAME
#############################
# Now we begin our recipes
#############################
# Email-specific SPAM recipes
# Here's one example
#### NOTE: surely cyrus 'deliver' does its own locking? There should
#### thus be no need for :0:$LOGNAME.lock
#:0
#* ^To:(_dot_)*anyplace(_at_)juno(_dot_)com
#| $SPAMIT
#############################
# General SPAM Recipes
# Here are a few examples
#
# The "To:" line doesn't exist
#:0
#* !^To:
#| $SPAMIT
#:0
#* ^TO_root
#| $DELIVERAGE
# The "To:" line is empty
#:0
#* ^To: $
#| $SPAMIT
# The "From:" line is empty
#:0
#* ^From: $
#| $SPAMIT
#############################
# All the mail that falls
# through the above recipes
# will be put into the user's
# inbox. This is always the LAST
# recipe to appear in the file.
:0W
| $DELIVERMAIL -e -a bweber -m user.bweber
# If that fails - maybe because the user is out of quota, or the mailbox
# hasn't been created - then force a bounce (otherwise the message would
# get silently appended to /var/spool/mail/$LOGNAME).
# This is EX_CANTCREAT (Can't create output)
EXITCODE=73
:0
/dev/null
#
# End of procmailrc file
##############################