procmail
[Top] [All Lists]

Re: Multi Recipient Problem

2006-04-25 07:17:58
On 25 Apr 2006, at 07:18 , IAK Tanoli wrote:
  I am stuck in procmail configuration kindly help me to resolve  
the problem. My scenario is all mails to my domains are forwarded  
to single pop email address and i fetch mail of that user and  
distribute it to local users via procmail.

Procmail is not an MTA.

What you want simply cannot be done reliably with a domain wild- 
carded account.  In short, either change your domain to be a real  
email domain that only accepts mail for real addresses, or get an ISP  
that will do it for you.

However, if you put this LAST in your procmailrc, and I do mean LAST,  
then you might get some results.  But it will still fail for a lot of  
messages.

# Reset SENDLIST to ensure it is empty/null
SENDLIST
:0
# If the To: header contains a ,
* TO_,
{
   :0
   *TOuser1
   { SENDLIST = "user1," }

   :0
   *TOuser2
   { SENDLIST = "$SENDLIST user2,"

   :0
   *TOuser3
   { SENDLIST = "$SENDLIST user3"

   :0
   # if SENDLIST is not empty
   * ! $SENDLIST ^^^^
   ! $SENDLIST

   :0E
   # Message contained a coma, but not to a locally defined user
   $MAILDIR/Suspicious-to
}

:0E
{
   :0
   *TOuser1
   ! user1

   :0
   *TOuser2
   ! user2

   :0
   *TOuser3
   ! user3
}


Now, this will require some testing, and perhaps some of the syntax  
is a bit off (I don't know if ! $SENDLIST will work quite as it is).

But be assured, this is NOT a solution.  Mail will still fail.  mail  
intended for multiple users may or may not get delivered to all those  
users.  This is because, say it with me,

Procmail is not an MTA.

-- 
#27794 <Vellius>  ... I wonder if the really nerdy Klingons learn how  
to speak english



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

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