procmail
[Top] [All Lists]

[OT] Re: Writing to users mailboxes

2004-11-05 15:02:03
Excuse the top post. Easier to explain in a clean top paragraph or two than
intersperse this one.

Quit trying to fix the problem with Procmail. Use fetchmail and your MTA
the way they were intended.

Assuming you have two log in accounts on your system -- "robert" and
"sabine" -- if you don't, please reply and I'll re-explain for multiple
users of a single login.

/etc/fetchmailrc <-- run as root through cron
#these mails will all be delivered to user "sabine" by the local MTA/LDA
poll some.remote.server with proto POP3
user sabine there with password xxxx is sabine here
user sabine.procmail with password xxxx is sabine here
user spambox there with password xxxxx is sabine here
poll other.remote.server with proto POP3
user sabine there with password xxxx is sabine here
user maybespam with password xxxx there is sabine here

#these will be delivered to "robert here"
poll some.remote.server with proto POP3
user robert there with password xxxx is robert here
user robert.procmail with password xxxx is robert here
user robert.spam there with password xxxxx is robert here
poll other.remote.server with proto POP3
user robert there with password xxxx is robert here
user maybespam.robert with password xxxx there is robert here

Then, in your ~/.procmailrc for "sabine" simply use:
#NOTE: I am assuming Courier IMAP folder formats (using . before folder
#             names) 

MAILDIR=/var/home/sabine/Mailer/

:0
* ^To(_dot_)*sabine(_at_)some(_dot_)remote(_dot_)server
.sabineserver1/
#Will deliver in MailDir format to /var/home/sabine/Mailer/.sabineserver1/new

:0
* ^To(_dot_)*spambox(_at_)some(_dot_)remote(_dot_)server
.spamboxserver1/
#to /var/home/sabine/Mailer/.spamboxserver1/new

:0
* ^To(_dot_)*maybespam(_at_)other(_dot_)remote(_dot_)server
.maybespamserver2/
#to /var/home/sabine/Mailer/.maybespamserver2/new

Repeat  for the ~/.procmailrc for "robert"

Make sure you have a sane default for those messages that may be missed due
to being Bcc:'d etc. The MTA on the remote servers may add an "X-RCPT-TO:"
header that you can use to filter the Bcc:'s into the proper boxes relating
to the original address they were retrieved from.

I retrieve about 20 different addresses into a single account this way and
use a custom MUA setup combined with SMTP Authentication to ensure my
replies are posted with the correct From and Sender headers.

Stop trying to use fetchmail to retrieve all messages to a single local
user account when you want the mail stored to multiple accounts. Retrieve
using the correct "here" account for the remote accounts.

Gerald

On Fri, 05 Nov 2004 21:23:44 +0100 Robert & Sabine von Knobloch 
<von(_dot_)knobloch(_at_)t-online(_dot_)de> wrote:

Dear Procmailers,

I am trying to sort incoming mail according to the TO field. I have a
central IMAP server and use fetchmail to get all mails from several
accounts
because we (I and my wife) use different accounts depending on how
suspicious we are that we will be spammed.
All received mails come into the server and are then sorted with procmail
into categories, according to various criteria and delivered to Maildir
mailboxes, all this is working.
I tried a recipe to select mails to a different account so that it would
be
delivered to the inbox of a different user (all mail is fetched by a
Linux
account 'postbote' for this purpose).

[...]

It is clear that it is a permissions problem. What I can't seem to find
is
enough information about how the permissions work in Procmail and how a
user
identity is determined. I have tried giving group permissions in sabine's
Maildir to postbote, but it didn't make any difference.
Can anyone point me in the right direction please ?

Many thanks,

Robert von Knobloch



____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>