Re: problem with /var/mail and procmail

2004-09-27 Thread Craig Sanders
On Mon, Sep 27, 2004 at 12:00:38PM +0200, Francisco Castillo wrote:
 Yesterday i decide to move /var/mail folder to /mnt/var/mail where i has
 another partition but this has caused to stop working my mail system.
 
 In order to do this i do
 
 cp /var/mail/* /mnt/var/mail

this is the cause of your problems.  plain cp will copy the files, but they
will be owned by the current user (root, most likely), and permissions will be
set according to the current umask.

try cp -a instead.  this copies the files AND preserves ownership and
permissions.  -a will also recurse subdirectories.

e.g.

cp -a /var/mail /mnt/var

NOTE: stop postfix and your POP/IMAP daemons before copying and restart them
afterwards.  you don't want new mail to arrive or old mail to be deleted while
the copy is in progress.  in fact, you don't want either of those things
to happen until you're sure that the changes are working without problem.

craig
-- 
craig sanders [EMAIL PROTECTED]

The next time you vote, remember that Regime change begins at home


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



problem with /var/mail and procmail

2004-09-27 Thread Francisco Castillo

Hello,

I has a server with debian woody + postfix + amavis + procmail to local
delivery

Yesterday i decide to move /var/mail folder to /mnt/var/mail where i has
another partition but this has caused to stop working my mail system.

In order to do this i do

cp /var/mail/* /mnt/var/mail
mv /var/mail /var/mail_back
cd /var ; ln -s /mnt/var/mail mail

then i see that i has problems with qpopper checking the users files and
decide to do a rollback with

cd /var ; rm mail
mv mail_back mail
reboot

but then the postfix server has problems to deliver local mail to /var/mail
( i think the problem could be in amavis + procmail system).

I has not seen errors in mail.err, mail.warn, mail.info, system.log,
messages.log

I only has seen in mail.info relay=vscan, delay=344, status=deferred
(temporary failure) when postfix try to deliver localy a mail to the
/var/mail/user file.

I´m stopped now please help,

Thanks in advance.
Francisco Castillo.











Re: problem with /var/mail and procmail

2004-09-27 Thread Michelle Konzack
Am 2004-09-27 12:00:38, schrieb Francisco Castillo:
 
 Hello,
 
 I has a server with debian woody + postfix + amavis + procmail to local
 delivery
 
 Yesterday i decide to move /var/mail folder to /mnt/var/mail where i has
 another partition but this has caused to stop working my mail system.
 
 In order to do this i do
 
 cp /var/mail/* /mnt/var/mail
 mv /var/mail /var/mail_back
 cd /var ; ln -s /mnt/var/mail mail

Why do you do that ?
Better is:

mount new_partiotion/ /mnt
cp /var/mail/* /mnt
umount /mnt
mount new_partition /var/mail

My OLD mailserver has:

hda1   250 MB   /
hda2   250 MB   SWAP
hda3 1.000 MB   /tmp
hda5   500 MB   /usr
hda6   250 MB   /var
hda7 1.250 MB   /var/log
hda876.000 MB   /var/mail

This works quiet well... and you can LVM hda8 how you want.

 Thanks in advance.
 Francisco Castillo.

Greetings
Michelle

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/ 
Michelle Konzack   Apt. 917  ICQ #328449886
   50, rue de Soultz MSM LinuxMichi
0033/3/8845235667100 Strasbourg/France   IRC #Debian (irc.icq.com)


signature.pgp
Description: Digital signature


Re: problem with /var/mail and procmail

2004-09-27 Thread Miernik
Francisco Castillo [EMAIL PROTECTED] wrote:
 
 cp /var/mail/* /mnt/var/mail
 mv /var/mail /var/mail_back
 cd /var ; ln -s /mnt/var/mail mail

Do it like this:

mount --bind /mnt/var/mail/ /var/mail/

 cd /var ; rm mail
 mv mail_back mail
 reboot
 
 but then the postfix server has problems to deliver local mail to /var/mail
 ( i think the problem could be in amavis + procmail system).

Are the permissions OK? Mine are:

drwxrwsr-x   2 root mail96 2004-09-27 08:19 mail

-- 
Miernik _  xmpp:[EMAIL PROTECTED]
___/__ tel: +427 __/  mailto:[EMAIL PROTECTED]
Why software shouldn't be covered by patents
http://bladeenc.mp3.no/articles/software_patents.html




Re: problem with /var/mail and procmail

2004-09-27 Thread Aurlien Beaujean
Le lundi 27 septembre 2004 à 12:00, Francisco Castillo écrivait:
 I only has seen in mail.info relay=vscan, delay=344, status=deferred
 (temporary failure) when postfix try to deliver localy a mail to the
 /var/mail/user file.

Please check the permissions of /var/mail. It must be something like
that:
drwxrwsr-x   2 root mail   44 2004-09-27 12:17 /var/mail

-- 
BOFH excuse #66: bit bucket overflow




Re: problem with /var/mail and procmail

2004-09-27 Thread Wieslaw
Hi
In order to do this i do
cp /var/mail/* /mnt/var/mail
mv /var/mail /var/mail_back
cd /var ; ln -s /mnt/var/mail mail
[..]
cd /var ; rm mail
mv mail_back mail
reboot
Did you chmod/chown these directores?
mv does not move parent UID/GID and mod's.
--
I greet
Wieslaw



RE: problem with /var/mail and procmail

2004-09-27 Thread Francisco Castillo

Hello,

I has forget to say that the permisions where drwxrwsr-x when first was in
error.

Then i do a chmod 777 but the problem go on.

But what is the chmod command in order to restore the drwxrwsr-x, but this
will not be the solution, as i explain above.

Thanks in advance.




 -Mensaje original-
 De: Aurélien Beaujean [mailto:[EMAIL PROTECTED]
 Enviado el: lunes, 27 de septiembre de 2004 12:25
 Para: debian-isp@lists.debian.org
 Asunto: Re: problem with /var/mail and procmail


 Le lundi 27 septembre 2004 à 12:00, Francisco Castillo écrivait:
  I only has seen in mail.info relay=vscan, delay=344, status=deferred
  (temporary failure) when postfix try to deliver localy a mail to the
  /var/mail/user file.

 Please check the permissions of /var/mail. It must be something like
 that:
 drwxrwsr-x   2 root mail   44 2004-09-27 12:17 /var/mail

 --
 BOFH excuse #66: bit bucket overflow


 --
 To UNSUBSCRIBE, email to [EMAIL PROTECTED]
 with a subject of unsubscribe. Trouble? Contact
 [EMAIL PROTECTED]





RE: problem with /var/mail and procmail

2004-09-27 Thread Francisco Castillo

No, i did not chmod this directories,  i only do a mv realy and the problem
go on. Then i has do a chmod 777 and   i now i has do a chmod g+s mail but
the problem goes on.

Francisco.




 -Mensaje original-
 De: Wieslaw [mailto:[EMAIL PROTECTED]
 Enviado el: lunes, 27 de septiembre de 2004 12:44
 Para: Francisco Castillo
 CC: debian-isp@lists.debian.org
 Asunto: Re: problem with /var/mail and procmail


 Hi

  In order to do this i do
 
  cp /var/mail/* /mnt/var/mail
  mv /var/mail /var/mail_back
  cd /var ; ln -s /mnt/var/mail mail
 [..]
  cd /var ; rm mail
  mv mail_back mail
  reboot
 Did you chmod/chown these directores?
 mv does not move parent UID/GID and mod's.

 --
 I greet
 Wieslaw





RE: problem with /var/mail and procmail

2004-09-27 Thread Francisco Castillo


Hey, i has investigated more:


The /mnt/var/ was an old partition (from a mandrake with another /etc/passwd
distint from now)

when i do a ln -s /mnt/var/mail i has relationed the /mnt/var partition and
the partition from debian in a way that the /var folder of the debian
partition has change and belongs to the come_vie user and not to the root
user, and the same has happended insite the /var folder, it seems that this
problem has made to crash some of my systems, the postfix procmail, the
squirred webmail,

Is there a command to solve this problem?
could it be a chmod root /var - R ? I has trying some things like that, I
has do work the squirred..

Thanks in advance.




 -Mensaje original-
 De: Francisco Castillo [mailto:[EMAIL PROTECTED]
 Enviado el: lunes, 27 de septiembre de 2004 13:28
 Para: debian-isp@lists.debian.org
 Asunto: RE: problem with /var/mail and procmail



 No, i did not chmod this directories,  i only do a mv realy and
 the problem go on. Then i has do a chmod 777 and   i now i has do
 a chmod g+s mail but the problem goes on.

 Francisco.




  -Mensaje original-
  De: Wieslaw [mailto:[EMAIL PROTECTED]
  Enviado el: lunes, 27 de septiembre de 2004 12:44
  Para: Francisco Castillo
  CC: debian-isp@lists.debian.org
  Asunto: Re: problem with /var/mail and procmail
 
 
  Hi
 
   In order to do this i do
  
   cp /var/mail/* /mnt/var/mail
   mv /var/mail /var/mail_back
   cd /var ; ln -s /mnt/var/mail mail
  [..]
   cd /var ; rm mail
   mv mail_back mail
   reboot
  Did you chmod/chown these directores?
  mv does not move parent UID/GID and mod's.
 
  --
  I greet
  Wieslaw
 




Re: problem with /var/mail and procmail

2004-09-27 Thread Michelle Konzack
Am 2004-09-27 13:09:33, schrieb Francisco Castillo:
 
 Hello,
 
 I has forget to say that the permisions where drwxrwsr-x when first was in
 error.
 
 Then i do a chmod 777 but the problem go on.
 
 But what is the chmod command in order to restore the drwxrwsr-x, but this
 will not be the solution, as i explain above.

chmod 2777

 Thanks in advance.


Greetings
Michelle

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/ 
Michelle Konzack   Apt. 917  ICQ #328449886
   50, rue de Soultz MSM LinuxMichi
0033/3/8845235667100 Strasbourg/France   IRC #Debian (irc.icq.com)


signature.pgp
Description: Digital signature


RE: problem with /var/mail and procmail

2004-09-27 Thread Francisco Castillo

Hello, there are more:

The user come_vie has the id 660, this user was in /var/lib/dpkg where i has
see there were postfix files, i has chown root dpkg -R , but the problem
goes on. I has no found more come_vie files owner, but i think there could
be more,

Do you know what is still stopping my mail service? What are this files
come_vie ?

PD. I has restarted postfix, but is not the solution.

Thanks in advance.



 -Mensaje original-
 De: Michelle Konzack [mailto:[EMAIL PROTECTED]
 Enviado el: lunes, 27 de septiembre de 2004 14:03
 Para: debian-isp@lists.debian.org
 Asunto: Re: problem with /var/mail and procmail


 Am 2004-09-27 13:09:33, schrieb Francisco Castillo:
 
  Hello,
 
  I has forget to say that the permisions where drwxrwsr-x when
 first was in
  error.
 
  Then i do a chmod 777 but the problem go on.
 
  But what is the chmod command in order to restore the
 drwxrwsr-x, but this
  will not be the solution, as i explain above.

 chmod 2777

  Thanks in advance.


 Greetings
 Michelle

 --
 Linux-User #280138 with the Linux Counter, http://counter.li.org/
 Michelle Konzack   Apt. 917  ICQ #328449886
50, rue de Soultz MSM LinuxMichi
 0033/3/8845235667100 Strasbourg/France   IRC #Debian (irc.icq.com)





Re: problem with /var/mail and procmail

2004-09-27 Thread Wieslaw
Hi...
when i do a ln -s /mnt/var/mail i has relationed the /mnt/var partition 
and
the partition from debian in a way that the /var folder of the debian
partition has change and belongs to the come_vie user and not to the root
user, and the same has happended insite the /var folder, it seems that 
this
problem has made to crash some of my systems, the postfix procmail, the
squirred webmail,
You should check user's (id login).
I don't know with id mandrake have, but ls -la show everyting :)
Is there a command to solve this problem?
could it be a chmod root /var - R ? I has trying some things like that, I
has do work the squirred..
I think not.
--
I greet
Wieslaw



Re: problem with /var/mail and procmail

2004-09-27 Thread Michelle Konzack
Hello Francisco, 

Am 2004-09-27 14:11:17, schrieb Francisco Castillo:
 
 Hello, there are more:
 
 The user come_vie has the id 660, this user was in /var/lib/dpkg where i has
 see there were postfix files, i has chown root dpkg -R , but the problem
 goes on. I has no found more come_vie files owner, but i think there could
 be more,
 
 Do you know what is still stopping my mail service? What are this files
 come_vie ?

I do not know, but WHY not mounting the patition directly 
in /var/mail. This will solv all problems...

 PD. I has restarted postfix, but is not the solution.
 
 Thanks in advance.

Greetings
Michelle

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/ 
Michelle Konzack   Apt. 917  ICQ #328449886
   50, rue de Soultz MSM LinuxMichi
0033/3/8845235667100 Strasbourg/France   IRC #Debian (irc.icq.com)


signature.pgp
Description: Digital signature


Re: problem with /var/mail and procmail

2004-09-27 Thread Francisco Castillo

Hello,

I has reinstaled postfix and this seems to work. I restore another
applications with files in /var too.

Thanks.


 Hello Francisco,

 Am 2004-09-27 14:11:17, schrieb Francisco Castillo:

 Hello, there are more:

 The user come_vie has the id 660, this user was in /var/lib/dpkg where i
 has
 see there were postfix files, i has chown root dpkg -R , but the problem
 goes on. I has no found more come_vie files owner, but i think there
 could
 be more,

 Do you know what is still stopping my mail service? What are this files
 come_vie ?

 I do not know, but WHY not mounting the patition directly
 in /var/mail. This will solv all problems...

 PD. I has restarted postfix, but is not the solution.

 Thanks in advance.

 Greetings
 Michelle

 --
 Linux-User #280138 with the Linux Counter, http://counter.li.org/
 Michelle Konzack   Apt. 917  ICQ #328449886
50, rue de Soultz MSM LinuxMichi
 0033/3/8845235667100 Strasbourg/France   IRC #Debian (irc.icq.com)




Saludos,
Francisco Castillo.
email: [EMAIL PROTECTED]
http://www.irccrawler.com




Procmail | Maildrop ownership

2004-03-12 Thread Yves Junqueira
Hi.

I am trying to set up a custom behaviour for a spam blocking mail server,
where the mail get redirected to a custom Spam folder in the user's
Maildir folder.

Everything is working fine, except that, when procmail delivers the
message, the ownership is wrongly set to root:

# cat /etc/procmailrc
PATH=/bin:/usr/bin
LOGFILE=$HOME/procmaillog
DEFAULT=$HOME/Maildir/

:0fw: spamassassin.lock
*  256000
| spamc -f -u $LOGNAME

:0:
* ^X-Spam-Status: Yes
$DEFAULT/.Spam/

EOF

 # ls -la ~user/Maildir/.Spam/new/

drwx--2 user  user  4096 Mar 12 09:56 .
drwx--5 user  user 4096 Mar 12 09:56 ..
-rw---1 root mail 4460 Mar 12 09:37
1079095066.4158_2.ares
-rw---1 root mail 8619 Mar 12 09:56
1079096151.4216_2.ares

I suppose this ownership setting is ok for a mbox store, not for a Maildir
format, since the user isnt able to read or modify that message.

So, how can I make procmail deliver that message correctly?  I could make
a script to do that, instead of using the redirection to .Spam/, but is
there a nicer way to do that?

I also had problems making an alternative maildrop sollution. The issue is
that maildrop's xfilter command wont work if the recipient user doesnt
have a valid shell:

# cat /etc/maildroprc
DEFAULT=$HOME/Maildir
# exception commented so I could see the error log
#exception {
xfilter /usr/bin/spamc -f -u $RECIPIENT
#}
if (/^X-Spam-Flag: YES/)
{
to Maildir/.Spam
}

EOF

It would work fine, except that when the recipient user does not have a
valid shell account, it exists with the following error (when I am not
using the 'exception' block):

BAF555886: to=[EMAIL PROTECTED], relay=local, delay=0, status=deferred
(temporary failure. Command output: maildrop: error writing to filter.
/usr/bin/maildrop: Unable to filter message. )


I suppose xfilter calls the user's shell. Is there any other way to filter
messages without this requirement?

Is using an 'smtp' content filter in the MTA (postfix) a better option?
The sollutions I've seen use 'spamassassin' instead of 'spamc', that is
the method I prefer...

Thanks in advance,

Yves

-- 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Procmail | Maildrop ownership

2004-03-12 Thread Frode Haugsgjerd
On Fri, Mar 12, 2004 at 11:24:50AM -0300, Yves Junqueira wrote:
 Hi.
 
 I am trying to set up a custom behaviour for a spam blocking mail server,
 where the mail get redirected to a custom Spam folder in the user's
 Maildir folder.
 
 Everything is working fine, except that, when procmail delivers the
 message, the ownership is wrongly set to root:

How is procmail invoked? What versions of what software is involved?
I use postfix 2.0.16, and /etc/postfix/main.cf contains this line:
mailbox_command = procmail -a $EXTENSION
Then procmail will run as the recipient.
I don't use global /etc/procmailrc , but .procmailrc in homedir instead.

 
 # cat /etc/procmailrc
 PATH=/bin:/usr/bin
 LOGFILE=$HOME/procmaillog
 DEFAULT=$HOME/Maildir/
 
 :0fw: spamassassin.lock
 *  256000
 | spamc -f -u $LOGNAME

What version of spamassasin are you running?
I use 2.63, and have ommittef the -u flag, spamc runs as the same user as parent 
(procmail) 

 
 :0:
 * ^X-Spam-Status: Yes
 $DEFAULT/.Spam/
 
 EOF
 
  # ls -la ~user/Maildir/.Spam/new/
 
 drwx--2 user  user  4096 Mar 12 09:56 .
 drwx--5 user  user 4096 Mar 12 09:56 ..
 -rw---1 root mail 4460 Mar 12 09:37
 1079095066.4158_2.ares
 -rw---1 root mail 8619 Mar 12 09:56
 1079096151.4216_2.ares
 
 I suppose this ownership setting is ok for a mbox store, not for a Maildir
 format, since the user isnt able to read or modify that message.
 
 So, how can I make procmail deliver that message correctly?  I could make
 a script to do that, instead of using the redirection to .Spam/, but is
 there a nicer way to do that?
 
 I also had problems making an alternative maildrop sollution. The issue is
 that maildrop's xfilter command wont work if the recipient user doesnt
 have a valid shell:
 
 # cat /etc/maildroprc
 DEFAULT=$HOME/Maildir
 # exception commented so I could see the error log
 #exception {
 xfilter /usr/bin/spamc -f -u $RECIPIENT
 #}
 if (/^X-Spam-Flag: YES/)
 {
 to Maildir/.Spam
 }
 
 EOF
 
 It would work fine, except that when the recipient user does not have a
 valid shell account, it exists with the following error (when I am not
 using the 'exception' block):
 
 BAF555886: to=[EMAIL PROTECTED], relay=local, delay=0, status=deferred
 (temporary failure. Command output: maildrop: error writing to filter.
 /usr/bin/maildrop: Unable to filter message. )
 
 
 I suppose xfilter calls the user's shell. Is there any other way to filter
 messages without this requirement?
 
 Is using an 'smtp' content filter in the MTA (postfix) a better option?
 The sollutions I've seen use 'spamassassin' instead of 'spamc', that is
 the method I prefer...
 
 Thanks in advance,
 
 Yves
 

--
Frode Haugsgjerd
Norway


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Procmail | Maildrop ownership

2004-03-12 Thread Yves Junqueira
Hi.

I am trying to set up a custom behaviour for a spam blocking mail server,
where the mail get redirected to a custom Spam folder in the user's
Maildir folder.

Everything is working fine, except that, when procmail delivers the
message, the ownership is wrongly set to root:

# cat /etc/procmailrc
PATH=/bin:/usr/bin
LOGFILE=$HOME/procmaillog
DEFAULT=$HOME/Maildir/

:0fw: spamassassin.lock
*  256000
| spamc -f -u $LOGNAME

:0:
* ^X-Spam-Status: Yes
$DEFAULT/.Spam/

EOF

 # ls -la ~user/Maildir/.Spam/new/

drwx--2 user  user  4096 Mar 12 09:56 .
drwx--5 user  user 4096 Mar 12 09:56 ..
-rw---1 root mail 4460 Mar 12 09:37
1079095066.4158_2.ares
-rw---1 root mail 8619 Mar 12 09:56
1079096151.4216_2.ares

I suppose this ownership setting is ok for a mbox store, not for a Maildir
format, since the user isnt able to read or modify that message.

So, how can I make procmail deliver that message correctly?  I could make
a script to do that, instead of using the redirection to .Spam/, but is
there a nicer way to do that?

I also had problems making an alternative maildrop sollution. The issue is
that maildrop's xfilter command wont work if the recipient user doesnt
have a valid shell:

# cat /etc/maildroprc
DEFAULT=$HOME/Maildir
# exception commented so I could see the error log
#exception {
xfilter /usr/bin/spamc -f -u $RECIPIENT
#}
if (/^X-Spam-Flag: YES/)
{
to Maildir/.Spam
}

EOF

It would work fine, except that when the recipient user does not have a
valid shell account, it exists with the following error (when I am not
using the 'exception' block):

BAF555886: to=[EMAIL PROTECTED], relay=local, delay=0, status=deferred
(temporary failure. Command output: maildrop: error writing to filter.
/usr/bin/maildrop: Unable to filter message. )


I suppose xfilter calls the user's shell. Is there any other way to filter
messages without this requirement?

Is using an 'smtp' content filter in the MTA (postfix) a better option?
The sollutions I've seen use 'spamassassin' instead of 'spamc', that is
the method I prefer...

Thanks in advance,

Yves

-- 




Re: Procmail | Maildrop ownership

2004-03-12 Thread Frode Haugsgjerd
On Fri, Mar 12, 2004 at 11:24:50AM -0300, Yves Junqueira wrote:
 Hi.
 
 I am trying to set up a custom behaviour for a spam blocking mail server,
 where the mail get redirected to a custom Spam folder in the user's
 Maildir folder.
 
 Everything is working fine, except that, when procmail delivers the
 message, the ownership is wrongly set to root:

How is procmail invoked? What versions of what software is involved?
I use postfix 2.0.16, and /etc/postfix/main.cf contains this line:
mailbox_command = procmail -a $EXTENSION
Then procmail will run as the recipient.
I don't use global /etc/procmailrc , but .procmailrc in homedir instead.

 
 # cat /etc/procmailrc
 PATH=/bin:/usr/bin
 LOGFILE=$HOME/procmaillog
 DEFAULT=$HOME/Maildir/
 
 :0fw: spamassassin.lock
 *  256000
 | spamc -f -u $LOGNAME

What version of spamassasin are you running?
I use 2.63, and have ommittef the -u flag, spamc runs as the same user as 
parent (procmail) 

 
 :0:
 * ^X-Spam-Status: Yes
 $DEFAULT/.Spam/
 
 EOF
 
  # ls -la ~user/Maildir/.Spam/new/
 
 drwx--2 user  user  4096 Mar 12 09:56 .
 drwx--5 user  user 4096 Mar 12 09:56 ..
 -rw---1 root mail 4460 Mar 12 09:37
 1079095066.4158_2.ares
 -rw---1 root mail 8619 Mar 12 09:56
 1079096151.4216_2.ares
 
 I suppose this ownership setting is ok for a mbox store, not for a Maildir
 format, since the user isnt able to read or modify that message.
 
 So, how can I make procmail deliver that message correctly?  I could make
 a script to do that, instead of using the redirection to .Spam/, but is
 there a nicer way to do that?
 
 I also had problems making an alternative maildrop sollution. The issue is
 that maildrop's xfilter command wont work if the recipient user doesnt
 have a valid shell:
 
 # cat /etc/maildroprc
 DEFAULT=$HOME/Maildir
 # exception commented so I could see the error log
 #exception {
 xfilter /usr/bin/spamc -f -u $RECIPIENT
 #}
 if (/^X-Spam-Flag: YES/)
 {
 to Maildir/.Spam
 }
 
 EOF
 
 It would work fine, except that when the recipient user does not have a
 valid shell account, it exists with the following error (when I am not
 using the 'exception' block):
 
 BAF555886: to=[EMAIL PROTECTED], relay=local, delay=0, status=deferred
 (temporary failure. Command output: maildrop: error writing to filter.
 /usr/bin/maildrop: Unable to filter message. )
 
 
 I suppose xfilter calls the user's shell. Is there any other way to filter
 messages without this requirement?
 
 Is using an 'smtp' content filter in the MTA (postfix) a better option?
 The sollutions I've seen use 'spamassassin' instead of 'spamc', that is
 the method I prefer...
 
 Thanks in advance,
 
 Yves
 

--
Frode Haugsgjerd
Norway




Re: Postfix-mysql-procmail

2004-01-11 Thread Russell Coker
On Sun, 11 Jan 2004 14:50, Stephen Gran [EMAIL PROTECTED] wrote:
 This one time, at band camp, Russell Coker said:
  Another option is to receive the entire message, accept it for delivery
  but instead of a 25x give a 55x code with a message saying this message
  was delivered, but please note that the account holder is on vacation.
 
  These methods should allow the vacation message to reliably go only to
  the originator of the message (or to no-one if it's a spam).  However
  they do require that a new proxy program be written to receive the mail
  as no existing software (AFAIK) is capable of doing it.

 I think you can do something like this with /etc/aliases, although I am
 no expert.  exim uses a real-$local_part in the standard configuration
 to bypass aliasing, so an entry could be added like:

Neither /etc/aliases nor procmail allows a custom 55x code to be sent.

A bounce (as used in your example) is undesirable in the case of spam and 
viruses.  It makes your machine the cause of problems, which then results in 
other people causing problems for you.

-- 
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Postfix-mysql-procmail

2004-01-11 Thread Stephen Gran
This one time, at band camp, Russell Coker said:
 Neither /etc/aliases nor procmail allows a custom 55x code to be sent.
 
 A bounce (as used in your example) is undesirable in the case of spam and 
 viruses.  It makes your machine the cause of problems, which then results 
 in other people causing problems for you.

Hmm, it seems you're right.  It doesn't generate a bounce, but it does
550 - just too early (at the rcpt rather than data stage). Apparently it
generated a bounce because I was using mail, which I guess calls exim as
sendmail, rather than with smtp, so it behaves slightly differently.

Here is a telnet session with the same configuration, coming from another 
machine:

steve:~$ telnet mercury 25
Trying 216.158.52.98...
Connected to mail.lobefin.net.
Escape character is '^]'.
220 mail.lobefin.net ESMTP Exim 4.30 Sun, 11 Jan 2004 11:56:48 -0500
ehlo busybox
250-mail.lobefin.net Hello www.lobefin.net [216.158.52.108]
250-SIZE 52428800
250-PIPELINING
250-AUTH LOGIN PLAIN
250-STARTTLS
250 HELP
mail from: [EMAIL PROTECTED]
250 OK
rcpt to: [EMAIL PROTECTED]
550 unknown user

And the corresponding log line:

2004-01-11 11:57:08 H=www.lobefin.net (busybox) [216.158.52.108] F=[EMAIL PROTECTED] 
rejected RCPT [EMAIL PROTECTED]: on vacation 

It does _not_ work as well as I had hoped, but it at least does generate
a 550, rahter than a bounce.  Back to the drawing board.
-- 
 -
|   ,''`.Stephen Gran |
|  : :' :[EMAIL PROTECTED] |
|  `. `'Debian user, admin, and developer |
|`- http://www.debian.org |
 -


pgp0.pgp
Description: PGP signature


Re: Postfix-mysql-procmail

2004-01-11 Thread Thomas Lamy
Fraser Campbell wrote:

On January 10, 2004 09:17 am, Robert Hensel wrote:


I currently have a properly working postfix-mysql setup. This all works
fine, but I would like to implement an autoresponder/other stuff. The
problem is, that for example procmail doesn't seem to work with virtual
users. I have added mailbox_command = /usr/bin/procmail . But this
line is completely ignored :(
Maybe someone here can help me avoid writing ugly bash scripts to do the
job ;)


The virtual delivery agent doesn't support procmail, .forward files, etc.  I 
believe you have no choice but to do some scripting (it can be ugly if you 
insist ;-)

I'll assume that your talking about an email setup similar to the one 
described at http://kirb.insanegenius.net/postfix.html ?

The only way that I can think of to do things like mail filtering, out of 
office, etc. is by having a virtual map entry that forwards the email to an 
alias as well as to the original user:

[EMAIL PROTECTED]		[EMAIL PROTECTED],fraser-filters

In the aliases file (which could be managed in mysql still) you would have the 
alias fraser-filters pipe to a command that does whatever magic you need.  
This might already be what you were thinking of?

I haven't tried this but it's the easiest way that I can think of supporting 
mail filtering, out of office and such.  You can also write postfix filters 
which might have advantages.

If you find anything please followup here as it's something I think a lot of 
people might be interested in.

Being through this, I'd like to add my 0.02 EUR.

I have a handful of servers set up with postfix, mysql, amavisd-new, 
spamassassin, and a home-brew administration interface in PHP.
I'm in the process of adding per-user support for:
- auto-replies (out of office, your mail has been received etc)
- auto-copy to antoher user
- auto-forward to another user (both for users on vacation)

I did the first version in PHP (as I already had a function that got me 
the final recipient mailbox), triggered by postfix's always_bcc 
parameter. This basically does the job, but at the cost of loosing the 
for: xxx component in the Received: header, which I also need for 
antoher component (the maillog scanner).

To make a long story short, the technically correct way is to do this 
via content-filtering. I'm not through with this, so this is the 
untested picture I have in my head for this issue. I'll post an 
announcement here when I'm through this.

A configuration example (not tested; and note I also use amavisd-new):

main.cf:
# Filter mail through amavisd-new first
content_filter = smtp:[localhost]:10024
master.cf:
localhost:10025 \
  inet  n   -   -   -   -   \
  smtpd -o content_filter=vacation
localhost:10026 \
  inet  n   -   -   -   -   \
  smtpd -o content_filter=
vacation unix n - - - - pipe user=nobody \
  argv=/usr/local/bin/my-vacation ${sender} ${recipient}
/usr/local/bin/my-vacation should handle all that vacation/forwarding 
stuff (_and_ should honor Precedence: bulk and Precedence: list 
headers properly!!!). If the mail should get to the original receiver, 
it is handed over to postfix via SMTP on port 10026. For best 
throughput, my-vacation should be a smtp-based client/server (like 
amavisd-new is).

So the mail flow will be:

internet
   |
Postfix (smtp on port 25)
   |
amavisd-new (smtp port 10024)
   |
Postfix (smtp port 10025)
   |
my-vacation (pipe) ---+
   |  |   |
Postfix (smtp port 10026)Postfix (smtp port 25)  Postfix (smtp 25)
(to original receiver)   (cc or forward) (response)
Thomas

--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]


Re: Postfix-mysql-procmail

2004-01-11 Thread Stephen Gran
This one time, at band camp, Russell Coker said:
 Neither /etc/aliases nor procmail allows a custom 55x code to be sent.
 
 A bounce (as used in your example) is undesirable in the case of spam and 
 viruses.  It makes your machine the cause of problems, which then results 
 in other people causing problems for you.

Hmm, it seems you're right.  It doesn't generate a bounce, but it does
550 - just too early (at the rcpt rather than data stage). Apparently it
generated a bounce because I was using mail, which I guess calls exim as
sendmail, rather than with smtp, so it behaves slightly differently.

Here is a telnet session with the same configuration, coming from another 
machine:

steve:~$ telnet mercury 25
Trying 216.158.52.98...
Connected to mail.lobefin.net.
Escape character is '^]'.
220 mail.lobefin.net ESMTP Exim 4.30 Sun, 11 Jan 2004 11:56:48 -0500
ehlo busybox
250-mail.lobefin.net Hello www.lobefin.net [216.158.52.108]
250-SIZE 52428800
250-PIPELINING
250-AUTH LOGIN PLAIN
250-STARTTLS
250 HELP
mail from: [EMAIL PROTECTED]
250 OK
rcpt to: [EMAIL PROTECTED]
550 unknown user

And the corresponding log line:

2004-01-11 11:57:08 H=www.lobefin.net (busybox) [216.158.52.108] F=[EMAIL 
PROTECTED] rejected RCPT [EMAIL PROTECTED]: on vacation 

It does _not_ work as well as I had hoped, but it at least does generate
a 550, rahter than a bounce.  Back to the drawing board.
-- 
 -
|   ,''`.Stephen Gran |
|  : :' :[EMAIL PROTECTED] |
|  `. `'Debian user, admin, and developer |
|`- http://www.debian.org |
 -


pgptMZ4XZXKGY.pgp
Description: PGP signature


Re: Postfix-mysql-procmail

2004-01-11 Thread Russell Coker
On Sun, 11 Jan 2004 14:50, Stephen Gran [EMAIL PROTECTED] wrote:
 This one time, at band camp, Russell Coker said:
  Another option is to receive the entire message, accept it for delivery
  but instead of a 25x give a 55x code with a message saying this message
  was delivered, but please note that the account holder is on vacation.
 
  These methods should allow the vacation message to reliably go only to
  the originator of the message (or to no-one if it's a spam).  However
  they do require that a new proxy program be written to receive the mail
  as no existing software (AFAIK) is capable of doing it.

 I think you can do something like this with /etc/aliases, although I am
 no expert.  exim uses a real-$local_part in the standard configuration
 to bypass aliasing, so an entry could be added like:

Neither /etc/aliases nor procmail allows a custom 55x code to be sent.

A bounce (as used in your example) is undesirable in the case of spam and 
viruses.  It makes your machine the cause of problems, which then results in 
other people causing problems for you.

-- 
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page




Postfix-mysql-procmail

2004-01-10 Thread Robert Hensel
Hello,

I currently have a properly working postfix-mysql setup. This all works 
fine, but I would like to implement an autoresponder/other stuff. The 
problem is, that for example procmail doesn't seem to work with virtual 
users. I have added mailbox_command = /usr/bin/procmail . But this 
line is completely ignored :(

Maybe someone here can help me avoid writing ugly bash scripts to do the 
job ;)

Thanks in advance,
Robert


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]


Re: Postfix-mysql-procmail

2004-01-10 Thread Frode Haugsgjerd
On Sat, Jan 10, 2004 at 03:17:16PM +0100, Robert Hensel wrote:
 Hello,
 
 I currently have a properly working postfix-mysql setup. This all works 
 fine, but I would like to implement an autoresponder/other stuff. The 
 problem is, that for example procmail doesn't seem to work with virtual 
 users. I have added mailbox_command = /usr/bin/procmail . But this 
 line is completely ignored :(
 
 Maybe someone here can help me avoid writing ugly bash scripts to do the 
 job ;)
 
 Thanks in advance,
 Robert


I have no experience with virtual users in mysql, but when switching
from exim, i found that postfix consults .forward before .procmailrc
And I'm not sure if procmail supports this setup.

--
Frode Haugsgjerd
Norway


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Postfix-mysql-procmail

2004-01-10 Thread Fraser Campbell
On January 10, 2004 09:17 am, Robert Hensel wrote:

 I currently have a properly working postfix-mysql setup. This all works
 fine, but I would like to implement an autoresponder/other stuff. The
 problem is, that for example procmail doesn't seem to work with virtual
 users. I have added mailbox_command = /usr/bin/procmail . But this
 line is completely ignored :(

 Maybe someone here can help me avoid writing ugly bash scripts to do the
 job ;)

The virtual delivery agent doesn't support procmail, .forward files, etc.  I 
believe you have no choice but to do some scripting (it can be ugly if you 
insist ;-)

I'll assume that your talking about an email setup similar to the one 
described at http://kirb.insanegenius.net/postfix.html ?

The only way that I can think of to do things like mail filtering, out of 
office, etc. is by having a virtual map entry that forwards the email to an 
alias as well as to the original user:

[EMAIL PROTECTED]   [EMAIL PROTECTED],fraser-filters

In the aliases file (which could be managed in mysql still) you would have the 
alias fraser-filters pipe to a command that does whatever magic you need.  
This might already be what you were thinking of?

I haven't tried this but it's the easiest way that I can think of supporting 
mail filtering, out of office and such.  You can also write postfix filters 
which might have advantages.

If you find anything please followup here as it's something I think a lot of 
people might be interested in.

-- 
Fraser Campbell [EMAIL PROTECTED] http://www.wehave.net/
Georgetown, Ontario, Canada   Debian GNU/Linux


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Postfix-mysql-procmail

2004-01-10 Thread Russell Coker
On Sun, 11 Jan 2004 01:17, Robert Hensel [EMAIL PROTECTED] wrote:
 I currently have a properly working postfix-mysql setup. This all works
 fine, but I would like to implement an autoresponder/other stuff. The
 problem is, that for example procmail doesn't seem to work with virtual
 users. I have added mailbox_command = /usr/bin/procmail . But this
 line is completely ignored :(

The most important thing about auto-responders is that they implement the 
regex described in procmailrc(5) as FROM_DAEMON.  If you do this by scripts 
then make sure that the script does such a regular expression check.  
Otherwise you will inevitably end up with people forgetting to unsubscribe 
from mailing lists and sending vacation messages to every person who posts to 
the list (thus getting you lots of flames).

Also think very carefully about whether you want an auto-responder, it will 
respond to spam and send messages to innocent third parties.  Such a program 
can easily get you hundreds of flames per hour...

I've been thinking about alternate solutions to this problem.  One option is 
to send a 45x code in response to the message (determined by combination of 
mail from: and rcpt to:) for a period of 4 hours with a message about why 
the mail is being diverted etc, then accepting it after that.  4 hours is 
enough time for most mail servers to generate a warning email based on the 
45x code.

Another option is to receive the entire message, accept it for delivery but 
instead of a 25x give a 55x code with a message saying this message was 
delivered, but please note that the account holder is on vacation.

These methods should allow the vacation message to reliably go only to the 
originator of the message (or to no-one if it's a spam).  However they do 
require that a new proxy program be written to receive the mail as no 
existing software (AFAIK) is capable of doing it.

-- 
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Postfix-mysql-procmail

2004-01-10 Thread Stephen Gran
This one time, at band camp, Russell Coker said:
 Another option is to receive the entire message, accept it for delivery but 
 instead of a 25x give a 55x code with a message saying this message was 
 delivered, but please note that the account holder is on vacation.
 
 These methods should allow the vacation message to reliably go only to the 
 originator of the message (or to no-one if it's a spam).  However they do 
 require that a new proxy program be written to receive the mail as no 
 existing software (AFAIK) is capable of doing it.

I think you can do something like this with /etc/aliases, although I am
no expert.  exim uses a real-$local_part in the standard configuration
to bypass aliasing, so an entry could be added like:

testuser: real-testuser, :fail: On vacation

Just tested and this is what I see:
2004-01-10 22:44:23 1AfWWV-dZ-Mc = [EMAIL PROTECTED] U=steve P=local S=313 
  I send the message with mail
2004-01-10 22:44:23 1AfWWV-dZ-Mc ** [EMAIL PROTECTED] R=system_aliases:
  It generates an error
2004-01-10 22:44:23 1AfWWV-dZ-Mc = testuser [EMAIL PROTECTED] R=real_local 
T=maildir_home 
  And then gets really deliverd to testuse
2004-01-10 22:44:23 1AfWWV-dc-Rh =  R=1AfWWV-dZ-Mc U=Debian-exim P=local 
S=1102 
2004-01-10 22:44:23 1AfWWV-dZ-Mc Completed 
2004-01-10 22:44:24 1AfWWV-dc-Rh = steve [EMAIL PROTECTED] R=procmail 
T=procmail_pipe 
2004-01-10 22:44:24 1AfWWV-dc-Rh Completed 
  And the bounce goes to me with the text noted.

I don't know what your MTA allows, but this works here.

HTH,
-- 
 -
|   ,''`.Stephen Gran |
|  : :' :[EMAIL PROTECTED] |
|  `. `'Debian user, admin, and developer |
|`- http://www.debian.org |
 -


pgp0.pgp
Description: PGP signature


Postfix-mysql-procmail

2004-01-10 Thread Robert Hensel
Hello,
I currently have a properly working postfix-mysql setup. This all works 
fine, but I would like to implement an autoresponder/other stuff. The 
problem is, that for example procmail doesn't seem to work with virtual 
users. I have added mailbox_command = /usr/bin/procmail . But this 
line is completely ignored :(

Maybe someone here can help me avoid writing ugly bash scripts to do the 
job ;)

Thanks in advance,
Robert



Re: Postfix-mysql-procmail

2004-01-10 Thread Frode Haugsgjerd
On Sat, Jan 10, 2004 at 03:17:16PM +0100, Robert Hensel wrote:
 Hello,
 
 I currently have a properly working postfix-mysql setup. This all works 
 fine, but I would like to implement an autoresponder/other stuff. The 
 problem is, that for example procmail doesn't seem to work with virtual 
 users. I have added mailbox_command = /usr/bin/procmail . But this 
 line is completely ignored :(
 
 Maybe someone here can help me avoid writing ugly bash scripts to do the 
 job ;)
 
 Thanks in advance,
 Robert


I have no experience with virtual users in mysql, but when switching
from exim, i found that postfix consults .forward before .procmailrc
And I'm not sure if procmail supports this setup.

--
Frode Haugsgjerd
Norway




Re: Postfix-mysql-procmail

2004-01-10 Thread Fraser Campbell
On January 10, 2004 09:17 am, Robert Hensel wrote:

 I currently have a properly working postfix-mysql setup. This all works
 fine, but I would like to implement an autoresponder/other stuff. The
 problem is, that for example procmail doesn't seem to work with virtual
 users. I have added mailbox_command = /usr/bin/procmail . But this
 line is completely ignored :(

 Maybe someone here can help me avoid writing ugly bash scripts to do the
 job ;)

The virtual delivery agent doesn't support procmail, .forward files, etc.  I 
believe you have no choice but to do some scripting (it can be ugly if you 
insist ;-)

I'll assume that your talking about an email setup similar to the one 
described at http://kirb.insanegenius.net/postfix.html ?

The only way that I can think of to do things like mail filtering, out of 
office, etc. is by having a virtual map entry that forwards the email to an 
alias as well as to the original user:

[EMAIL PROTECTED]   [EMAIL PROTECTED],fraser-filters

In the aliases file (which could be managed in mysql still) you would have the 
alias fraser-filters pipe to a command that does whatever magic you need.  
This might already be what you were thinking of?

I haven't tried this but it's the easiest way that I can think of supporting 
mail filtering, out of office and such.  You can also write postfix filters 
which might have advantages.

If you find anything please followup here as it's something I think a lot of 
people might be interested in.

-- 
Fraser Campbell [EMAIL PROTECTED] http://www.wehave.net/
Georgetown, Ontario, Canada   Debian GNU/Linux




Re: Postfix-mysql-procmail

2004-01-10 Thread Russell Coker
On Sun, 11 Jan 2004 01:17, Robert Hensel [EMAIL PROTECTED] wrote:
 I currently have a properly working postfix-mysql setup. This all works
 fine, but I would like to implement an autoresponder/other stuff. The
 problem is, that for example procmail doesn't seem to work with virtual
 users. I have added mailbox_command = /usr/bin/procmail . But this
 line is completely ignored :(

The most important thing about auto-responders is that they implement the 
regex described in procmailrc(5) as FROM_DAEMON.  If you do this by scripts 
then make sure that the script does such a regular expression check.  
Otherwise you will inevitably end up with people forgetting to unsubscribe 
from mailing lists and sending vacation messages to every person who posts to 
the list (thus getting you lots of flames).

Also think very carefully about whether you want an auto-responder, it will 
respond to spam and send messages to innocent third parties.  Such a program 
can easily get you hundreds of flames per hour...

I've been thinking about alternate solutions to this problem.  One option is 
to send a 45x code in response to the message (determined by combination of 
mail from: and rcpt to:) for a period of 4 hours with a message about why 
the mail is being diverted etc, then accepting it after that.  4 hours is 
enough time for most mail servers to generate a warning email based on the 
45x code.

Another option is to receive the entire message, accept it for delivery but 
instead of a 25x give a 55x code with a message saying this message was 
delivered, but please note that the account holder is on vacation.

These methods should allow the vacation message to reliably go only to the 
originator of the message (or to no-one if it's a spam).  However they do 
require that a new proxy program be written to receive the mail as no 
existing software (AFAIK) is capable of doing it.

-- 
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page




Re: Postfix-mysql-procmail

2004-01-10 Thread Stephen Gran
This one time, at band camp, Russell Coker said:
 Another option is to receive the entire message, accept it for delivery but 
 instead of a 25x give a 55x code with a message saying this message was 
 delivered, but please note that the account holder is on vacation.
 
 These methods should allow the vacation message to reliably go only to the 
 originator of the message (or to no-one if it's a spam).  However they do 
 require that a new proxy program be written to receive the mail as no 
 existing software (AFAIK) is capable of doing it.

I think you can do something like this with /etc/aliases, although I am
no expert.  exim uses a real-$local_part in the standard configuration
to bypass aliasing, so an entry could be added like:

testuser: real-testuser, :fail: On vacation

Just tested and this is what I see:
2004-01-10 22:44:23 1AfWWV-dZ-Mc = [EMAIL PROTECTED] U=steve P=local S=313 
  I send the message with mail
2004-01-10 22:44:23 1AfWWV-dZ-Mc ** [EMAIL PROTECTED] R=system_aliases:
  It generates an error
2004-01-10 22:44:23 1AfWWV-dZ-Mc = testuser [EMAIL PROTECTED] 
R=real_local T=maildir_home 
  And then gets really deliverd to testuse
2004-01-10 22:44:23 1AfWWV-dc-Rh =  R=1AfWWV-dZ-Mc U=Debian-exim 
P=local S=1102 
2004-01-10 22:44:23 1AfWWV-dZ-Mc Completed 
2004-01-10 22:44:24 1AfWWV-dc-Rh = steve [EMAIL PROTECTED] R=procmail 
T=procmail_pipe 
2004-01-10 22:44:24 1AfWWV-dc-Rh Completed 
  And the bounce goes to me with the text noted.

I don't know what your MTA allows, but this works here.

HTH,
-- 
 -
|   ,''`.Stephen Gran |
|  : :' :[EMAIL PROTECTED] |
|  `. `'Debian user, admin, and developer |
|`- http://www.debian.org |
 -


pgpOKeLhaeWsS.pgp
Description: PGP signature


Postfix + Quota (+ procmail?)

2003-09-08 Thread R.M. Evers
Hello,

I've been researching what would be our best option for converting our
old Redhat mailserver with Sendmail to something better. I'm not exactly
a Linux guru, though I'm no newbie either. Finally, I've decided to use
Debian Woody, with the following setup:

/dev/hda1 - /boot
/dev/hda2 - /
/dev/hda3 - /home

- Postfix delivering to Maildir (from stable)
- Courier POP3(S) / IMAP(S) (from stable)
- Spamassassin (from unstable)
- Amavisd / Clamav-daemon (from unstable)

A user's Maildir is ~/Maildir and I've setup quota on /home (soft: 5MB,
hard: 10MB). I've written the scripts to convert the old mboxes to the
new Maildir format etc. Everything seems to work fine, except for this
little problem I found today.

When a user is over his soft quotum and I try to send a mail with an
attachment which will bring the user over his hard quotum on /home,
Postfix accepts the email. Then, a part of the email is written to the
user's Maildir until the hard quotum is reached, and things stop. So,
now I'm left with a user who has a partial email/attachment and no more
disk space. Additionally, the mail is stored/kept in the user's mbox
(/var/mail/user, where there is no quotum). When the user cleans up his
account, the mail never gets delivered properly, and the sender gets no
notification that something went wrong. The daily warnquota email is
received as a 0-byte email by the user, because the hard limit is
reached. I don't know what could be causing this (postfix or procmail?).
Another thing I don't understand, is that whenever I send an email to a
user who is below his soft limit, and which will bring the user over his
hard limit at once, Ximian Evolution nicely reports to me that the
sending failed, because the storage limit is exceeded. In that case,
nothing gets delivered, which probably is what I want.

So I'm wondering: what could be wrong with my setup?

I get the idea that i should maybe get out the procmail part of the
configuration. But I could only get Spamassassin to work via procmail..
I believe it should be possble to get it to work via Amavis, but I don't
know how..

I'll include some of my config files. If more information is required,
just let me know.. Any help would be greatly appreciated!


** /etc/postfix/main.cf **

command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
program_directory = /usr/lib/postfix
smtpd_banner = $myhostname ESMTP
setgid_group = postdrop
biff = no
append_dot_mydomain = no
myhostname = mail2.hbh-it.net
alias_maps = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mail.hbh-it.net, localhost.hbh-it.net, , localhost
relayhost = 
mynetworks = 127.0.0.0/8 hash:/var/lib/pop-before-smtp/hosts
mailbox_command = procmail -a $EXTENSION
mailbox_size_limit = 0
recipient_delimiter = +
home_mailbox = Maildir/
virtual_maps = hash:/etc/postfix/virtual
smtpd_tls_key_file = /etc/postfix/mail-postfix.key
smtpd_tls_cert_file = /etc/postfix/mail-postfix.crt
smtpd_use_tls = yes
smtpd_helo_required = yes
disable_vrfy_command = yes
maps_rbl_domains =
  relays.ordb.org,
  opm.blitzed.org,
  list.dsbl.org,
  sbl.spamhaus.org,
  blackholes.easynet.nl,
  cbl.abuseat.org
smtpd_recipient_restrictions =
  reject_invalid_hostname,
  reject_non_fqdn_sender,
  reject_non_fqdn_recipient,
  reject_unknown_sender_domain,
  reject_unknown_recipient_domain,
  reject_unauth_pipelining,
  permit_sasl_authenticated,
  permit_mynetworks,
  reject_unauth_destination,
  reject_maps_rbl,
  permit
content_filter = smtp-amavis:[127.0.0.1]:10024


** /etc/postfix/master.cf **

# i've added the following 2 lines:
smtp-amavis unix -  -   n   -   2   smtp  -o
smtp_data_done_timeout=1200 -o disable_dns_lookups=yes

127.0.0.1:10025 inet n  -   n   -   -   smtpd -o
content_filter= -o local_recipient_maps= -o relay_recipient_maps= -o
smtpd_restriction_classes= -o smtpd_client_restrictions= -o
smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o
smtpd_recipient_restrictions=permit_mynetworks,reject -o
mynetworks=127.0.0.0/8 -o strict_rfc821_envelopes=yes


** /etc/procmailrc **

DROPPRIVS=yes
SHELL=/bin/bash
MAILDIR=$HOME/Maildir
DEFAULT=$MAILDIR/new
:0fw
*  5
| /usr/bin/spamc


-- 
R.M. Evers [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Postfix + Quota (+ procmail?)

2003-09-08 Thread Emmanuel Lacour
On Mon, Sep 08, 2003 at 10:47:07AM +0200, R.M. Evers wrote:
 Hello,
 
 I've been researching what would be our best option for converting our
 old Redhat mailserver with Sendmail to something better. I'm not exactly
 a Linux guru, though I'm no newbie either. Finally, I've decided to use
 Debian Woody, with the following setup:
 
 /dev/hda1 - /boot
 /dev/hda2 - /
 /dev/hda3 - /home
 
 - Postfix delivering to Maildir (from stable)
 - Courier POP3(S) / IMAP(S) (from stable)
 - Spamassassin (from unstable)
 - Amavisd / Clamav-daemon (from unstable)
 
 A user's Maildir is ~/Maildir and I've setup quota on /home (soft: 5MB,
 hard: 10MB). I've written the scripts to convert the old mboxes to the
 new Maildir format etc. Everything seems to work fine, except for this
 little problem I found today.
 
 When a user is over his soft quotum and I try to send a mail with an
 attachment which will bring the user over his hard quotum on /home,
 Postfix accepts the email. Then, a part of the email is written to the
 user's Maildir until the hard quotum is reached, and things stop. So,
 now I'm left with a user who has a partial email/attachment and no more
 disk space. Additionally, the mail is stored/kept in the user's mbox
 (/var/mail/user, where there is no quotum). When the user cleans up his
 account, the mail never gets delivered properly, and the sender gets no
 notification that something went wrong. The daily warnquota email is
 received as a 0-byte email by the user, because the hard limit is
 reached. I don't know what could be causing this (postfix or procmail?).
 Another thing I don't understand, is that whenever I send an email to a
 user who is below his soft limit, and which will bring the user over his
 hard limit at once, Ximian Evolution nicely reports to me that the
 sending failed, because the storage limit is exceeded. In that case,
 nothing gets delivered, which probably is what I want.
 
 So I'm wondering: what could be wrong with my setup?
 
 I get the idea that i should maybe get out the procmail part of the
 configuration. But I could only get Spamassassin to work via procmail..
 I believe it should be possble to get it to work via Amavis, but I don't
 know how..
 

Maybe replace procmail with maildrop and use soft maildir quotas (I got
this working on a server). Alternatively you can use the virtual
delivery to use soft maildir quotas, but I don't known how to enable
spamassassin in this case (maybe a global postfix filter).

http://www.inter7.com/courierimap/README.maildirquota.html
http://www.flounder.net/~mrsam/maildrop/
http://www.oav.net/vda/

-- 
Emmanuel Lacour  Easter-eggs
44-46 rue de l'Ouest  -  75014 Paris   -   France -  Métro Gaité
Phone: +33 (0) 1 43 35 00 37- Fax: +33 (0) 1 41 35 00 76
mailto:[EMAIL PROTECTED]   -http://www.easter-eggs.com


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Postfix + Quota (+ procmail?)

2003-09-08 Thread R.M. Evers
On Mon, 2003-09-08 at 11:18, Emmanuel Lacour wrote:
 On Mon, Sep 08, 2003 at 10:47:07AM +0200, R.M. Evers wrote:
  Hello,
  
  I've been researching what would be our best option for converting our
  old Redhat mailserver with Sendmail to something better. I'm not exactly
  a Linux guru, though I'm no newbie either. Finally, I've decided to use
  Debian Woody, with the following setup:
  
  /dev/hda1 - /boot
  /dev/hda2 - /
  /dev/hda3 - /home
  
  - Postfix delivering to Maildir (from stable)
  - Courier POP3(S) / IMAP(S) (from stable)
  - Spamassassin (from unstable)
  - Amavisd / Clamav-daemon (from unstable)
  
  A user's Maildir is ~/Maildir and I've setup quota on /home (soft: 5MB,
  hard: 10MB). I've written the scripts to convert the old mboxes to the
  new Maildir format etc. Everything seems to work fine, except for this
  little problem I found today.
  
  When a user is over his soft quotum and I try to send a mail with an
  attachment which will bring the user over his hard quotum on /home,
  Postfix accepts the email. Then, a part of the email is written to the
  user's Maildir until the hard quotum is reached, and things stop. So,
  now I'm left with a user who has a partial email/attachment and no more
  disk space. Additionally, the mail is stored/kept in the user's mbox
  (/var/mail/user, where there is no quotum). When the user cleans up his
  account, the mail never gets delivered properly, and the sender gets no
  notification that something went wrong. The daily warnquota email is
  received as a 0-byte email by the user, because the hard limit is
  reached. I don't know what could be causing this (postfix or procmail?).
  Another thing I don't understand, is that whenever I send an email to a
  user who is below his soft limit, and which will bring the user over his
  hard limit at once, Ximian Evolution nicely reports to me that the
  sending failed, because the storage limit is exceeded. In that case,
  nothing gets delivered, which probably is what I want.
  
  So I'm wondering: what could be wrong with my setup?
  
  I get the idea that i should maybe get out the procmail part of the
  configuration. But I could only get Spamassassin to work via procmail..
  I believe it should be possble to get it to work via Amavis, but I don't
  know how..
  
 
 Maybe replace procmail with maildrop and use soft maildir quotas (I got
 this working on a server). Alternatively you can use the virtual
 delivery to use soft maildir quotas, but I don't known how to enable
 spamassassin in this case (maybe a global postfix filter).

So, if I understand correctly, I *have to* enable SpamAssassin through
an MDA? I thought SpamAssassin could be called by amavisd-new, which
would make the MDA unnecessary, since Postfix can deliver to Maildir
directly..

Regards,

-- 
R.M. Evers [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Postfix + Quota (+ procmail?)

2003-09-08 Thread Craig Sanders
On Mon, Sep 08, 2003 at 02:13:17PM +0200, R.M. Evers wrote:
 So, if I understand correctly, I *have to* enable SpamAssassin through
 an MDA? I thought SpamAssassin could be called by amavisd-new, which
 would make the MDA unnecessary, since Postfix can deliver to Maildir
 directly..

you can use spamassassin as either a content filter (e.g. with amavis), or by
calling it from an MDA such as procmail or maildrop.  there are pros and cons
to both methods.

craig


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Postfix + Quota (+ procmail?)

2003-09-08 Thread Chris Hilts
 you can use spamassassin as either a content filter (e.g. with amavis), or
 by calling it from an MDA such as procmail or maildrop.

I'm currently calling spamassassin (spamd) via procmail after piping
through amavis, because I want to use SQL prefs.  Do you know off hand if
amavis can handle the SQL prefs, or do I need to keep things as they are?

Thanks in advance,

-- 
Chris Hilts
[EMAIL PROTECTED]


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Postfix + Quota (+ procmail?)

2003-09-08 Thread Craig Sanders
On Mon, Sep 08, 2003 at 08:05:31PM -0500, Chris Hilts wrote:
  you can use spamassassin as either a content filter (e.g. with amavis), or
  by calling it from an MDA such as procmail or maildrop.
 
 I'm currently calling spamassassin (spamd) via procmail after piping
 through amavis, because I want to use SQL prefs.  Do you know off hand if
 amavis can handle the SQL prefs, or do I need to keep things as they are?

i think it can, but i don't use it myself (i use my own little filter script)
so i'm not 100% sure.


the advantage of using an MDA is that you get greater per-user customisation
capability because by the time it gets to the MDA, the final recipient address
is known and that can be used as a lookup key into the SQL prefs.

this information isn't available earlier than that (although you can fake it by
using the recipient address...which mostly works but has a few problems, e.g.
with catch-all addresses or aliases, each one would need it's own custom config
even though they end up in the same mailbox.  this may be a feature or it may
be a bug depending on what you want :-)

OTOH, using spamassassin from an MDA only works for mail delivered to the local
system.  it does not work for in-transit mail (e.g. relayed, uucp, etc).  if you 
need that, use SA as a content filter.

like i said, there are pros and cons to both.

craig


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Procmail weirdness

2003-04-26 Thread Peter Billson
Hello *,
  I'm having some procmail weirdness that I can't get my brain around.

  I have a box running exim with two domains that sort to various system users.

   Every user has a procmailrc file in their home directory like this:
LINEBUF=4096
MAILDIR=$HOME/Maildir/

:0 c
*
$HOME/MailBU/Inbound/

:0
$MAILDIR

  This works perfectly for the primary domain but not the virtual domain. For 
the broken domain, if I put this procmailrc file in a user's home directory 
their mail gets delivered in mbox format to /var/spool/mail/{username}. If I 
remove it it gets
delivered in maildir format to /home/{username}/Maildir/new as it should.

  Any suggestions as to where to look for the problem?


Pete
-- 
http://www.elbnet.com
ELB Internet Service, Inc.
Web Design, Computer Consulting, Internet Hosting




cyrus-imap + postfix + procmail = trouble

2003-02-18 Thread Gregory Wood



Gregory Wood
Farsight Voice Data Solutions
1219 West University Blvd.
Odessa TX 79764-7119
915-335-0879





Re: cyrus-imap + postfix + procmail = trouble

2003-02-18 Thread Joan Cirer
Hi!

 The configuration and testing went pretty well for a time. So far, I'm
 only testing in-house accounts. I created two users, connect to
 squirrelmail, create an email for the other user and send it.
 Squirrelmail/imap show it in the send folder. When I log in as the other
 user, no email. I checked mail.log and mail.info and it appears the mail
 went through postfix. ProcMail is complaining that it doesn't have the
 right security to write to the log file.

 Any ideas?

Have you configured procmail to deliver to Maildir style folders?



$ cat /etc/procmailrc
SHELL=/bin/sh
# Maildir format
MAILDIR=$HOME/Maildir/
DEFAULT=$MAILDIR
LOGFILE=$HOME/.procmail.log

#

and in /etc/postfix/main.cf

mailbox_command = procmail -a $EXTENSION

Regards



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: cyrus-imap + postfix + procmail = trouble

2003-02-18 Thread Joan Cirer
Upps!
The answer is for courier-imap, not cyrus... sorry :-(



 Any ideas?

 Have you configured procmail to deliver to Maildir style folders?


 
 $ cat /etc/procmailrc
 SHELL=/bin/sh
 # Maildir format
 MAILDIR=$HOME/Maildir/
 DEFAULT=$MAILDIR
 LOGFILE=$HOME/.procmail.log

 #
 
 and in /etc/postfix/main.cf

 mailbox_command = procmail -a $EXTENSION

 Regards




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: cyrus-imap + postfix + procmail = trouble

2003-02-18 Thread Theodore Knab
There are many very good howto on using the Cyrus, Postfix
setup. However, you seem to know Exim why go to Postfix ?

You can find the how-to link from the http://www.postfix.org. 

 I've used exim at my site and several others without problem. 
 I decided to build a new server and add imap and squirrelmail. 

If you like Exim, maybe Exim with the maildir format and Courier IMAP would
take less time for you. I use Postfix, but Exim is also good, if you
understand it better. I setup Exim for a friend who wanted to use IMAP.
You only need to chage one or two lines in
the Exim Config file. Since I know Courier and Squirrelmail, I installed
them. It is very simple to setup Courier IMAP with Exim if you use it with a local 
/etc/passwd and local /etc/shadow file.

Of course, this type of setup can be a little
dangerous if you don't follow the Debian Security howto. 

http://www.linuxsecurity.com/resource_files/host_security/securing-debian-howto/index.en.html

If you do choose to do this make sure the clients are forced to use
encryption, otherwise you will have unwelcomed guests.

My friend did not follow the Debian howto, so you can only guess what
happened. ;-)

Ted


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




User Unknowns .. If user is a number with Sendmail + Procmail

2002-08-29 Thread Sonny Kupka
I have a major problem I'm trying to debug..
I have couple users that have username of just numbers..
8400 is one case.
You can finger 8400 it's there
You can grep for 8400 in password file and shadow file and user is there
/home/8400 is there
Before switching from Slackware to Debian user could get mail now his mail 
is bounced out user unknown.

Anyone have any ideas what to look at?
Thanks!
---
Sonny



Re: User Unknowns .. If user is a number with Sendmail + Procmail

2002-08-29 Thread Jeremy C. Reed
On Thu, 29 Aug 2002, Sonny Kupka wrote:

 Before switching from Slackware to Debian user could get mail now his mail 
 is bounced out user unknown.

What do your mail logs actually say?

  Jeremy C. Reed

http://www.isp-faq.com/




Re: User Unknowns .. If user is a number with Sendmail + Procmail

2002-08-29 Thread Craig Sanders
On Thu, Aug 29, 2002 at 01:28:07PM -0500, Sonny Kupka wrote:
 I have a major problem I'm trying to debug..
 
 I have couple users that have username of just numbers..
 
 8400 is one case.
 
 You can finger 8400 it's there You can grep for 8400 in password file
 and shadow file and user is there /home/8400 is there

you are asking for trouble if you have numeric usernames.  there's an
inherent ambiguity when you specify user 8400, say to a tool like
chmod, whether you are referring to the login name 8400, or the UID
8400.

 Before switching from Slackware to Debian user could get mail now his
 mail is bounced out user unknown.

debian's sendmail is probably a newer version and/or compiled with
different compile-time options.

 Anyone have any ideas what to look at?

i suggest that the all-numeric login names are changed (perhaps, e.g.,
from 8400 to u8400) and then have aliases in /etc/aliases like so:

8400: u8400

that way they still get to use the same email address, the only thing
that changes is their login name.

also, if they have ~/public_html directories, you need to put in a
redirect rule in apache to redirect requests for their old ~ to their
new one.  e.g.

RedirectMatch 301 /~8400($|/.*) http://your.domain.here/~u8400$1


in other words, change their login to something reasonable and redirect
all requests (mail and web and whatever else) for the old login to the
new.

sometimes you just have to bite the bullet and fix things that are
broken.  when i started at my current job a few years ago, i noticed
that some user accounts on one of our solaris boxes had been created
with completely invalid account names (e.g. starting with or containing
characters like # or $).  they kind of worked, but they caused problems.
we had to rename them.


craig

-- 
craig sanders [EMAIL PROTECTED]

Fabricati Diem, PVNC.
 -- motto of the Ankh-Morpork City Watch




Re: 50MB mbox size limit with postfix/procmail

2002-08-24 Thread Amaya
You may also want to take a look at:
mailbox_limit = 0
virtual_mailbox_limit = 0
mailbox_size_limit = 0

-- 
 .''`. Life is WYGIWYD: What You Get Is What You Deserve
: :' :   
`. `' Proudly running Debian GNU/Linux Sid (2.4.18 + Ext3) 
  `-www.amayita.com  www.malapecora.com  www.chicasduras.com   




Re: Procmail losing messages

2002-08-21 Thread Jorge . Lehner
Hello!

On Tue, Aug 20, 2002 at 01:05:03PM -0400, Gene Grimm wrote:
 For some reason, procmail seems to be sporadically losing messages into thin
 air. Only a few messages are being lost, but they are important messages (as
...

Not that this has necessarily to do with it, but safecat's author
claims, that procmail's (relatively recent) Maildir delivery feature
is not really save.

Be sure that mailbox locking does not fail also.

Best Regards,

 Jorge-León




Procmail losing messages

2002-08-20 Thread Gene Grimm
For some reason, procmail seems to be sporadically losing messages into thin
air. Only a few messages are being lost, but they are important messages (as
opposed to spam). I can see the specific message subjects and sender
addresses in the procmail.log file, but not in the mailbox file. The mailbox
file contains messages from several days before and after the missing
message date.

I am preparing to implement both Amavis-Postfix/ClamAV and SpamAssassin
scanning on this mail server, so procmail will be required. Was there an
issue with the previous version of procmail that might have caused this? I
just upgraded that server today to Woody. As of right now, there is no
/etc/procmailrc file and the .procmailrc file is simply:
LOGFILE=$HOME/procmail.log




50MB mbox size limit with postfix/procmail

2002-08-17 Thread Oystein Nerhus
I'm using postfix with procmail for local delivery.  Latest versions
from woody:

ii  postfix   1.1.11-0.woody2
ii  procmail  3.22-4

When any mbox reaches 50MB, procmail and/or postfix will refuse to
deliver it to that mbox, and the mail is instead delivered to the next
matching procmail rule (usually the catch-all rule at the end of my
.procmailrc file)

I have tried really hard to find this limit, even by grepping the
sources for both postfix and procmail.  I tried setting
virtual_mailbox_limit = 0 in the postfix main.cf, but no luck.  And
yes, I know that the limit most probably lies in procmail(logically that
is)  However, I cannot find any such setting in the procmail docs.

What did I overlook?

Thanx,

Øystein




Re: 50MB mbox size limit with postfix/procmail

2002-08-17 Thread Andrius Kasparavicius
mailbox_size_limit =

On Sat, 17 Aug 2002, Oystein Nerhus wrote:

 I'm using postfix with procmail for local delivery.  Latest versions
 from woody:

 ii  postfix   1.1.11-0.woody2
 ii  procmail  3.22-4

 When any mbox reaches 50MB, procmail and/or postfix will refuse to
 deliver it to that mbox, and the mail is instead delivered to the next
 matching procmail rule (usually the catch-all rule at the end of my
 .procmailrc file)

 I have tried really hard to find this limit, even by grepping the
 sources for both postfix and procmail.  I tried setting
 virtual_mailbox_limit = 0 in the postfix main.cf, but no luck.  And
 yes, I know that the limit most probably lies in procmail(logically that
 is)  However, I cannot find any such setting in the procmail docs.

 What did I overlook?

 Thanx,

 Øystein


 --
 To UNSUBSCRIBE, email to [EMAIL PROTECTED]
 with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]






Re: 50MB mbox size limit with postfix/procmail

2002-08-17 Thread Oystein Nerhus
Thank you :)  That did the trick.

Øystein

On Sat, Aug 17, 2002 at 03:53:48PM +0200, Andrius Kasparavicius wrote:
 mailbox_size_limit =
 
 On Sat, 17 Aug 2002, Oystein Nerhus wrote:
 
  I'm using postfix with procmail for local delivery.  Latest versions
  from woody:
 
  ii  postfix   1.1.11-0.woody2
  ii  procmail  3.22-4
 
  When any mbox reaches 50MB, procmail and/or postfix will refuse to
  deliver it to that mbox, and the mail is instead delivered to the next
  matching procmail rule (usually the catch-all rule at the end of my
  .procmailrc file)




Re: Postfix/Procmail losing mail

2002-08-07 Thread Germán Gutierrez

 Gene Grimm escribio:
 Some of our clients are reporting that they are getting virtually no
 mail. Even when specific people tell them they have sent mail, these
 clients receive nothing through the POP3 server (so it's apparently not
 getting to their inbox).

 Postfix is configured to use procmail as the delivery agent. According
 to the log files, postfix is sending all of it to procmail, but it
 doesn't appear to be reaching the mailbox. There is no $HOME/.procmailrc
 or /etc/procmailrc file on this server. Thus far I cannot find anything
 that tells me procmail is dropping messages. Can anyone point me to
 where I can find debug info on procmail?



IMHO if you don't use procmail, remove it from the postfix configuration.
If you want to test it, you can use the .forward file to see what is
going on.

A quick search on google gave me this:
http://www.itworld.com/nl/unix_sys_adm/03132002/

-- 
Regards,
  Germán





Re: procmail to deliver in a Maildir/ for every user?

2002-02-01 Thread Stephane Bortzmeyer

On Thu, Jan 31, 2002 at 10:12:18AM +1100,
 Jeremy Lunn [EMAIL PROTECTED] wrote 
 a message of 18 lines which said:

 Change your /etc/procmailrc to this and it'll fix your problem:
 DEFAULT=$HOME/Maildir/

It works fine, thanks, that's what I was looking for.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: procmail to deliver in a Maildir/ for every user?

2002-02-01 Thread Stephane Bortzmeyer
On Thu, Jan 31, 2002 at 10:12:18AM +1100,
 Jeremy Lunn [EMAIL PROTECTED] wrote 
 a message of 18 lines which said:

 Change your /etc/procmailrc to this and it'll fix your problem:
 DEFAULT=$HOME/Maildir/

It works fine, thanks, that's what I was looking for.




procmail to deliver in a Maildir/ for every user?

2002-01-30 Thread Stephane Bortzmeyer

Hello,

I wish to use procmail as the system-wide delivery agent (the MTA is
Postfix) *and* to have mail delivered in qmail-style Maildir/ by
default (the POP and IMAP daemons are Courier, which only handles
Maildirs).

If I write a /etc/procmailrc:

:0
$HOME/Maildir/

it works but it even does so for the few shell users which have a
~/.procmailrc (the home procmailrc is read after, when the mail has
already been delivered). The procmailrc syntax does not allow me to
test the existence of a ~/.procmailrc. 

Is there a way to combine my wishes? Otherwise, I'll use Postfix
internal MDA (which will make it inconvenient to have system-wide
services such as mail duplicata removal) and the shell users will have
to invoke procmail from a ~/.forward.

Possible solution, untested: write a local MDA which is a very simple
shell script. It will test the existence of ~/.procmailrc and will
invoke procmail with different arguments. Ugly, I think.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: procmail to deliver in a Maildir/ for every user?

2002-01-30 Thread Jeremy Lunn

On Wed, Jan 30, 2002 at 05:28:36PM +0100, Stephane Bortzmeyer wrote:
 If I write a /etc/procmailrc:
 
 :0
 $HOME/Maildir/
 
 it works but it even does so for the few shell users which have a
 ~/.procmailrc (the home procmailrc is read after, when the mail has
 already been delivered). The procmailrc syntax does not allow me to
 test the existence of a ~/.procmailrc. 

Change your /etc/procmailrc to this and it'll fix your problem:
DEFAULT=$HOME/Maildir/

-- 
Jeremy Lunn
Melbourne, Australia
http://www.jabber.org/ - the next generation of Instant Messaging.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: procmail

2001-12-17 Thread Christian Hammers

On Mon, Dec 17, 2001 at 09:46:33AM +1100, Craig Sanders wrote:
 PS: there's no such thing as a BCC header in incoming mail. it is
 stripped either by the user-agent when sending a message or, at the
 latest, by the MTA when it receives the message. it can't be used to
 sort mail because it doesn't exist.
That's wrong according the the specs[1], although I've never seen an SMTP
MUA/MTA that did actually show the Bcc receipients to each other.

bye,

-christian-

[1] rfc822
  4.5.3.  BCC / RESENT-BCC
 Some  systems  may choose to include the text of the
Bcc field only in the author(s)'s  copy,  while  others  may
also include it in the text sent to all those indicated in the
Bcc list.

-- 
This is a test of the Emergency Broadcast System.  If this had been an
actual emergency, do you really think we'd stick around to tell you?


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: procmail

2001-12-17 Thread Christian Hammers
On Mon, Dec 17, 2001 at 09:46:33AM +1100, Craig Sanders wrote:
 PS: there's no such thing as a BCC header in incoming mail. it is
 stripped either by the user-agent when sending a message or, at the
 latest, by the MTA when it receives the message. it can't be used to
 sort mail because it doesn't exist.
That's wrong according the the specs[1], although I've never seen an SMTP
MUA/MTA that did actually show the Bcc receipients to each other.

bye,

-christian-

[1] rfc822
  4.5.3.  BCC / RESENT-BCC
 Some  systems  may choose to include the text of the
Bcc field only in the author(s)'s  copy,  while  others  may
also include it in the text sent to all those indicated in the
Bcc list.

-- 
This is a test of the Emergency Broadcast System.  If this had been an
actual emergency, do you really think we'd stick around to tell you?




Re: procmail

2001-12-17 Thread Craig Sanders
On Mon, Dec 17, 2001 at 07:52:41PM +0100, Christian Hammers wrote:
 On Mon, Dec 17, 2001 at 09:46:33AM +1100, Craig Sanders wrote:
  PS: there's no such thing as a BCC header in incoming mail. it is
  stripped either by the user-agent when sending a message or, at the
  latest, by the MTA when it receives the message. it can't be used to
  sort mail because it doesn't exist.

 That's wrong according the the specs[1], although I've never seen an SMTP
 MUA/MTA that did actually show the Bcc receipients to each other.

possibly true in theorybut not in practice.


 [1] rfc822
   4.5.3.  BCC / RESENT-BCC
Some  systems  may choose to include the text of the
 Bcc field only in the author(s)'s  copy,  

that would be up to the MUA if/when it saves a copy of the sent message.

 while others may also include it in the text sent to all those
 indicated in the Bcc list.

and that's so obviously broken that i doubt if anyone has ever
implemented it - even for an MS mail program.

craig

-- 
craig sanders [EMAIL PROTECTED]

Fabricati Diem, PVNC.
 -- motto of the Ankh-Morpork City Watch




Re: procmail

2001-12-16 Thread Craig Sanders

On Sat, Dec 15, 2001 at 12:16:27PM +0100, KOZMAN Balint wrote:
 I use procmail to sort incoming mails downloaded via fetchmail among
 my internal users. The procmail rules refer to the To, cc, bcc
 headers, but if someone subscribes to a mailing list, his/her address
 won't be among these.

 Any ideas?

you've just discovered why POP is completely inadequate as a mail
transport protocol - it loses the envelope recipient information.

POP was never designed to do the job you're trying to make it do. it was
designed to be a protocol that allowed remote access by a user to their
personal mailbox. it does that job reasonably well.  

it was not designed to transport the mail for an entire domain...at
best, it can be kludged to do a bad imitation of that particular job
(see choice 1 below).

the same goes for IMAP.

your two choices are:

1. convince your ISP to hack their MTA to add the envelope-recipient
   info (e.g. in an X-Envelope-Recipient header or by somehow munging
   the To: or Delivered-To: or whatever header) when delivering mail to
   a local mailbox...and do that without compromising privacy (i.e. BCC
   means Blind Carbon Copy - other recipients are not supposed to see
   who it was delivered to)

2. use a protocol designed for the job you're trying to do. uucp is
   ideal.



btw, it's not at all uncommon to get clueless NT consultants telling you
that POP works well for this. that's because they're clueless and have
no idea how mail works. i had an MS Exchange consultant whining at me
last week, demanding to pick up his client's mail by using finger which
is, according to him, the industry standard for mail. i still don't
know for sure what he was crapping on about - my guess is he had one ISP
set up some ugly kludge where finger would trigger a delivery via smtp
(which is a pretty stupid and insecure idea). i told him his choices
were to either use uucp or to put up with the limitations of POP.

of course, that scary word uucp terrified him, even though it's
actually pretty easy to set up and there are free uucp programs that
work as an add-on to Exchange (e.g. UUPC/Extended).

speaking of uucp, does anyone have any recommendations for uucp programs
that work with Exchange? i've never used either, but have been referring
people to either UUPC/Extended[1] (free) or mailcoach[2] (commercial).

[1] http://web.kew.com:8080/kendra/uupc/
[2] http://www.mailcoach.com/


craig

PS: there's no such thing as a BCC header in incoming mail. it is
stripped either by the user-agent when sending a message or, at the
latest, by the MTA when it receives the message. it can't be used to
sort mail because it doesn't exist.


-- 
craig sanders [EMAIL PROTECTED]

Fabricati Diem, PVNC.
 -- motto of the Ankh-Morpork City Watch


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: procmail

2001-12-16 Thread Glenn Hocking

Hi all

I've been down the single mailbox/fetchmail path many times. If you do this
expect regular support calls from irate customers whose email never made it to
them.

The only real solution (except running your own mail server) is a separate mail
box for all. I have found that many ISPs will now do this for free as apart from
the setup there are no extra resources used. And any good ISP has automated
'unique' mail box set up online, so you create and configure your own. Look for
'Unlimited pop accounts' in your ISP. This should not cost any more.

By no extra resources I mean that the mail server still has to process the same
amount of mail. And apply the same rules.

Kind regards
Glenn Hocking

Craig Sanders wrote:

 On Sat, Dec 15, 2001 at 12:16:27PM +0100, KOZMAN Balint wrote:
  I use procmail to sort incoming mails downloaded via fetchmail among
  my internal users. The procmail rules refer to the To, cc, bcc
  headers, but if someone subscribes to a mailing list, his/her address
  won't be among these.
 
  Any ideas?


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: procmail

2001-12-16 Thread Craig Sanders
On Sat, Dec 15, 2001 at 12:16:27PM +0100, KOZMAN Balint wrote:
 I use procmail to sort incoming mails downloaded via fetchmail among
 my internal users. The procmail rules refer to the To, cc, bcc
 headers, but if someone subscribes to a mailing list, his/her address
 won't be among these.

 Any ideas?

you've just discovered why POP is completely inadequate as a mail
transport protocol - it loses the envelope recipient information.

POP was never designed to do the job you're trying to make it do. it was
designed to be a protocol that allowed remote access by a user to their
personal mailbox. it does that job reasonably well.  

it was not designed to transport the mail for an entire domain...at
best, it can be kludged to do a bad imitation of that particular job
(see choice 1 below).

the same goes for IMAP.

your two choices are:

1. convince your ISP to hack their MTA to add the envelope-recipient
   info (e.g. in an X-Envelope-Recipient header or by somehow munging
   the To: or Delivered-To: or whatever header) when delivering mail to
   a local mailbox...and do that without compromising privacy (i.e. BCC
   means Blind Carbon Copy - other recipients are not supposed to see
   who it was delivered to)

2. use a protocol designed for the job you're trying to do. uucp is
   ideal.



btw, it's not at all uncommon to get clueless NT consultants telling you
that POP works well for this. that's because they're clueless and have
no idea how mail works. i had an MS Exchange consultant whining at me
last week, demanding to pick up his client's mail by using finger which
is, according to him, the industry standard for mail. i still don't
know for sure what he was crapping on about - my guess is he had one ISP
set up some ugly kludge where finger would trigger a delivery via smtp
(which is a pretty stupid and insecure idea). i told him his choices
were to either use uucp or to put up with the limitations of POP.

of course, that scary word uucp terrified him, even though it's
actually pretty easy to set up and there are free uucp programs that
work as an add-on to Exchange (e.g. UUPC/Extended).

speaking of uucp, does anyone have any recommendations for uucp programs
that work with Exchange? i've never used either, but have been referring
people to either UUPC/Extended[1] (free) or mailcoach[2] (commercial).

[1] http://web.kew.com:8080/kendra/uupc/
[2] http://www.mailcoach.com/


craig

PS: there's no such thing as a BCC header in incoming mail. it is
stripped either by the user-agent when sending a message or, at the
latest, by the MTA when it receives the message. it can't be used to
sort mail because it doesn't exist.


-- 
craig sanders [EMAIL PROTECTED]

Fabricati Diem, PVNC.
 -- motto of the Ankh-Morpork City Watch




Re: procmail

2001-12-16 Thread Glenn Hocking
Hi all

I've been down the single mailbox/fetchmail path many times. If you do this
expect regular support calls from irate customers whose email never made it to
them.

The only real solution (except running your own mail server) is a separate mail
box for all. I have found that many ISPs will now do this for free as apart from
the setup there are no extra resources used. And any good ISP has automated
'unique' mail box set up online, so you create and configure your own. Look for
'Unlimited pop accounts' in your ISP. This should not cost any more.

By no extra resources I mean that the mail server still has to process the same
amount of mail. And apply the same rules.

Kind regards
Glenn Hocking

Craig Sanders wrote:

 On Sat, Dec 15, 2001 at 12:16:27PM +0100, KOZMAN Balint wrote:
  I use procmail to sort incoming mails downloaded via fetchmail among
  my internal users. The procmail rules refer to the To, cc, bcc
  headers, but if someone subscribes to a mailing list, his/her address
  won't be among these.
 
  Any ideas?




procmail

2001-12-15 Thread KOZMAN Balint


Hi,

Sorry if a bit offtopic, but I haven't found any solutions yet to this:

I use procmail to sort incoming mails downloaded via fetchmail among my
internal users. The procmail rules refer to the To, cc, bcc headers, but if
someone subscribes to a mailing list, his/her address won't be among
these.

Any ideas?

Regards,
Balint


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: procmail

2001-12-15 Thread Christof Glaser

On Saturday, 15. December 2001 12:16, KOZMAN Balint wrote:
 I use procmail to sort incoming mails downloaded via fetchmail among
 my internal users. The procmail rules refer to the To, cc, bcc
 headers, but if someone subscribes to a mailing list, his/her address
 won't be among these.

 Any ideas?

Some mailing lists contain your address encoded as Return-Path.
For mail from this list it looks like this:
Return-Path: [EMAIL PROTECTED]

Note that @ became =.

Hope that helps a bit.

Regards,
-- 
Christof Glaser


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




procmail

2001-12-15 Thread KOZMAN Balint

Hi,

Sorry if a bit offtopic, but I haven't found any solutions yet to this:

I use procmail to sort incoming mails downloaded via fetchmail among my
internal users. The procmail rules refer to the To, cc, bcc headers, but if
someone subscribes to a mailing list, his/her address won't be among
these.

Any ideas?

Regards,
Balint




Re: procmail

2001-12-15 Thread Christof Glaser
On Saturday, 15. December 2001 12:16, KOZMAN Balint wrote:
 I use procmail to sort incoming mails downloaded via fetchmail among
 my internal users. The procmail rules refer to the To, cc, bcc
 headers, but if someone subscribes to a mailing list, his/her address
 won't be among these.

 Any ideas?

Some mailing lists contain your address encoded as Return-Path.
For mail from this list it looks like this:
Return-Path: [EMAIL PROTECTED]

Note that @ became =.

Hope that helps a bit.

Regards,
-- 
Christof Glaser




globally enabling procmail with exim

2001-09-25 Thread Pierfrancesco Caci


Hello,
I would like to activate a virus scanning system that is based on
procmail.
I would like to do this globally for every user on my system, but from
the configuration examples and docs of exim, I understand that
procmail is by default called only if a ~/.procmailrc file is
present. 
How should I modified exim's config so as to check for existance of
/etc/procmailrc first and then continue as before to check for the
private ones?

Thanks 

Pf

-- 

---
 Pierfrancesco Caci | ik5pvx | mailto:[EMAIL PROTECTED]  -  http://gusp.dyndns.org
  Firenze - Italia  | Office for the Complication of Otherwise Simple Affairs 
 Linux penny 2.4.7 #1 Thu Jul 26 14:48:56 CEST 2001 i686 unknown


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]