long running cron script, sendmail question

2009-09-16 Thread Chris Bennett

I have a long running script running out of cron.
Most of the time is spent sleeping, but takes a few hours overall.


userx 31929  0.0  2.4  9116 12156 ??  S  5:39AM0:09.27 
/usr/bin/perl /home/userx/LWP/LWP_ref.pl
_postgresql 29990  0.0  1.4  3892  7328 ??  Ss 5:39AM0:00.33 
postgres: dbuser db 127.0.0.1(39434) idle (postgres)
userx 11830  0.0  0.5  1164  2524 ??  I  5:40AM0:00.03 
/usr/sbin/sendmail -FCronDaemon -odi -oem -oi -t


Shows up during whole process. I've seen some odd behavior sometimes 
while this is running, but not always. I can't be sure if it is script 
related or ISP related.


Does having sendmail open for a few hours cause any problems? I was 
thinking that if it does, I could easily rewrite to print out details 
only at very end of script.


Thanks,
Chris Bennett



Re: Sendmail question

2008-06-26 Thread Olivier Cherrier
On Tue, Jun 24, 2008 at 09:20:03PM -0400, [EMAIL PROTECTED] wrote:
 I have an OpenBSD machine that will handle outbound mail using Sendmail. 
 I'd like Sendmail to scan the messages, and any messages with a certain 
 word in the subject will be sent to a specific server instead of the 
 Internet.  I've figured out how to *block* messages based on the subject 
 using LOCAL_RULESETS, but not how to re-route them.  I'd rather not rewrite 
 the From: address, but I can if I must.  Can someone give me a pointer on 
 how to do this?  Thanks.

You may need a milter. There is one which fits in ports (milter-regex).
Scanning email bodies will impact performances.
 
-- 
Olivier Cherrier
mailto:[EMAIL PROTECTED]



Re: Sendmail question

2008-06-26 Thread Steve Shockley

Olivier Cherrier wrote:

You may need a milter. There is one which fits in ports (milter-regex).
Scanning email bodies will impact performances.


Thanks for the reply.  I wound up using milter-regex to quarantine the 
messages that match my criteria, use qtool.pl to move the quarantined 
messages to a different queue, un-quarantine the messages, then run 
sendmail with a different config file (with a smarthost) to feed all the 
messages to the specified host.  Perhaps not elegant, but functional.




Sendmail question

2008-06-24 Thread Steve Shockley
I have an OpenBSD machine that will handle outbound mail using Sendmail. 
I'd like Sendmail to scan the messages, and any messages with a certain 
word in the subject will be sent to a specific server instead of the 
Internet.  I've figured out how to *block* messages based on the subject 
using LOCAL_RULESETS, but not how to re-route them.  I'd rather not 
rewrite the From: address, but I can if I must.  Can someone give me a 
pointer on how to do this?  Thanks.




Re: sendmail question

2007-12-03 Thread Toni Mueller
Hi,

On Sat, 01.12.2007 at 14:48:40 -0700, Philip Guenther [EMAIL PROTECTED] wrote:
 Anyway, I have no personal need to claim superiority, so if your
 current setup using qmail or postfix works, feel free to keep using
 it.

thank you for your investigations, but in fact, I hoped to be able to
do away with that extra stuff I'm doing...


Best,
--Toni++



Re: sendmail question

2007-12-01 Thread Philip Guenther
On Nov 30, 2007 10:25 AM, Toni Mueller [EMAIL PROTECTED] wrote:
...
 I have a box that serves as a VPN gateway:

 N1 --- box in question -- Internet --- other gateway --- N2

 N1 = 192.168.2.0/24
 N2 = 192.168.1.0/24
...
 Now, I'd like to send mail, eg. the usual daily reports, via the tunnel
 to a mail server in N2. There is also no other way to reach that mail
 server except via the tunnel, and of course, I want the information
 transferred be protected from prying eyes. In the various sendmail
 configuration files, I've placed statements similar to

