might be OT sendmail script running very slow

M

Mark D Smith

Hi

this might be a sendmail issue but the snippet below is from a script that
is used in part of an automated program than ran fine on RH8 but on FC3
takes around 13 seconds from Start of sendmail line to end of sendmail line.

my $mailprog = '/usr/sbin/sendmail';

print "start of sendmail<br>\n";

open (MAIL, "|$mailprog -t -f system-check\@domain.xyz");
print MAIL "To: Support <support\@domain.xyz>\n";
print MAIL "Cc: Support1 <support1\@domain1.xyz>\n";
print MAIL "From: Test Script<server1\@domain.xyz>\n";
print MAIL "Subject: mail test\n\n";

close(MAIL);
print "end of sendmail<br>\n";

Mark
 
G

Gunnar Hjalmarsson

Mark said:
this might be a sendmail issue

So it seems.
but the snippet below is from a script that
is used in part of an automated program than ran fine on RH8 but on FC3
takes around 13 seconds from Start of sendmail line to end of sendmail line.

my $mailprog = '/usr/sbin/sendmail';

print "start of sendmail<br>\n";

open (MAIL, "|$mailprog -t -f system-check\@domain.xyz");
print MAIL "To: Support <support\@domain.xyz>\n";
print MAIL "Cc: Support1 <support1\@domain1.xyz>\n";
print MAIL "From: Test Script<server1\@domain.xyz>\n";
print MAIL "Subject: mail test\n\n";

close(MAIL);
print "end of sendmail<br>\n";

Try using one of the Perl modules instead. This code replaces the above
using Mail::Sender:

use Mail::Sender;
ref (new Mail::Sender -> MailMsg( {
smtp => 'localhost',
from => 'Test Script <[email protected]>',
fake_from => '(e-mail address removed)',
to => 'Support <[email protected]>',
cc => 'Support1 <[email protected]>',
subject => 'mail test',
msg => '',
} )) or die "Cannot send mail. $Mail::Sender::Error\n";
 
M

Mark Clements

Mark said:
Hi

this might be a sendmail issue but the snippet below is from a script
that is used in part of an automated program than ran fine on RH8 but
on FC3 takes around 13 seconds from Start of sendmail line to end of
sendmail line.

my $mailprog = '/usr/sbin/sendmail';

print "start of sendmail<br>\n";

open (MAIL, "|$mailprog -t -f system-check\@domain.xyz");
print MAIL "To: Support <support\@domain.xyz>\n";
print MAIL "Cc: Support1 <support1\@domain1.xyz>\n";
print MAIL "From: Test Script<server1\@domain.xyz>\n";
print MAIL "Subject: mail test\n\n";

close(MAIL);
print "end of sendmail<br>\n";
DNS is working correctly on the FC3 system? Can its hostname (or
whatever sendmail thinks it's called) be resolved by DNS?

What happens if you run sendmail directly?

This is off-topic for this newsgroup (as you have guessed), so I
suggest that you either post the question in a sendmail group, or you
can mail me directly, but note my crude address-munging.

Mark
 
M

Mark D Smith

Gunnar Hjalmarsson said:
Sorry, that would be the other way around:

from => '(e-mail address removed)',
fake_from => 'Test Script <[email protected]>',

Hi

takes just as long! , I'll contact Mark Clements via email and see if he can
help as per his posting.

Mark
 
M

Mark D Smith

Mark Clements said:
DNS is working correctly on the FC3 system? Can its hostname (or
whatever sendmail thinks it's called) be resolved by DNS?

What happens if you run sendmail directly?

This is off-topic for this newsgroup (as you have guessed), so I
suggest that you either post the question in a sendmail group, or you
can mail me directly, but note my crude address-munging.

Mark

Hi Mark & group

just to let you know it was sendmail. as i use 8.13.1 i added 2 lines the
submit.mc and rebuilt it.

FEATURE(`nocanonify')
define(`confDIRECT_SUBMISSION_MODIFIERS',`C')

Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top