Koozali.org: home of the SME Server

Sorting Mails

Nicolas Wies

Sorting Mails
« on: March 13, 2000, 09:49:35 AM »
Hello,

I try to set up qmail+fetchmail+prcomail to sort email like
herbert where herbert is the local user.

I install  e-smith-3.1-updates-gr1 in my e-smith 3.1.
As i see, Fetchmail keep the emails to the remote mailbox,
but i have this message from qmail
"<   | preline /usr/bin/procmail@tyty.fr>:
Sorry, no mailbox here by that name. (#5.1.1)"

procmail can't deliver these to the good local user, so the message goes to the mailbox of the administrator (set via the interface)

My /etc/fetchmail look like this ( i try some custom) :

fetchmail --fetchmailrc - < 
set postmaster "postmaster"
set logfile /var/log/fetchmail.log
set no bouncemail
set properties ""
 
poll 192.168.30.20
    protocol POP3
    checkalias
    localdomains tyty.fr
       username ruru password xxxx to * here
           smtphost localhost
           smtpaddress tyty.fr
           fetchall
EOF

all users have the same .qmail :
 ./Maildir/
   | preline /usr/bin/procmail

and I write  a good /etc/procmailrc look  like:

MAILDIR=/var/spool/mail
LOGFILE=/var/log/procmail.log
DEFAULT=/var/spool/mail/toto
 
:0
*^(To|Cc):.*(tyty|TYTY)
!tyty

Thanks,
   Nicolas

Charlie Brady

RE: Sorting Mails
« Reply #1 on: March 13, 2000, 11:24:37 AM »
Nicolas Wies wrote:

> I try to set up qmail+fetchmail+prcomail to sort email like
> herbert where herbert is the local user.
>
> I install  e-smith-3.1-updates-gr1 in my e-smith 3.1. As i
> see,
> Fetchmail keep the emails to the remote mailbox, but i have
> this message from qmail
<"<   | preline /usr/bin/procmail@tyty.fr>: Sorry, no mailbox
> here by that name. (#5.1.1)"

It looks to me as though you have a space or tab before the | sign, so qmail is not running a command, but looking for a mailbox to deliver into.

> procmail can't deliver these to the good local user, so the
> message goes to the mailbox of the administrator (set via the
> interface)

No comment on the fetchmail other than to wonder why the standard configuration wasn't OK for you.

> all users have the same .qmail :
>./Maildir/
>|preline /usr/bin/procmail
>
>  and I write a good /etc/procmailrc look like:
>
>  MAILDIR=/var/spool/mail
>  LOGFILE=/var/log/procmail.log
>  DEFAULT=/var/spool/mail/toto
>
>  :0
>  *^(To|Cc):.*(tyty|TYTY)
>  !tyty

There is no /var/spool/mail directory on the e-smith server, and qmail does not normally deliver there. You need to have a procmail which has been modified to be able to deliver into the Maildir structure, or you need to use something like "safecat" (see www.qmail.org) in a procmail recipe to do maildir deliveries.

Feel free to email me if you want more help.

Charlie

Nicolas WIES

RE: Sorting Mails
« Reply #2 on: March 14, 2000, 12:33:08 AM »
Hi
As I understand, the e-smith server does not do what I want: To sort the e-mail,which are in a single mail box, without any help from my ISP.

And I found an half solution:

I modify the /etc/fetchmail to this one :
fetchmail --silent --nobounce --fetchmailrc - < 
set postmaster "postmaster"
set properties ""
 
poll 193.252.19.31
    protocol POP3
    checkalias
    localdomains tyty.fr
       username tyty password XXXXXX to real here
           smtphost localhost
           smtpaddress tyty.fr
           fetchall
 
EOF              

the real is the name of a account I have made.

I made /home/e-smith/files/users/real/.qmail:
| preline procmail

I made /etc/procmailrc :
LOGFILE=/var/log/procmail.log
DEFAULT=/home/e-smith/files/users/greta/Maildir
 
:0
*^(To|Cc):.*(tyty|TYTY)
!tyty
 
:0
*^(To|Cc):.*(tutu|TUTU)
!TUTU

I wrote half solution, because only the "To" header is checking,
not the "Cc".

Someone has a idea in order to have a full solution?

Nicolas

Nicolas WIES

RE: Sorting Mails
« Reply #3 on: March 15, 2000, 01:26:08 AM »
I found the solution to my problem:

The procmailrc must look like this :
:0 c
* ^(to|cc|bcc):.*user1
! user1

...

:0 c
* ^(to|cc|bcc):.*usern
! usern

:0
* ^(to|cc|bcc):.(*user1|user2|...|usern)
/dev/null

:0
* .*
! postmaster

The "c" near 0 said to procmail to try a Carbon copy with the others accounts.
The last 3 lines said to post to the box define in the Web interface.

Bye,
NIcolas