Sendmail Options?

G

Gary Mayor

Hi,
I'm having a problem with sendmail not always sending emails. When
someone registers I want sendmail to send a registration email to the
user but this only works 50% of the time. So the only thing I can think
of is my sendmail options. Here's the line I use to send emails,

my $sendmail = "/usr/sbin/sendmail -oi -t";

Is there anything wrong with that line. What other options can I use on
there to hopefully improve the reliability of email sending.

Thanks

Gary
 
W

Walter Roberson

:I'm having a problem with sendmail not always sending emails. When
:someone registers I want sendmail to send a registration email to the
:user but this only works 50% of the time. So the only thing I can think
:eek:f is my sendmail options. Here's the line I use to send emails,

:my $sendmail = "/usr/sbin/sendmail -oi -t";

:Is there anything wrong with that line. What other options can I use on
:there to hopefully improve the reliability of email sending.

This isn't a sendmail newsgroup.

sendmail -oi -t is pretty traditional for sending out email when
the destination is to be read from the message itself. The -oi option
tells it to ignore input lines that contain a single period ('dot'),
which would otherwise indicate end-of-file.

You haven't given us any information about what happens the other 50%
of the time when you try to send out email. Does it just disappear?
Does it get stuck in the queue? Does it go to the wrong recipient?


I think we can get a clue from the one line of code that you included.
You used double-quotes for the string even though no variables were
being interpolated and no escape sequences were being used. You could
instead have used:

my $sendmail = '/usr/sbin/sendmail -oi -t';

This gives us the hint that you probably aren't being careful about
interpolation, and gives us the hint that you probably don't have
taint checking turned on. You might not even be using strictures --
do you have use strict; and use warnings; turned on?
 
G

Gunnar Hjalmarsson

Gary said:
I'm having a problem with sendmail not always sending emails. When
someone registers I want sendmail to send a registration email to
the user but this only works 50% of the time.

I believe that the behaviour is caused by the sendmail configuration
rather than your Perl program. Study the documentation about the mail
server configuration or ask the server administrator for help.
 
T

Tintin

Gary Mayor said:
Hi,
I'm having a problem with sendmail not always sending emails. When
someone registers I want sendmail to send a registration email to the
user but this only works 50% of the time. So the only thing I can think
of is my sendmail options. Here's the line I use to send emails,

my $sendmail = "/usr/sbin/sendmail -oi -t";

Is there anything wrong with that line. What other options can I use on
there to hopefully improve the reliability of email sending.

comp.mail.sendmail is thataway.........->
 
G

Gary Mayor

Walter said:
:I'm having a problem with sendmail not always sending emails. When
:someone registers I want sendmail to send a registration email to the
:user but this only works 50% of the time. So the only thing I can think
:eek:f is my sendmail options. Here's the line I use to send emails,

:my $sendmail = "/usr/sbin/sendmail -oi -t";

:Is there anything wrong with that line. What other options can I use on
:there to hopefully improve the reliability of email sending.

This isn't a sendmail newsgroup.

sendmail -oi -t is pretty traditional for sending out email when
the destination is to be read from the message itself. The -oi option
tells it to ignore input lines that contain a single period ('dot'),
which would otherwise indicate end-of-file.

You haven't given us any information about what happens the other 50%
of the time when you try to send out email. Does it just disappear?
Does it get stuck in the queue? Does it go to the wrong recipient?


I think we can get a clue from the one line of code that you included.
You used double-quotes for the string even though no variables were
being interpolated and no escape sequences were being used. You could
instead have used:

my $sendmail = '/usr/sbin/sendmail -oi -t';

This gives us the hint that you probably aren't being careful about
interpolation, and gives us the hint that you probably don't have
taint checking turned on. You might not even be using strictures --
do you have use strict; and use warnings; turned on?

Hi,
The emails just disappear looked in the logs and there's nothing giving
a clue, just says sent.

Nope no tainting, strict or warnings turned on will do so now.

Thanks
 
K

Keith Keller

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

my $sendmail = "/usr/sbin/sendmail -oi -t";

Is there anything wrong with that line. What other options can I use on
there to hopefully improve the reliability of email sending.

The Net::SMTP module is more Perlish and more portable.

- --keith

- --
(e-mail address removed)-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAuh0ghVcNCxZ5ID8RAmLnAJ4wcLh2+pGESiTlNehhmC4rfY9lHQCffYxf
2mgCUl4rrHthvVNv+t63F0o=
=Y+VJ
-----END PGP SIGNATURE-----
 
J

Juha Laiho

....
Well, the line you quoted does not send mail; it declares a variable
called '$sendmail' and initialises it to the given value. Apparently
later in the code you give that variable to "system" or some other
all that will actually execute sendmail.
The emails just disappear looked in the logs and there's nothing giving
a clue, just says sent.

Says "sent" where? In the logs? If the log says "sent", then look for
detail saying "relay=some.host.name". So, for example here's a log entry
of a message I sent to myself:
sendmail[4467]: i4UHhbF9004465: to=<[email protected]>, delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30318, relay=mta.inet.fi. [192.89.123.210], dsn=2.0.0, stat=Sent (Message received: (e-mail address removed)-int)

So, says that it has been delivered using mailer 'relay', and has been
accepted for delivery by mta.inet.fi. In addition, mta.inet.fi admins
could find out more info about this message with the id listed at the
end of the line (2004...).

If there is a line like this in your maillog, then the message is delivered
out of your machine, but may of course have been filtered by some other
machine on the way - antispam and virus scanning software are rather
commonplace nowadays.
 
G

Gary Mayor

Thanks Juha finnaly some useful feedback


Juha said:
Gary Mayor said:
...
Well, the line you quoted does not send mail; it declares a variable
called '$sendmail' and initialises it to the given value. Apparently
later in the code you give that variable to "system" or some other
all that will actually execute sendmail.

The emails just disappear looked in the logs and there's nothing giving
a clue, just says sent.


Says "sent" where? In the logs? If the log says "sent", then look for
detail saying "relay=some.host.name". So, for example here's a log entry
of a message I sent to myself:
sendmail[4467]: i4UHhbF9004465: to=<[email protected]>, delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30318, relay=mta.inet.fi. [192.89.123.210], dsn=2.0.0, stat=Sent (Message received: (e-mail address removed)-int)

So, says that it has been delivered using mailer 'relay', and has been
accepted for delivery by mta.inet.fi. In addition, mta.inet.fi admins
could find out more info about this message with the id listed at the
end of the line (2004...).

If there is a line like this in your maillog, then the message is delivered
out of your machine, but may of course have been filtered by some other
machine on the way - antispam and virus scanning software are rather
commonplace nowadays.
 

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,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top