O ClientPortOptions=Family=inet, Address=192.168.2.5
 and
DS [192.168.1.10]


 Unfortunately, sending mail that way fails because Sendmail insists in
 using the IP address of the interface going out to the Internet.

Not only that, but something is broken in your MUA that resulted in
the log entries you included that showed the above being cut off and
lost.

As is, your sendmail setup looks right to me.  Are you able to telnet
from that machine with those source and destination address?
telnet -b 192.168.2.5 192.168.1.10 25

If that doesn't go through, then the problem is your network level
setup (routing, filtering, etc) and not your sendmail setup at all.
If that telnet does work, well, you _did_ remember to restart sendmail
after changing the sendmail.cf, right?


Philip Guenther



Re: sendmail question

2007-12-01 Thread Toni Mueller
Hi,

On Sat, 01.12.2007 at 01:32:07 -0700, Philip Guenther [EMAIL PROTECTED] wrote:
 Not only that, but something is broken in your MUA that resulted in
 the log entries you included that showed the above being cut off and
 lost.

I'm not sure what you mean, exactly, but I broke the quote out of the
thread wrt. replacing sendmail with qmail, but didn't want to hijack
a thread. Therefore I deleted header like Refecences: .

 As is, your sendmail setup looks right to me.  Are you able to telnet
 from that machine with those source and destination address?
 telnet -b 192.168.2.5 192.168.1.10 25

Yes, that works very nicely.

 If that telnet does work, well, you _did_ remember to restart sendmail
 after changing the sendmail.cf, right?

Yes. I've first tried to configure this a few years ago, and done some
upgrades in the meantime. As the problem persists, I worked around it
by not using sendmail, but this is not an ideal solution, and I thought
the sendmail fans on the list could simply show off their superiority.

;-)


Best,
--Toni++



Re: sendmail question

2007-12-01 Thread Philip Guenther
On Dec 1, 2007 4:52 AM, Toni Mueller [EMAIL PROTECTED] wrote:
 On Sat, 01.12.2007 at 01:32:07 -0700, Philip Guenther [EMAIL PROTECTED] 
 wrote:
  Not only that, but something is broken in your MUA that resulted in
  the log entries you included that showed the above being cut off and
  lost.

 I'm not sure what you mean, exactly, ...

Sorry, I was being obtuse: in order to actually debug your previous
attempt, log entries from that attempt would have been necessary.


  As is, your sendmail setup looks right to me.  Are you able to telnet
  from that machine with those source and destination address?
  telnet -b 192.168.2.5 192.168.1.10 25

 Yes, that works very nicely.

Cool.


  If that telnet does work, well, you _did_ remember to restart sendmail
  after changing the sendmail.cf, right?

 Yes. I've first tried to configure this a few years ago, and done some
 upgrades in the meantime. As the problem persists, I worked around it
 by not using sendmail, but this is not an ideal solution, and I thought
 the sendmail fans on the list could simply show off their superiority.

I just verified that ClientPortOptions works as expected on my laptop,
running OpenBSD 4.2, by making the submit.cf bind to 127.0.0.2 (an
alias on lo0) when forwarding to the normal daemon.  Note that the 'b'
modifier on DaemonPortOptions overrides ClientPortOptions bind
settings.

Anyway, I have no personal need to claim superiority, so if your
current setup using qmail or postfix works, feel free to keep using
it.


Philip Guenther



sendmail question

2007-11-30 Thread Toni Mueller
Hi,

On Fri, 30.11.2007 at 15:27:15 +0100, Pete Vickers [EMAIL PROTECTED] wrote:
 In case it's needed (which I doubt), I'll voice my VERY strongly  
 preference for sendmail instead of all these other pretenders.

I take your plug for sendmail as an invitation to ask a sendmail
question:

I have a box that serves as a VPN gateway:

N1 --- box in question -- Internet --- other gateway --- N2

N1 = 192.168.2.0/24
N2 = 192.168.1.0/24

Of course, on the Internet side of it, it has an official IP address.

Now, I'd like to send mail, eg. the usual daily reports, via the tunnel
to a mail server in N2. There is also no other way to reach that mail
server except via the tunnel, and of course, I want the information
transferred be protected from prying eyes. In the various sendmail
configuration files, I've placed statements similar to

O ClientPortOptions=Family=inet, Address=192.168.2.5

and

DS [192.168.1.10]


Unfortunately, sending mail that way fails because Sendmail insists in
using the IP address of the interface going out to the Internet.

What gives?


TIA!


Best,
--Toni++



Re: sendmail question

2006-06-22 Thread Peter Philipp
On Wed, Jun 21, 2006 at 06:39:28PM -0400, Hugo Villeneuve wrote:
  Here is what I stuck in my sendmail .mc file:
  
  define(`confMESSAGEID_HEADER', `[EMAIL PROTECTED]')dnl
 
 Put that in submit.mc and recreate submit.cf.
 
 Sendmail doesn't allow the rewriting of message-id, that rule is
 used when one needs to be created.

Thanks!  That worked like a charm.

-peter



sendmail question

2006-06-21 Thread Peter Philipp
Hi,

I'm trying to modify my outgoing Message-Id, with my mailer MUA (mutt) I can 
configure this.  However when I try to use mail(1) it does not update the 
Message-Id, I read a bit in the source and it doesn't seem to be set in
mail(1), and a ktrace shows that it pipes everything to sendmail directly.

Here is what I stuck in my sendmail .mc file:

define(`confMESSAGEID_HEADER', `[EMAIL PROTECTED]')dnl

That's how I'd like it to look here is how it looks in the H config in the
.cf file:

H?M?Resent-Message-Id: [EMAIL PROTECTED]
H?M?Message-Id: [EMAIL PROTECTED]

I read up what the ?M? means.. it means that if the flags M are set,

Mlocal, P=/usr/local/bin/procmail, F=lsDFMAw5:/|@qSPfhn9, 
S=EnvFromL/HdrFromL, R=EnvToL/HdrToL,
Mprog,  P=/bin/sh, F=lsDFMoqeu9, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, 
D=$z:/,
Msmtp,  P=[IPC], F=mDFMuX, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, 
E=\r\n, L=990,
Mesmtp, P=[IPC], F=mDFMuXa, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, 
E=\r\n, L=990,
Msmtp8, P=[IPC], F=mDFMuX8, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, 
E=\r\n, L=990,
Mdsmtp, P=[IPC], F=mDFMuXa%, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, 
E=\r\n, L=990,
Mrelay, P=[IPC], F=mDFMuXa8, S=EnvFromSMTP/HdrFromSMTP, R=MasqSMTP, 
E=\r\n, L=2040,

... and so they are.  

But it still doesn't overwrite the Message-Id: to how I want it.  


What am I missing?

Thanks for any useful replies,

-peter



Re: sendmail question

2006-06-21 Thread Hugo Villeneuve
On Wed, Jun 21, 2006 at 07:22:28PM +0200, Peter Philipp wrote:
 Hi,
 
 I'm trying to modify my outgoing Message-Id, with my mailer MUA (mutt) I can 
 configure this.  However when I try to use mail(1) it does not update the 
 Message-Id, I read a bit in the source and it doesn't seem to be set in
 mail(1), and a ktrace shows that it pipes everything to sendmail directly.
 
 Here is what I stuck in my sendmail .mc file:
 
 define(`confMESSAGEID_HEADER', `[EMAIL PROTECTED]')dnl

Put that in submit.mc and recreate submit.cf.

Sendmail doesn't allow the rewriting of message-id, that rule is
used when one needs to be created.


-- 
Hugo Villeneuve [EMAIL PROTECTED]
http://EINTR.net/