procmail
[Top] [All Lists]

Almost crazy with sendmail + relay + procmail

2001-05-29 00:05:17
Guys..

Im loosing my sense with this..

First let me explain you..

I have a mail hub.. in fact this mail hub re-sends all the mail to the
internal mail servers (something like 500 servers) and from this servers
to the internet.

I want to setup some sendmail recipes on this mail hub so i can be
able to block certain senders and recipients.. and do other stuff ..

i enabled the local_procmail feature and add the following lines to
the S89 rule on the sendmail.cf

S98

#Mail Filtering
R$*<@$+>$*     $#procmail $@/etc/procmailrc.master $:$1(_at_)$2procmail$3
R$*<@$*.procmail>$*    $1@<$2>$3       map back of procmail copy


This its my /etc/procmailrc.master:


cut here ----

VERBOSE=on
SENDER = $1
SHIFT = 1
LOGFILE=/var/log/proc.log

:0
* ^TO.(user(_at_)internet(_dot_)domain(_dot_)com)
* !^X-Loop: resend-ID
* !^FROM_MAILER
* !^FROM_DAEMON
| formail -A"Bcc: anotheruser(_at_)anotherdomain(_dot_)com" \
-A"X-Loop: resend-ID" | /usr/lib/sendmail -t

:0
! -f "$SENDER" -- "$@"

cut here ----

What i want to do its, to send a blind copy of any message sent to 
user(_at_)internet(_dot_)domain(_dot_)com to 
anotheruser(_at_)anotherdomain(_dot_)com, this works
pretty well in a .procmailrc file (on the home directory of the user)
but how can i do this on the mail hub ? (the rest of the recipe i copy it
from some posts on www.deja.com, basically the last 2 lines of the recipe)

When i stop and start sendmail again i get a mail loop problem, it seems
that all the relay mail sucessfully go thru the filter but it begins
to bounce.. i can see messages on the maillog file like this:

cut here ---

May 28 20:55:05 mail sendmail[24120]: UAA24120: SYSERR(root): Too many hops 26 (
25 max): from 
list-errors(_dot_)2000000678(_dot_)0(_dot_)2001689137(_dot_)002(_dot_)0(_dot_)0(_at_)boing(_dot_)topica(_dot_)com
 via l
ocalhost, to 
marioe(_at_)ldcttx06(_dot_)cfemex(_dot_)com(_dot_)procmail(_dot_)procmail(_dot_)procmail(_dot_)procmail(_dot_)proc
mail.procmail.procmail.procmail.procmail.procmail.procmail.procmail.procmail.pro
cmail.procmail.procmail.procmail.procmail.procmail.procmail@
May 28 20:55:05 mail sendmail[24120]: UAA24120: UAB24120: DSN: Too many hops 26
(25 max): from 
list-errors(_dot_)2000000678(_dot_)0(_dot_)2001689137(_dot_)002(_dot_)0(_dot_)0(_at_)boing(_dot_)topica(_dot_)com
 via
loc....procmail.procmail.procmail.procmail.procmail.procmail.procmail.procmail.p
rocmail.procmail.procmail@
May 28 20:55:05 mail sendmail[24047]: UAA23967: 
to=srios(_at_)r1030(_dot_)cfemex(_dot_)com(_dot_)procma
il.procmail.procmail.procmail.procmail.procmail.procmail.procmail.procmail.procm
ail(_dot_)procmail(_dot_)procmail(_at_)mail(_dot_)cfemex(_dot_)com, 
delay=00:00:05, xdelay=00:00:02, mailer=p
rocmail, relay=/etc/procmailrc.master, stat=Sent

cut here---

What i am doing wrong ?

Its my recipe wrong ?

Its the hack to sendmail wrong (the S98 rule) ?

Thanks a lot for your help and i will appreciate if you cc: your reply
to demon(_at_)demon(_dot_)com(_dot_)mx since im not subscribed to this mail 
list..

Thanks..

-- 
                               (\(\                    
                                OO +  _                
                              =(' = \/~)              
+----------------------------oOO----OOo-----------------------------+
Adrian de los Santos (aka: Demon) -  Linux, Unix Consultant
Cuautitlan Izcalli, Estado de Mexico, Mexico.
Email: demon(_at_)demon(_dot_)com(_dot_)mx, Phone: 58815312, Cel: 
044-1-905-6767 
+-------------------------------------------------------------------+
New Book: UNIX Programmers Who Wear Ties.
---
GCS d- s: a- C++ UL++++$ UC++++$ US+++$ UB+++$ P+++>+++++ L++$>++++ 
E+ W++ N++ o K? w++ O M V PS PE Y+ PGP+ t- 5 X+ R- tv+ b+ DI++ D++ 
G+ e h+ r++ y+
===
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • Almost crazy with sendmail + relay + procmail, Adrian de los Santos <=