RE: [Mimedefang] filter_relay not working?
Got it working.My bustI had the -r in mimedefang-multiplexor, not mimedefang :) > What you are trying to accomplish is rather opaque to me. Can you please > specify? I have a Secondary MX that will spool up mail in the event the primary goes down. As you know, spammers will often try the higher weighted MX's in the hopes of sneaking things through. So on this secondary I'm running MD/SA and RBL checks. I was finding that this machine would identify a message as SPAM and add the headers. Then it would forward to the primary and it would change the SPAM headers and say it wasn't spam. See below. Feb 13 08:19:57 mail sendmail[6308]: i1DGJvR9006308: Milter change: header X-Spam-Status: from Yes, hits=5.533 required=5\n version=SpamAssassin 2.63 tests=BAYES_44,DATE_MISSING,FROM_NO_LOWER,MSGID_FROM_MTA_SHORT to No, hits=-4.562 required=5\n version=SpamAssassin 2.63 tests=BAYES_00,NO_REAL_NAME I have since dropped the mimedefang-ip-key, since by using the filter_relay, there is no way to strip the header since I accept the message outright if coming from my MX02 box. If there is a better way of handling/accomplishing this, I'd love to hear it. Thanks for all the replies. - Mike smime.p7s Description: S/MIME cryptographic signature ___ Visit http://www.mimedefang.org and http://www.canit.ca MIMEDefang mailing list [EMAIL PROTECTED] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
Re: [Mimedefang] filter_relay not working?
- Original Message - From: "Mike Smith" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 12, 2004 9:02 PM Subject: RE: [Mimedefang] filter_relay not working? > I'm running this on MD 2.39. > > sub filter_relay { > my ($ip, $name, $helo) = @_; > action_add_header ("X-From:","$ip"); > } Will indeed not work. Has nothing to do with MIMEDefang, but everything with the Milter specification. Context routines, such as addheader, chgheader, addrcpt, delrcpt, replacebody, are ONLY available to the eom_callback function. > The Relay-Key has been changed to protect my real one. Also the ip > listed after the delete X-MIMEDefang-Relay is not my > relay/secondary server, but the ip that I connected to the relay on... > Is that right? Doesn't seem like that's the way it's suppose to work. What you are trying to accomplish is rather opaque to me. Can you please specify? $ip in filter_relay will always be the IP of whoever is making the connection. On an inbound connection, this will be the IP address of the connecting host; if you forward from your primary mail server to your secondary, then the IP will be that of your primary mail server. And yes, it is supposed to work that way. :) If you forward to your secondary, then you could add your "X-From" header at eom_callback (at your primary), and then whitelist the IP address as soon as you process the header at your secondary. Not an extremely efficient method, though; better just to whitelist the IP address of your secondary altogether. - Mark System Administrator Asarian-host.org --- "If you were supposed to understand it, we wouldn't call it code." - FedEx ___ Visit http://www.mimedefang.org and http://www.canit.ca MIMEDefang mailing list [EMAIL PROTECTED] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
RE: [Mimedefang] filter_relay not working?
Like I said, I was trying a simple test since going off the example wasn't working. I have looked at the man page and am still at a loss. Going from the example, this should work no? sub filter_relay { my($ip, $name, $helo) = @_; if($ip eq "xxx.xxx.xxx.xxx") { # ip of trusted relay return('ACCEPT_AND_NO_MORE_FILTERING', "ok"); } return('CONTINUE', "ok"); } Yet I am still getting the following in my mailog on the primary servers. Feb 12 11:40:20 mail sendmail[25006]: i1CJeJR9025006: Milter change: header X-Spam-Status: from No, hits=0.693 required=5\n version=SpamAssassin 2.63 tests=HTML_60_70,HTML_MESSAGE,TW_PK to No, hits=-4.208 required=5\n version=SpamAssassin 2.63 tests=BAYES_00,HTML_60_70,HTML_MESSAGE,TW_PK Feb 12 11:40:20 mail sendmail[25006]: i1CJeJR9025006: Milter delete: header X-MIMEDefang-Relay-f51b9e097d9b9fa662d5b18428d4106953b47558: 10.0.0.1 The Relay-Key has been changed to protect my real one. Also the ip listed after the delete X-MIMEDefang-Relay is not my relay/secondary server, but the ip that I connected to the relay on...Is that right? Doesn't seem like that's the way it's suppose to work. Forgive me if I'm out in left field here. =- Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David F. Skoll Sent: Thursday, February 12, 2004 11:01 AM To: [EMAIL PROTECTED] Subject: Re: [Mimedefang] filter_relay not working? On Thu, 12 Feb 2004, Mike Smith wrote: > sub filter_relay { > my($ip, $name, $helo) = @_; > action_add_header("X-From:","$ip"); > } Will not work. See the mimedefang-filter man page for reasons why. Regards, David. ___ Visit http://www.mimedefang.org and http://www.canit.ca MIMEDefang mailing list [EMAIL PROTECTED] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang smime.p7s Description: S/MIME cryptographic signature ___ Visit http://www.mimedefang.org and http://www.canit.ca MIMEDefang mailing list [EMAIL PROTECTED] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
Re: [Mimedefang] filter_relay not working?
Mike Smith wrote: > Basically I want to stream > everything through that comes from a certain relay with no further > checking. I was thinking something like this > > sub filter_relay { > my($ip, $name, $helo) = @_; > if($ip eq "xxx.xx.xx.xx") { > return('ACCEPT_AND_NO_MORE_FILTERING', "ok"); > } > else { > return('CONTINUE', "ok"); > } > } That should work. I used almost exactly that on one mail server for a while to allow another one to relay out through it due to some RBL trouble. -kgd -- "Sendmail administration is not black magic. There are legitimate technical reasons why it requires the sacrificing of a live chicken." - Unknown ___ Visit http://www.mimedefang.org and http://www.canit.ca MIMEDefang mailing list [EMAIL PROTECTED] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
Re: [Mimedefang] filter_relay not working?
On Thu, 12 Feb 2004, Mike Smith wrote: > sub filter_relay { > my($ip, $name, $helo) = @_; > action_add_header("X-From:","$ip"); > } Will not work. See the mimedefang-filter man page for reasons why. Regards, David. ___ Visit http://www.mimedefang.org and http://www.canit.ca MIMEDefang mailing list [EMAIL PROTECTED] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
[Mimedefang] filter_relay not working?
Hi All, I've been trying to get filter_relay to work but I'm not having much luck. To rule out all the logic in the filter, I have created a simple filter_relay like this to see if it's even being called. I'm running this on MD 2.39. sub filter_relay { my($ip, $name, $helo) = @_; action_add_header("X-From:","$ip"); } The thing that brought all of this about was that the secondary MX would scan the mail and assign X-SPAM headers saying it was spam, then it would get forwarded to the primary and it would change the header and say it wasn't spam. Maybe filter_relay isn't the place for this? I'm at the end of my rope so am asking for help/suggestions. Basically I want to stream everything through that comes from a certain relay with no further checking. I was thinking something like this sub filter_relay { my($ip, $name, $helo) = @_; if($ip eq "xxx.xx.xx.xx") { return('ACCEPT_AND_NO_MORE_FILTERING', "ok"); } else { return('CONTINUE', "ok"); } } Any help would be greatly appreciated. - Mike smime.p7s Description: S/MIME cryptographic signature ___ Visit http://www.mimedefang.org and http://www.canit.ca MIMEDefang mailing list [EMAIL PROTECTED] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang