PIPE module, mailscanner and cgp2ms/ms2cgp

John Rudd jrudd at UCSC.EDU
Tue Jul 22 22:02:03 IST 2003


(Mailscanner list: There was another bug reported in the
CGP<->MailScanner scripts, and I've tracked it down and released a new
version today)


I found the problem.  It wasn't what I expected it to be (what I
described earlier).  I'm putting up a second update.

(the problem was this: I had written ms2cgp to accept multiple sendmail
jobs at once, as it should, but had not cleared/reset all of the
variables in the loop (specifically, the one I had not reset was $rcpt;
not sure how that one escaped me), but the bug hadn't shown up because
none of my test servers is being used heavily enough to have multiple
jobs come through in one pass (and we wont be going to production with
CGP until September); I'm guessing no one else is having a heavy enough
load to see it, either, because so far you're the only person to report
it)

(by the way, thank you for your patience, and for helping me track it
down)

The web page has the fixed version of the script now.

For the individual script:
http://people.ucsc.edu/~jrudd/MailScanner/ms2cgp

Or, if you just want the actual fix:

In the ms2cgp script I released yesterday, lines 46 and 47 are:

 >   $msg = "/tmp/ms2cgp.$$.msg";    # the tempfile we'll give to CGP
 >

Change them to this (which will now be lines 46-48, because you're
inserting a new line between the above two lines):

 >   $msg = "/tmp/ms2cgp.$$.msg";    # the tempfile we'll give to CGP
 >   $rcpt = "";
 >


The whole site:
http://people.ucsc.edu/~jrudd/MailScanner

If anyone sees any new bugs, please let me know, and I'll get right on
them.


John


On Tuesday, Jul 22, 2003, at 12:58 US/Pacific, NTIN Page Guy wrote:

>
> Hello John,
>
> We are running Redhat Linux 8.1
>
> This doesn't happen for every message.  I have noticed the messages
> that it does occur on appear to have been delivered at the exact same
> time, down to the second.
>
>  Tuesday, July 22, 2003, you wrote:
>
>
>
> JR> What platform are you using?
>
> JR> The mesg id comes from the process ID of the cgp2ms script that was
> JR> invoked for that message.  I could make it longer, to encode a time
> JR> string, but it really shouldn't be rolling over in a time frame
> that
> JR> would matter.  This makes me wonder what's happening that gives
> you the
> JR> same process ID every time cgp2ms gets run.
>
>
> JR> On Tuesday, Jul 22, 2003, at 10:45 US/Pacific, NTIN Page Guy wrote:
>
>>>
>>> Hello John,
>>>
>>> Now, I have a new problem.  I've sent you a email about this, I hope
>>> you don't mind.
>>>
>>> People are getting other peoples emails,  For example
>>>
>>> Lets say the server receives a email to test1
>>>
>>> It executes sendmail
>>>
>>> /opt/CommuniGate/sendmail -i test1 at mydomain.com <
>>> /tmp/ms2cgp.5741.msg
>>>
>>> then quickly there after it gets a message for test2
>>>
>>> it then executes sendmail like this
>>>
>>> /opt/CommuniGate/sendmail -i test1 at mydomain.com test2 at mydomain.com <
>>> /tmp/ms2cgp.5741.msg
>>>
>>> then quickly there after it gets a message for test3
>>>
>>> /opt/CommuniGate/sendmail -i test1 at mydomain.com test2 at mydomain.com
>>> test3 at mydomain.com < /tmp/ms2cgp.5741.msg
>>>
>>>
>>> I don't know why its doing this other than to speculate that what
>>> ever
>>> is
>>> passing the id number to ms2cgp is giving it the same id number it
>>> did
>>> last message,
>>> rather than changing.
>>>
>>>  Tuesday, July 22, 2003, you wrote:
>>>
>>>
>>>
>>> JR> Are you still having this problem after my update yesterday?
>>>
>>> JR> I posted the message to both this list and to the mailscanner
>>> list
>>> JR> yesterday afternoon.
>>>
>>>
>>> JR> On Tuesday, Jul 22, 2003, at 08:39 US/Pacific, NTIN Page Guy
>>> wrote:
>>>
>>>>>
>>>>> Hello CGatePro,
>>>>>
>>>>> PIPE module, mailscanner and cgp2ms/ms2cgp
>>>>>
>>>>> Im having a rather unusual problem with the above working together.
>>>>>
>>>>> Here is the problem as I understand it.
>>>>>
>>>>> Using ms2cgp as it came, it uses the legacy sendmail support to
>>>>> PIPE
>>>>> the messages back into Communigate, sendmail adds the following
>>>>> line
>>>>> which makes the message undeliverable
>>>>>
>>>>>> Envelope-To: RPFD:rbaldwin at ntin.net
>>>>>
>>>>> Communigate responds that the message has no valid to field, and
>>>>> renames the file to with a .bad extension.
>>>>>
>>>>>
>>>>> Best regards,
>>>>> Robert B, NTIN                           mailto:pages at ntin.net
>>>>>
>>>>>
>>>>> #############################################################
>>>>> This message is sent to you because you are subscribed to
>>>>>   the mailing list <CGatePro at mail.stalker.com>.
>>>>> To unsubscribe, E-mail to: <CGatePro-off at mail.stalker.com>
>>>>> To switch to the DIGEST mode, E-mail to
>>>>> <CGatePro-digest at mail.stalker.com>
>>>>> To switch to the INDEX mode, E-mail to
>>>>> <CGatePro-index at mail.stalker.com>
>>>>> Send administrative queries to  <CGatePro-request at mail.stalker.com>
>>>
>>>
>>> JR> #############################################################
>>> JR> This message is sent to you because you are subscribed to
>>> JR>   the mailing list <CGatePro at mail.stalker.com>.
>>> JR> To unsubscribe, E-mail to: <CGatePro-off at mail.stalker.com>
>>> JR> To switch to the DIGEST mode, E-mail to
>>> <CGatePro-digest at mail.stalker.com>
>>> JR> To switch to the INDEX mode, E-mail to
>>> <CGatePro-index at mail.stalker.com>
>>> JR> Send administrative queries to
>>> <CGatePro-request at mail.stalker.com>
>>>
>>>
>>>
>>> Best regards,
>>> Robert B, NTIN                           mailto:pages at ntin.net
>>>
>>>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>>   the mailing list <CGatePro at mail.stalker.com>.
>>> To unsubscribe, E-mail to: <CGatePro-off at mail.stalker.com>
>>> To switch to the DIGEST mode, E-mail to
>>> <CGatePro-digest at mail.stalker.com>
>>> To switch to the INDEX mode, E-mail to
>>> <CGatePro-index at mail.stalker.com>
>>> Send administrative queries to  <CGatePro-request at mail.stalker.com>
>
>
> JR> #############################################################
> JR> This message is sent to you because you are subscribed to
> JR>   the mailing list <CGatePro at mail.stalker.com>.
> JR> To unsubscribe, E-mail to: <CGatePro-off at mail.stalker.com>
> JR> To switch to the DIGEST mode, E-mail to
> <CGatePro-digest at mail.stalker.com>
> JR> To switch to the INDEX mode, E-mail to
> <CGatePro-index at mail.stalker.com>
> JR> Send administrative queries to  <CGatePro-request at mail.stalker.com>
>
>
>
> Best regards,
> Robert B, NTIN                           mailto:pages at ntin.net
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>   the mailing list <CGatePro at mail.stalker.com>.
> To unsubscribe, E-mail to: <CGatePro-off at mail.stalker.com>
> To switch to the DIGEST mode, E-mail to
> <CGatePro-digest at mail.stalker.com>
> To switch to the INDEX mode, E-mail to
> <CGatePro-index at mail.stalker.com>
> Send administrative queries to  <CGatePro-request at mail.stalker.com>



More information about the MailScanner mailing list