Help in redirection of mail

Bhagwan Gupta <[email protected]> Mon, 29 Nov 2004 15:44:22 -0800 (PST)
Newsgroups gmane.mail.smartlist.user
Message-ID <[email protected]>
Hello 

 

Example (What we are supposed to do)- 

 

Take three E-mail ids [email protected], [email protected], [email protected]. Aim is, whatever mail is coming from [email protected] to [email protected] it will be redirected to [email protected] (where the [email protected] will see that the mail is coming to him only i,e in that mail "From" field will have [email protected] and "To" field will have [email protected]

 

Our Setup:-

We are running qmail (version qmail-1.03) mail server on Red Hat Linux 7.2 

 

We Tried:-

1) A script 

 

| /usr/bin/formail -i ''To:[email protected]' |/usr/sbin/sendmail -oi -t 

 

was written and placed in one of the configuration file (.qmail) of qmail, It worked, but the problem was with "Cc" address field and "Bcc" address field i,e if [email protected] ( any address from our domain on which a redirection is set) is placed in "Cc" or "Bcc" field, a mail loop will be there and we will be redirecting infinite mails!

 

2) As a Second solution Procmail was used and a script was written in .procmailrc file, 

:0 

* !^X-Loop:[email protected]

|formail -i "To:[email protected]" | /usr/bin/sendmail -oi -t

 

also .qmail was configured to use procmailrc file, but now the problem was, everything is done but the sender of the mail is getting a bounce back message saying “This mail is looping so the delivery was stopped”, though the receiver is getting the mail as per our requirement.I dont want this bounce back message to go there.

 

Can you suggest any solution for my problem?? 

Bhagwan Dass



		
---------------------------------
Do you Yahoo!?
 The all-new My Yahoo! – Get yours free!

_______________________________________________
Smartlist mailing list
[email protected]
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/smartlist