postfix and procmail problem

This is a discussion on postfix and procmail problem within the mailing.postfix.users forums, part of the Mail Servers and Related category; Hi, I have a problem with messages to multiple users on my serwer. I have a virtual domains on mysql. ...


Go Back   Usenet Forums > Mail Servers and Related > mailing.postfix.users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-06-2008
Jabba
 
Posts: n/a
Default postfix and procmail problem

Hi,
I have a problem with messages to multiple users on my serwer.

I have a virtual domains on mysql.

Directories /home/mail/domain.pl/username

if mail is for 3 users in syslog postfix is called 3 times but with
same pipie number.

where is the problem ?
Maybe someone could help me with write a code to explode users and
domains from ^To header and place message to right folders ?

main.cf:

procmail unix - n n - - pipe
flags=R user=vmail:vmail argv=/usr/bin/procmail -t -m /etc/procmailrc
${recipient}

procmailrc :

SHELL=/bin/sh
VERBOSE=yes
UMASK=007
ADRES=$1
ADRES=`echo $ADRES | /usr/bin/tr A-Z a-z` # force lowercase username
DOMAIN=`echo "${ADRES}" | cut -d @ -f 2 | cut -d "<" -f 2| cut -d">" -
f 1| cut -d @ -f 1`
USER=`echo "${ADRES}" | cut -d @ -f 1 | cut -d "<" -f 2| cut -d">" -f
1| cut -d @ -f 1` # get username for local delivery
SMIETNIK=/home/mail/filtered/
LOGFILE=/home/log/procmailnew.log # for testing & troubleshooting
INCLUDERC=/home/mail/${DOMAIN}/${USER}/.procmailrc # allow users to
create their own recipes
LOGNAME: ${LOGNAME}"
MAILDIR=/home/mail/${DOMAIN}/${USER}/

$MAILDIR

thanx

Marcin Jablonski
Reply With Quote
  #2 (permalink)  
Old 1 Week Ago
juair10@gmail.com
 
Posts: n/a
Default Re: postfix and procmail problem

On 6 mar, 10:01, Jabba <jabba1...@gmail.com> wrote:
> Hi,
> I have a problem with messages to multiple users on my serwer.
>
> I have a virtual domains on mysql.
>
> Directories /home/mail/domain.pl/username
>
> if mail is for 3 users in syslog postfix is called 3 times but with
> same pipie number.
>
> where is the problem ?
> Maybe someone could help me with write a code to explode users and
> domains from ^To header and place message to right folders ?
>
> main.cf:
>
> procmail unix - n n - - pipe
> flags=R user=vmail:vmail argv=/usr/bin/procmail -t -m /etc/procmailrc
> ${recipient}
>
> procmailrc :
>
> SHELL=/bin/sh
> VERBOSE=yes
> UMASK=007
> ADRES=$1
> ADRES=`echo $ADRES | /usr/bin/tr A-Z a-z` # force lowercase username
> DOMAIN=`echo "${ADRES}" | cut -d @ -f 2 | cut -d "<" -f 2| cut -d">" -
> f 1| cut -d @ -f 1`
> USER=`echo "${ADRES}" | cut -d @ -f 1 | cut -d "<" -f 2| cut -d">" -f
> 1| cut -d @ -f 1` # get username for local delivery
> SMIETNIK=/home/mail/filtered/
> LOGFILE=/home/log/procmailnew.log # for testing & troubleshooting
> INCLUDERC=/home/mail/${DOMAIN}/${USER}/.procmailrc # allow users to
> create their own recipes
> LOGNAME: ${LOGNAME}"
> MAILDIR=/home/mail/${DOMAIN}/${USER}/
>
> $MAILDIR
>
> thanx
>
> Marcin Jablonski



You must change the lin of procmail in master.cf like this:
flags=DRhu user=vmail argv=/usr/bin/procmail -t -m /etc/procmailrc $
{recipient}

and you must add in main.cf this:
mailbox_command = /usr/bin/procmail -a "$EXTENSION"
procmail_destination_recipient_limit = 1

Then reload postfix
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:05 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0